Introducing the Instagram APIRead more →

Hacker News User Stories API. Stories, page by page.

Every story a user posted, newest first. We handle the proxies, blocks and platform changes.

In your agent: Hacker News MCP server →

Hacker News User Stories API at a glance

Returns every public story a Hacker News user posted, newest first, from a username or a link to the user. Links, Ask HN, Show HN and Launch HN posts, jobs and polls, filtered by type or date if you like. Each story has its title, the page it links to, its text as plain text, points and comment count, and its posting time. An unknown username returns not_found.

GET /v1/hackernews/user_stories

Read the API reference
  • 1 credit per page, $0.75–$1.97 per 1,000 pages
  • 23 typed fields null when unknown
  • 100 stories per page, newest first
  • handle is all it needs, e.g. pg

Send one request. Get up to 100 stories 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
handle = pg
GET /v1/hackernews/user_storiesTry in
const params = new URLSearchParams({
  handle: "pg",
});
const res = await fetch(`https://socialtap.dev/v1/hackernews/user_stories?${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, page, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/hackernews/user_storiesLong arrays and strings are shortened here. Real responses are complete.Docs

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 Hacker News user: a username (case-sensitive: pg, not PG) or a link to the user's page or one of its lists (news.ycombinator.com/user?id=pg, submitted?id=pg).

  • 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 User Stories API.

  • See everything a founder or researcher has shared

  • Track a user's Show HN launches

  • Collect a company account's job posts

  • Study what a prolific submitter posts over the years

Good to know before you build.

  • Usernames are case-sensitive on Hacker News: a username in the wrong case returns not_found.
  • Stories come from HN Search, which copies every story within minutes: points and comment counts are as of its last update of the story. The walk goes back to the user's first story, with no cap on how far.
  • Stories Hacker News killed or that were deleted are left out. A user who posted only comments gets an empty list.
  • A poll lists its options by ID only: the Hacker News Story API returns their text and points.
  • When HN Search fails, stories come from the user's submissions page on Hacker News, which lists no jobs and no story's text: text is null there, and a poll looks like a text story. That fallback serves kind=all only.

1 credit per page. Failed requests are free.

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

SourcePrice per successful pagePer 1,000 pages
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 User Stories API.

More in the API reference.

How do I get only a user's Show HN posts?
Send kind=show_hn with the username.
Can I get every story a user ever posted?
Yes. Follow page.next_cursor: the walk goes back to the user's first story, with no cap on how far.
How much does the Hacker News User Stories API cost?
A page of up to 100 stories costs 1 credit. Every successful page is charged, empty pages included. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.
How do I get the next page?
Repeat the same request with cursor set to page.next_cursor from the previous response, keeping the other parameters. When page.has_more is false there are no more pages. Cursors expire after 24 hours.

Try it on an account you know.

Paste its handle or link 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