# Hacker News Item

Returns one Hacker News item: id, title, url, score, author, ISO 8601 creation time, descendant count, kid ids, type, optional text with a plain-text variant, and parent id, deleted and dead when set. With comments=true (the default) the response also carries the full nested comment tree from the Algolia items document, each comment with author, text, plain-text variant, creation time, parent id and nested children. An unknown id answers 404 and is never charged.

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

## 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` | integer | Yes | Hacker News item id, e.g. 50068946. |
| `comments` | boolean | No | Include the full nested comment tree. Defaults to true. When false, the comments field is omitted. |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "success": true,
    "data": {
        "id": 50068946,
        "title": "Were Software Engineers blue-collar workers all along?",
        "url": "https://ptrbrynt.com/posts/were-we-blue-collar-workers-all-along",
        "score": 75,
        "by": "ilreb",
        "created_at": "2026-10-13T09:25:10Z",
        "descendants": 157,
        "kids": [
            50069266,
            50069036,
            50069053,
            50069278,
            50069122
        ],
        "type": "story",
        "comments": [
            {
                "id": 50068994,
                "author": "bananaflag",
                "text": "&gt; But if we learn how to use the looms, the spreadsheets, and the chainsaws, we might just be oka",
                "text_plain": "> But if we learn how to use the looms, the spreadsheets, and the chainsaws, we might just be oka",
                "parent_id": 50068946,
                "created_at": "2026-10-13T09:38:34Z",
                "children": []
            }
        ]
    },
    "meta": {
        "endpoint_family": "item",
        "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)
