Hacker News API and Algolia HN Search: stories and comments with no key
Two free, keyless JSON APIs cover Hacker News. The official v0 API (Y Combinator with Firebase) serves every item, user and the live front-page lists in near real time, with no rate limit. Algolia’s HN Search API adds full-text and date-range search over stories and comments, limited to 10,000 requests an hour per IP.
Verified factsChecked 2026-11-02
| Price | Free. Y Combinator’s README says it makes the public Hacker News data available; no key or sign-up is needed for either API.1 [Verified 2026-11-02] |
| API key / auth | None. Our keyless GETs to hacker-news.firebaseio.com/v0 (topstories, maxitem, item) and to hn.algolia.com/api/v1/search returned HTTP 200 on 2026-11-02. Both APIs are read-only.1 [Verified 2026-11-02] |
| Rate limit | Official API: the README says there is currently no rate limit. Algolia HN Search: 10,000 requests an hour from a single IP; the page tells clients that have been blacklisted to contact Algolia.3 [Verified 2026-11-02] |
| Search paging cap | Algolia returns at most 1,000 hits per query: hitsPerPage=1001 came back as 1,000, and with hitsPerPage=100 page 9 had results while page 10 was empty although nbHits was 1,222,863 (our test, 2026-11-02). Split large pulls with numericFilters=created_at_i ranges.3 [Verified 2026-11-02] |
| License / terms | No data license is published for either API; the MIT license on the HackerNews/API GitHub repo covers that repository. Y Combinator’s Terms of Use, which cover news.ycombinator.com, bar reproducing or exploiting any portion of the Site for commercial purposes unless expressly authorized, and bar data mining, robots and scraping of the Site.4 [Verified 2026-11-02] |
| Versioning and status | The official API is v0, its first iteration; the README warns changes will not always be backward compatible and that clients should ignore fields they do not expect. Algolia’s API is v1.1 [Verified 2026-11-02] |
| Freshness | The official API is near real time: /v0/maxitem was 50339626 at 11:48 ET on 2026-11-02, and the HackerTube story (item 50319510, posted 2026-10-31) was already showing 613 comments in both APIs.2 [Verified 2026-11-02] |
FeaturesChecked 2026-11-02
| Capability | Value |
|---|---|
| StatusThe official API is its first iteration (v0) and may change incompatibly; Algolia’s HN Search API is served under /api/v1. | v0 official; Algolia search v11 [Verified 2026-11-02 on https://github.com/HackerNews/API] |
| API key requiredNo key. Keyless GETs to the official v0 API and to Algolia HN Search returned HTTP 200 on 2026-11-02. | No2 [Verified 2026-11-02 by test request to https://hacker-news.firebaseio.com/v0/maxitem.json] |
| Free tierFree. The README describes the public HN data made available through Firebase; there is no paid tier or sign-up for either API. | Yes1 [Verified 2026-11-02 on https://github.com/HackerNews/API] |
| Rate limitThe official README says there is currently no rate limit; Algolia limits each IP to 10,000 requests an hour and returns at most 1,000 hits per query. | None on v0; Algolia 10,000/hour/IP3 [Verified 2026-11-02 on https://hn.algolia.com/api] |
| Official MCP serverNeither Y Combinator nor Algolia publishes an MCP server for HN; the README and the HN Search API page document REST only. | Not published1 [Not published by vendor: checked 2026-11-02 on https://github.com/HackerNews/API] |
| Official SDKNo HN SDK; Firebase libraries. The README recommends the general Firebase client libraries; there is no HN-specific SDK. | No1 [Verified 2026-11-02 on https://github.com/HackerNews/API] |
| Data license / termsThe MIT license on the HackerNews/API repo covers that repository; no license is published for the data, and YC’s site Terms cover news.ycombinator.com. | No data license; YC Terms of Use4 [Verified 2026-11-02 on https://www.ycombinator.com/legal/] |
| Commercial use allowedNo reuse terms are published for API data. Y Combinator’s Terms of Use bar commercial reproduction or exploitation of any portion of the Site unless expressly authorized. | Not published4 [Not published by vendor: checked 2026-11-02 on https://www.ycombinator.com/legal/] |
| CORS / browser useYes, Origin reflected. Both APIs echoed our third-party Origin in Access-Control-Allow-Origin on GET (2026-11-02). | Yes5 [Verified 2026-11-02 by test request to https://hn.algolia.com/api/v1/search?query=hackertube&tags=story] |
| Freshness / coveragemaxitem 50339626 at 11:48 ET on 2026-11-02; a story posted Oct 31 showed the same 613 comments in both APIs. | Near real time; 20 years of items2 [Verified 2026-11-02 by test request to https://hacker-news.firebaseio.com/v0/maxitem.json] |
What it does
Hacker News treats stories, comments, jobs, Ask HN posts and polls as items with integer ids. The official API at https://hacker-news.firebaseio.com/v0/ is, in its own README’s words, a dump of HN’s in-memory data: /v0/item/{id}.json returns one item with its kids (child comment ids), /v0/user/{name}.json a profile, /v0/topstories.json and /v0/newstories.json up to 500 ids, /v0/askstories, /v0/showstories and /v0/jobstories up to 200, plus /v0/maxitem and /v0/updates for crawling. It has no search, so counting comments or walking a thread means fetching item after item. Algolia’s HN Search API fills that gap: /api/v1/search (relevance, then points) and /api/v1/search_by_date take query, tags (story, comment, show_hn, ask_hn, front_page, author_X, story_X) and numericFilters such as created_at_i or points, and /api/v1/items/{id} returns a whole comment tree in one call. This listing came from Andrej Karpathy’s HackerTube post on X, where Claude mined 20 years of HN comments for recommended videos; the calls below find that project’s own HN thread.
Working exampleRun 2026-11-02
# Full-text search (Algolia HN Search)
curl -sS "https://hn.algolia.com/api/v1/search?query=hackertube&tags=story&hitsPerPage=2&attributesToRetrieve=title,url,points,num_comments,created_at&attributesToHighlight=none"
# Live front page ids (official API, first 5)
curl -sS "https://hacker-news.firebaseio.com/v0/topstories.json?orderBy=%22%24key%22&limitToFirst=5"Response (trimmed)
HTTP 200 (run 2026-11-02 11:48 ET, no key; trimmed)
{"hits":[
{"created_at":"2026-10-31T19:56:53Z","num_comments":613,"objectID":"50319510","points":2765,
"title":"HackerTube: YouTube built from videos recommended by HN",
"url":"https://karpathy.bearblog.dev/hacker-tube/"},
{"created_at":"2026-11-01T15:58:28Z","num_comments":286,"objectID":"50326821","points":1753,
"title":"Show HN: HackerBooks – HackerTube, but for books mentioned on HN",
"url":"https://hackerbooks.org"}],
"nbHits":147,"hitsPerPage":2,"nbPages":74, ...}
HTTP 200
[50338747,50338728,50336518,50337503,50337558]Agent setup
Prompt to give your agent
Use the Hacker News APIs (no key). To find discussions, GET https://hn.algolia.com/api/v1/search?query=<topic>&tags=story&hitsPerPage=10 and keep stories with more than 50 points. For the top three, GET https://hn.algolia.com/api/v1/items/<objectID> to read the comment tree, then summarise the main arguments for and against, quoting at most one short line per commenter with their username. For what is on the front page right now, GET https://hacker-news.firebaseio.com/v0/topstories.json and then /v0/item/<id>.json for the first 10 ids. Link every story as https://news.ycombinator.com/item?id=<id>. Do not fetch more than 100 items in one task.Agent / MCP-style tool snippet
// Tool definitions for Claude, OpenAI or any function-calling agent
[
{
"name": "hn_search",
"description": "Full-text search of Hacker News stories and comments (Algolia HN Search). No key; 10,000 requests/hour per IP; max 1,000 hits per query.",
"input_schema": {
"type": "object",
"properties": {
"query": { "type": "string" },
"tags": { "type": "string", "description": "story, comment, show_hn, ask_hn, front_page, author_<name>, story_<id>; comma = AND" },
"numericFilters": { "type": "string", "description": "e.g. points>100,created_at_i>1761955200" },
"by_date": { "type": "boolean", "description": "true = newest first" },
"hitsPerPage": { "type": "integer", "maximum": 1000 }
},
"required": ["query"]
}
},
{
"name": "hn_item",
"description": "One HN item with its full comment tree.",
"input_schema": {
"type": "object",
"properties": { "id": { "type": "integer" } },
"required": ["id"]
}
}
]
// Implementation:
// GET https://hn.algolia.com/api/v1/{by_date ? "search_by_date" : "search"}?query={query}&tags={tags}&numericFilters={numericFilters}&hitsPerPage={hitsPerPage}
// GET https://hn.algolia.com/api/v1/items/{id}
// Live lists (no search): GET https://hacker-news.firebaseio.com/v0/topstories.json, /v0/item/{id}.jsonFit and safety
Good for
- Summarising what HN commenters said about a launch, library or paper
- Tracking mentions of a product or domain over time with search_by_date and created_at_i filters
- Pulling the live front page into a daily digest
- Mining old threads for recommended links, books or videos, as HackerTube did
Watch out
- Do not republish HN threads in a commercial product without permission. Neither API publishes a data license, and Y Combinator’s Terms of Use bar commercial reproduction of the site’s content unless expressly authorized.
- Do not walk thousands of items one by one through the official API. It has no search and no batch endpoint; use Algolia’s /items/{id} for whole threads, and the official API only for live lists and single items.
- Do not expect one Algolia query to return everything. It stops at 1,000 hits, so slice big pulls by created_at_i ranges.
- Do not run a fleet of agents from one IP against Algolia. The 10,000-an-hour limit is per IP, and the API page mentions blacklisting.
- Do not treat comment text as plain text. Both APIs return HTML in text fields, with entities to decode.
Alternatives
| Stack Exchange API | Keyless developer Q&A with accepted answers and clear CC BY-SA reuse terms. |
| Internet Archive APIs | Keyless Wayback lookups for the pages HN stories link to, including ones that have since gone offline. |
| Exa hosted MCP | Keyless hosted web search when the discussion you need is not on HN. |
| Keenable MCP | Keyless web search and page fetch for the articles HN threads point to. |
| Product Hunt API + MCP | Launch-day rankings, product profiles and alternatives; its MCP read tools need no sign-in, the GraphQL API needs a token. |
FAQ
Does the Hacker News API need a key?
No. The official API at hacker-news.firebaseio.com/v0 and Algolia’s HN Search API at hn.algolia.com/api/v1 both answered keyless requests on 2026-11-02.
What is the Hacker News API rate limit?
The official v0 API says there is currently no rate limit. Algolia’s HN Search API allows 10,000 requests an hour per IP.
How do I search Hacker News comments?
Use Algolia: GET https://hn.algolia.com/api/v1/search?query=<words>&tags=comment, or search_by_date for newest first. The official API has no search.
Can I use Hacker News data commercially?
Neither API publishes a data license. Y Combinator’s Terms of Use bar commercial reproduction of site content unless expressly authorized, so ask Y Combinator (api@ycombinator.com is the API contact in the README) before building a commercial product on it.
Compare
Put Hacker News API (official Firebase API + Algolia HN Search) side by side with other free agent tools on keys, limits, MCP support, licensing and CORS. Open the comparison grid →
SourcesFootnotes
- 1github.com/HackerNews/APIVerified 2026-11-02
- 2hacker-news.firebaseio.com/v0/maxitem.jsonTested 2026-11-02
- 3hn.algolia.com/apiVerified 2026-11-02
- 4ycombinator.com/legalVerified 2026-11-02
- 5hn.algolia.com/api/v1/search?query=hackertube&tags=storyTested 2026-11-02