# Hacker News User

Returns a public Hacker News user profile: id, ISO 8601 account creation time, karma, about text with a plain-text variant, and the ids of the user's submitted items. An unknown id answers 404 and is never charged.

- **Documentation:** [https://scrappa.co/docs/hackernews-api/hackernews_user](https://scrappa.co/docs/hackernews-api/hackernews_user)
- **API group:** Hacker News API
- **Endpoint:** `GET https://scrappa.co/api/hackernews/user`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Hacker News username, e.g. mlukewizard. |
| `submissions` | boolean | No | Include the submitted item ids. Defaults to true. When false, the submitted field is omitted. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/hackernews/user?id=mlukewizard&submissions=1"
```

## Example response

```json
{
    "success": true,
    "data": {
        "id": "mlukewizard",
        "created_at": "2024-09-06T12:39:58Z",
        "karma": 33,
        "submitted": [
            50069674,
            50069257,
            50068919,
            50068898,
            50068438
        ]
    },
    "meta": {
        "endpoint_family": "user",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 503 | Hacker News Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |
| 500 | Parser Drift | Hacker News returned a response shape this parser does not recognise. The incident has been reported; retrying will return the same result. |
| 404 | Not Found | Hacker News has no such public resource. Firebase answers an unknown item or user with a null payload, which this endpoint maps to 404. |
| 422 | Bad Request Upstream | Hacker News rejected a value in this request. Never charged. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
