UnifAPI Docs

Get a Hacker News comment with its thread

Returns a Hacker News comment with its ancestor chain up to the root story. Returns `not_found` when the comment does not exist.

Pricing — $ · min $0.006

Minimum 6 credits ($0.006) per call. Records returned above the minimum bill 1 credit ($0.001) each.

GET
/hacker-news/items/{id}/context

Authorization

bearerAuth
AuthorizationBearer <token>

UnifAPI API key. Provider credentials are managed by UnifAPI.

In: header

Path Parameters

id*string

Hacker News comment id.

Length1 <= length <= 500

Header Parameters

Unifapi-Version?"2026-07-01"

Pin the API version an integration was built against (date-based, e.g. 2026-07-01). Omit to use the current version. Public URL paths stay stable and unversioned; breaking changes ship under a new dated version and are announced with Deprecation and Sunset response headers. The served version is echoed in every response's Unifapi-Version header. Policy: https://unifapi.com/versioning.md

Default"2026-07-01"

Value in

  • "2026-07-01"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/hacker-news/items/string/context"
{  "request_id": "string",  "data": {    "id": 0,    "type": "string",    "author": "string",    "created_at": 0,    "title": "string",    "text": "string",    "url": "string",    "score": 0,    "comment_count": 0,    "parent_id": 0,    "child_ids": [      0    ],    "is_dead": true,    "is_deleted": true,    "item_url": "string",    "ancestors": [      {        "id": 0,        "type": "string",        "author": "string",        "created_at": 0,        "title": "string",        "text": "string",        "url": "string",        "score": 0,        "comment_count": 0,        "parent_id": 0,        "child_ids": [          0        ],        "is_dead": true,        "is_deleted": true,        "item_url": "string"      }    ],    "story": {      "id": 0,      "type": "string",      "author": "string",      "created_at": 0,      "title": "string",      "text": "string",      "url": "string",      "score": 0,      "comment_count": 0,      "parent_id": 0,      "child_ids": [        0      ],      "is_dead": true,      "is_deleted": true,      "item_url": "string"    }  },  "billing": {    "credits_charged": 0,    "records_charged": 0,    "balance_remaining": 0,    "truncated_due_to_balance": true  }}