The official Hacker News API is a read-only Firebase database at https://hacker-news.firebaseio.com/v0: everything — stories, comments, polls, jobs — is an item with a numeric id. For search, HN uses Algolia's public API. Every example below runs as-is.
None, and no stated rate limit on the Firebase API. Lists like topstories return ids only; fetch each item separately.
Full reference: https://github.com/HackerNews/API
Ids of the current front page, best first. The full list is 500; Firebase's orderBy + limitToFirst trims it.
curl 'https://hacker-news.firebaseio.com/v0/topstories.json?orderBy=%22$key%22&limitToFirst=5'
[
49820134,
49817469,
49821196,
49820065,
49821925
]
A story, comment, or poll by id. kids are the ids of its direct replies (trimmed below). Item 8863 is Dropbox's launch post.
curl https://hacker-news.firebaseio.com/v0/item/8863.json
{
"by": "dhouston",
"descendants": 71,
"id": 8863,
"kids": [
9224,
8917,
8884,
8887,
8952
],
"score": 104,
"time": 1175714200,
"title": "My YC app: Dropbox - Throw away your USB drive",
"type": "story",
"url": "http://www.getdropbox.com/u/2/screencast.html"
}
Karma, account age (Unix time), bio, and every item they've submitted (trimmed below).
curl https://hacker-news.firebaseio.com/v0/user/pg.json
{
"id": "pg",
"created": 1160418092,
"karma": 157316,
"about": "Bug fixer.",
"submitted": [
39667625,
37278578,
37278345
]
}
Full-text search, most relevant first. Use search_by_date instead of search for newest first.
curl "https://hn.algolia.com/api/v1/search?query=curl&tags=story&hitsPerPage=2"
{
"hits": [
{
"title": "Curl will not accept vulnerability reports during July 2026",
"url": "https://daniel.haxx.se/blog/2026/06/15/curl-summer-of-bliss/",
"author": "secret-noun",
"points": 793,
"num_comments": 316,
"created_at": "2026-06-15T06:02:57Z",
"objectID": "48537165"
},
{
"title": "Cisco Fixes RV320/RV325 Vulnerability by Banning “curl” in User-Agent",
"url": "https://twitter.com/RedTeamPT/status/1110843396657238016",
"author": "pjf",
"points": 734,
"num_comments": 310,
"created_at": "2019-03-27T23:14:35Z",
"objectID": "19507225"
}
],
"nbHits": 92023,
"page": 0,
"hitsPerPage": 2
}