Get Hacker News comment context
Get a Hacker News comment with its ancestor chain to the root story.
Headers
Get your API keyAPI key (`sfk_...`)
Hacker News comment id.
≥ 0 · ≤ 9007199254740991
Endpoint-specific response payload.
Whether the item was found as a comment, was missing, or exists but is not a comment.
one of: found, not_found, not_comment
The requested comment when found.
Unique Hacker News item id.
≥ 0
Item type.
one of: story, comment, job, poll, pollopt, unknown
Author username when present.
Creation time as an ISO-8601 timestamp.
Plain-text title when present.
Plain-text body when present (HTML stripped).
External URL when present and publicly safe.
Score / votes when present.
Total comment count when present (stories/polls).
Parent item id for comments/pollopts.
≥ 0
Child item ids in ranked display order when present. Some list endpoints omit children and return an empty array.
≥ 0
Whether the item is marked dead. Some list endpoints omit this signal and return false.
Whether the item is marked deleted. Some list endpoints omit this signal and return false.
Canonical news.ycombinator.com item URL.
Ancestor items from immediate parent up to (but not including) the story, nearest-parent first.
Unique Hacker News item id.
≥ 0
Item type.
one of: story, comment, job, poll, pollopt, unknown
Author username when present.
Creation time as an ISO-8601 timestamp.
Plain-text title when present.
Plain-text body when present (HTML stripped).
External URL when present and publicly safe.
Score / votes when present.
Total comment count when present (stories/polls).
Parent item id for comments/pollopts.
≥ 0
Child item ids in ranked display order when present. Some list endpoints omit children and return an empty array.
≥ 0
Whether the item is marked dead. Some list endpoints omit this signal and return false.
Whether the item is marked deleted. Some list endpoints omit this signal and return false.
Canonical news.ycombinator.com item URL.
Root story when reachable within the depth cap; otherwise null.
Unique Hacker News item id.
≥ 0
Item type.
one of: story, comment, job, poll, pollopt, unknown
Author username when present.
Creation time as an ISO-8601 timestamp.
Plain-text title when present.
Plain-text body when present (HTML stripped).
External URL when present and publicly safe.
Score / votes when present.
Total comment count when present (stories/polls).
Parent item id for comments/pollopts.
≥ 0
Child item ids in ranked display order when present. Some list endpoints omit children and return an empty array.
≥ 0
Whether the item is marked dead. Some list endpoints omit this signal and return false.
Whether the item is marked deleted. Some list endpoints omit this signal and return false.
Canonical news.ycombinator.com item URL.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.
Code example
curl "https://api.socialfetch.dev/v1/hackernews/comments/2921983/context" \
-H "x-api-key: YOUR_API_KEY"Responses
Comment context result.