API · Hacker News
GET /hackernews/users/{username}
A Hacker News user: karma, about, submissions.
| Request | GET /v1/hackernews/users/{username} |
| Operation id | hackernews.user.get |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
A Hacker News user: karma, about, submissions.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
username | string | yes | Username, case-sensitive. Example: pg. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The user. | HackerNewsUser |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The item or user does not exist. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Hacker News is temporarily unavailable. Retryable; nothing was charged. | Error |
HackerNewsUser fields
| Field | Type | Description |
|---|---|---|
id | string | |
created | integer | Unix seconds. |
karma | integer | |
about | string | HTML. |
submitted | integer[] | Ids of the user’s stories, polls and comments, newest first (up to 100 here). |
submitted_count | integer | How many items the user submitted in all. |
Errors use one shape everywhere; see Errors for every code and what to do.