Introducing the Instagram APIRead more →

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

Stories a user saved, with points and comments. We handle the proxies, blocks and platform changes.

In your agent: Hacker News MCP server →

Hacker News User Favorites API at a glance

Returns the stories a Hacker News user marked as favorites, from a username or a link to the user. Each story comes with its title, the page it links to, its text as plain text, exact points and comment count, the author and posting time, and a poll's options with their points. An unknown username returns not_found.

GET /v1/hackernews/user_favorites

Read the API reference
  • 1 credit per page, $0.75–$1.97 per 1,000 pages
  • 23 typed fields null when unknown
  • 30 stories per page, most recently favorited first, as the user's favorites page lists them; not by posting time
  • handle is all it needs, e.g. simonw

Send one request. Get up to 30 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 = simonw
GET /v1/hackernews/user_favoritesTry in
const params = new URLSearchParams({
  handle: "tptacek",
});
const res = await fetch(`https://socialtap.dev/v1/hackernews/user_favorites?${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_favoritesLong 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, favorites?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 Favorites API.

  • See which stories a known reader keeps

  • Build reading lists from curated favorites

  • Find Ask HN and Show HN posts people saved

  • Compare what two users found worth saving

Good to know before you build.

  • Stories come in the order the user favorited them, the most recent first, not by posting time.
  • Usernames are case-sensitive on Hacker News: a username in the wrong case returns not_found.
  • Only favorite stories are returned. Hacker News also lets users favorite comments, which this endpoint leaves out, so a link to a user's favorite comments (favorites?id=pg&comments=t) returns that user's favorite stories.
  • A favorite that was deleted or killed on Hacker News is left out, and the page's warnings say how many.
  • If a story can't be read from Hacker News' API, the page still returns every story from the favorites list, with text, platform_type and poll options null and a partial_data warning.

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
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 Favorites API.

More in the API reference.

How much does the Hacker News User Favorites API cost?
A page of up to 30 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