Introducing the Instagram APIRead more →

Hacker News Story API. Send a story link or ID.

Story, job or poll with exact points and comment count. We handle the proxies, blocks and platform changes.

In your agent: Hacker News MCP server →

Hacker News Story API at a glance

Returns a public Hacker News story from its link or item ID: a link, an Ask HN or Show HN post, a job or a poll. You get the title, the page it links to, its text as plain text, exact points and comment count, the author and posting time, and every option of a poll with its points. A deleted story returns not_found.

GET /v1/hackernews/story

Read the API reference
  • 1 credit per request, $0.75–$1.97 per 1,000 requests
  • 23 typed fields null when unknown
  • url is all it needs, e.g. https://news.ycombinator.com/item?id=8863
  • 100 credits free when you sign up, no card, so you can build before you spend

Send one request. Get 23 fields back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
url = https://news.ycombinator.com/item?id=8863
GET /v1/hackernews/storyTry in
const params = new URLSearchParams({
  url: "https://news.ycombinator.com/item?id=8863",
});
const res = await fetch(`https://socialtap.dev/v1/hackernews/story?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/hackernews/storyDocs

One schema on 22 platforms.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field Hacker News doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • What it accepts

    The story: its link on Hacker News (news.ycombinator.com/item?id=8863, any other query parameters or #fragment kept out) or its item ID alone (8863).

  • Write one parser

    Hacker News, TikTok, Instagram and 19 more platforms answer in these fields, so the code that reads one reads them all.

platformstring
Platform ID (tiktok, youtube, …).
idstring
Platform-native post ID (string; Instagram shortcode, Reddit with its t3_ prefix).
urlstring
Canonical post URL.
typestring
Normalized content shape. New values may be added; treat unknown values as other.
platform_typestring
The platform's own product label, lowercase (reel, short, story, live, tweet, …).
titlestring
Headline (YouTube title, Reddit title); null on caption-only platforms.
textstring
Caption, description or body as plain text.
link_urlstring
The page the post links to: a link post's target, a pin's destination, or the page its link card or link sticker opens; null when it links to none.

What teams build with the Hacker News Story API.

  • Track a story's points and comments over time

  • Archive Ask HN and Show HN posts as plain text

  • Collect a poll's results option by option

  • Read job posts from YC companies

Good to know before you build.

  • Hacker News calls every submission a story, so jobs and polls come back here too: platform_type says which.
  • Stories, comments and poll options share one ID counter. A comment's ID or link returns invalid_input naming where to send it, and a poll option's names its poll.
  • A story Hacker News killed returns private_or_unavailable: logged out, its page shows only [dead].
  • If one of a poll's options can't be read, the poll comes back without its options and with a partial_data warning.
  • Comments are not part of this response. A job has no comment count, and when it is read from its page, which hides them, its poster and points are null too.

1 credit per request. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful requestPer 1,000 requests
Platform API api1 credit$0.75–$1.97
Public page page1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the Hacker News Story API.

More in the API reference.

How much does the Hacker News Story API cost?
A request costs 1 credit. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.

Try it on a link you already have.

Paste it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 276 endpoints
Start for free Read the docs