Hacker News API
Search mentions, track feeds, pull comment trees, mine user history and public favorites, and parse Who is Hiring — one Social Fetch key and envelope.
Why teams use Social Fetch for Hacker News
Hacker News is where brand mentions, launches, Show HN products, and hiring threads still move markets. Social Fetch turns that into a metered marketplace surface for search and discovery, authoritative items/feeds/users/comment topology, plus a narrow path for public favorites.
Routes cover the jobs people actually run — keyword monitoring, front-page digests, full comment trees, author history, public favorites, structured Who is Hiring rows, and freshness polls — all under the same `{ data, meta }` envelope as the rest of the catalog.
What Hacker News data can you get?
- Full-text search with author, domain/url, and minPoints filters for brand and launch monitoring.
- Ranked feeds: top, new, best, ask, show, and jobs with hydrated items.
- Story lookup, polymorphic item get, and cursor-paginated comment trees.
- User profiles plus submissions, comments, and public favorites (private favorites return a typed status).
- Structured Who is Hiring pages and thin updates/maxitem helpers for corpus freshness.
Hacker News API endpoints
Routes from the live API catalog. Open an endpoint for parameters and examples — credit notes come from OpenAPI pricing extensions.
Profiles & channels
Lists & graphs
Content
Search & discovery
Comments
Jobs
Other
How to call the Hacker News API
1. Create an API key
Sign up at Social Fetch and copy a key (`sfk_…`). New accounts get 100 free credits — enough to search, page a feed, resolve a classic story, and sample a hiring thread.
2. Call the matching route
Use search for mentions, feeds for digests, stories/comments for discussions, users/* for author analysis, and `/jobs/who-is-hiring` for structured hiring rows. Authenticate with `x-api-key`.
3. Store beside other marketplace rows
Branch on `data.lookupStatus` where present. Log `meta.requestId`; bill from `meta.creditsCharged`. Cursor pages (comments, user activity, hiring) cost 1 credit per successful page.
How much does the Hacker News API cost?
Each Hacker News route charges 1 credit per successful completed request or page, including cursor continuations and favorites pages. Credits never expire on pay-as-you-go packs. Confirm every response with `meta.creditsCharged`.
Social Fetch vs the official Hacker News API
Hacker News publishes public APIs for items, feeds, and full-text search. Favorites remain HTML-only on news.ycombinator.com — Social Fetch allowlists only that path family. Use Social Fetch when HN should hydrate next to Reddit or Web rows under the same API key.
Hacker News API FAQ
Is there a Hacker News scraper API?
Yes. Social Fetch provides search, feeds, stories, comments, items, user history, public favorites, Who is Hiring, and update polls under `/v1/hackernews`. Authenticate with a Social Fetch API key (`x-api-key`).
Can I get a user's favorites?
Yes for public favorites via `GET /v1/hackernews/users/{username}/favorites`. Private favorites return `lookupStatus: private_or_unavailable`. Upvoted pages are not supported.
Do you structure Who is Hiring threads?
Yes. `GET /v1/hackernews/jobs/who-is-hiring` discovers the monthly thread and returns top-level comments as rows with best-effort company/role/location fields plus the full plain-text body. Structured fields may be null; text is always the source of truth.
How much does the Hacker News API cost?
You buy credit packs (or use the 100 free signup credits). Each successful request or page costs 1 credit, including cursor continuations. Always check `meta.creditsCharged`.
Does HTTP 200 always mean the story or user was found?
No. HTTP 200 means the request finished. Check `data.lookupStatus` where the route exposes it (`found`, `not_found`, `not_story`, `not_comment`, or `private_or_unavailable`). Persist `meta.requestId` when you need to debug a miss.
Is scraping Hacker News data legal?
Social Fetch returns publicly visible HN data via documented public APIs and the public favorites HTML page. You are responsible for how you use it under Y Combinator's terms, applicable law, and your own compliance review. We do not give legal advice.
Start with Hacker News data
Create an account, spend the 100 free credits on live Hacker News routes, then buy a pack when the JSON fits your pipeline. Credits do not expire on pay-as-you-go packs.