GroundsocialDocs

API · Hacker News

GET /hackernews/items/{id}

One Hacker News item: story, comment, job or poll.

RequestGET /v1/hackernews/items/{id}
Operation idhackernews.story.get
Cost1 credit, refunded if the call fails
AuthAPI key: Authorization: Bearer <key> or x-api-key.

One Hacker News item: story, comment, job or poll.

Path parameters

NameTypeRequiredDescription
idstringyesAn item id or its link (news.ycombinator.com/item?id=…). Example: 8863.

Responses

StatusMeaningSchema
200The item.HackerNewsItem
400Invalid input. Nothing was charged.Error
401Missing or invalid API key.Error
402Not enough credits, a spend cap was reached, or payment is required.Error
403The target is private, or the account is suspended.Error
404The item or user does not exist.Error
429Too many requests. Wait for Retry-After seconds.Error
503Hacker News is temporarily unavailable. Retryable; nothing was charged.Error

HackerNewsItem fields

FieldTypeDescription
idinteger
type"story" | "comment" | "job" | "poll" | "pollopt"
bystringAuthor username.
timeintegerUnix seconds.
titlestring
urlstring
textstringHTML.
scoreinteger
descendantsintegerTotal comment count.
kidsinteger[]Direct reply ids, ranked.
parentinteger
pollinteger
partsinteger[]
deletedboolean
deadboolean

Errors use one shape everywhere; see Errors for every code and what to do.