Back to articles
Hacker News Has a Free API — No Key, No Auth, No Limits

Hacker News Has a Free API — No Key, No Auth, No Limits

via Dev.to WebdevAlex Spinov

Hacker News serves 10+ million pageviews per day. And they give away ALL their data through a free Firebase API. No API key. No rate limits. No authentication. Just raw JSON. The API Base URL: https://hacker-news.firebaseio.com/v0/ That's it. No signup. No OAuth. No headers needed. Get the Top 500 Stories Right Now curl https://hacker-news.firebaseio.com/v0/topstories.json | python3 -m json.tool | head -20 Returns an array of up to 500 item IDs, sorted by rank. Get Any Story's Details curl https://hacker-news.firebaseio.com/v0/item/41967900.json { "by" : "dang" , "descendants" : 245 , "id" : 41967900 , "kids" : [ 41968234 , 41968567 , ... ], "score" : 834 , "time" : 1711234567 , "title" : "Show HN: Something cool" , "type" : "story" , "url" : "https://example.com" } You get: author, score, comment count, timestamp, URL, title. Everything. Useful Endpoints Endpoint What it returns /topstories.json Top 500 stories (by rank) /newstories.json Newest 500 stories /beststories.json Best 500 s

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
6 views

Related Articles