Hacker GitHub

← All repos

HackerNews/API

View on GitHub ↗ ★ 13,396

Documentation and Samples for the Official HN API

257 mentions on Hacker News by 206 people: 37 stories, 220 comments · first 2014-10-07 · latest 2026-10-31

Mentions per year 257 mentions · busiest year 2023 (30)
20082026
  1. HN's Firebase-based API ( https://github.com/hackernews/api ) makes that easy, until you want to reconstruct the threads (i.e. who replied to who) and then it's annoying. For years* I've wanted to replace that API with one we operate…
  2. HN data is accessible through the Firebase API: https://github.com/hackernews/api You don't need to as much as parse HTML to read it. Building a client by hand in C even should be pretty painless as long as you don't write your JSON parser…
    comment by nateb2022 · 2026-09-28 · in Show HN: Hntui – A TUI for Hacker News
  3. HN has an officially sanctioned API - https://github.com/hackernews/api - which makes all of this data available
  4. They have an API endpoint you can use. https://github.com/HackerNews/API
  5. HN is exported to firebase, which you can hit directly, for that sort of purpose https://github.com/HackerNews/API
  6. https://github.com/HackerNews/API/blob/master/LICENSE It's right there, you just have to click the link I shared ...
  7. Oh, now I see my comment might be a bit harsh. I didn't consider you might now know about: https://github.com/hackernews/api
  8. It's on firebase, per https://github.com/hackernews/api
  9. $ wget -4 https://github.com/HackerNews/API Resolving github.com (github.com)... 140.82.114.4 Connecting to github.com (github.com)|140.82.114.4|:443... failed: Network is unreachable. $ git clone https://github.com/HackerNews/API Cloning…
    comment by Dagger2 · 2026-06-23 · in Google Hits 50% IPv6
  10. > I asked AI to scrape HN comments Did the AI use the API? (linked at the bottom) https://github.com/HackerNews/API > All this really got me thinking, with a sufficient amount of data, you could eventually make something that looks…
  11. the official HN api which is firebase under the hood https://github.com/hackernews/api
  12. Hacker News has an API: https://github.com/HackerNews/API
  13. …and phone. Honestly, any reasonably modern LLM could probably crank one out for you in 10 minutes. https://github.com/HackerNews/API
  14. …[0] does return booleans for those fields. That is, a state, not a type of deletion or death. [0] https://github.com/HackerNews/API
  15. Have you tried with https://github.com/HackerNews/API ?
    comment by gus_massa · 2026-03-18 · in Ask HN: Can you access old HN posts?
  16. …me get more details on the official Hacker News API and some specific library documentation. Fetch(https://github.com/HackerNews/API) ⎿ Received 373.8KB (200 OK) Fetch(https://pypi.org/project/hackernews-python/) ⎿ Received 3KB (200 OK)…
    comment by rovr138 · 2026-01-31 · in Claude Code is your customer
  17. https://github.com/HackerNews/API
  18. …not a dump per se, there is an API where you can get HN data programmatically, no scraping needed. https://github.com/HackerNews/API
    comment by thomasmarton · 2025-12-30 · in Show HN: 22 GB of Hacker News in SQLite
  19. Don't scrape. Use the API: https://github.com/HackerNews/API
  20. Link to the API https://github.com/HackerNews/API (copied from the bottom of the page)
  21. The community can make whatever UI it wants, using the API: https://github.com/HackerNews/API I wrote one for myself: https://hn.unlurker.com Or there are various ways to restyle the main site with a browser script.
    comment by jasonthorsness · 2025-11-21 · in Ask HN: Why doesn't Hacker News improve its UI?
  22. Perhaps @kogir, who was active on https://github.com/HackerNews/API could add the thread id.
    comment by esafak · 2025-10-10 · in Hacker News Live Feed
  23. That sounds interesting, are there any public details on this? Is it https://github.com/HackerNews/API ?
    comment by lxgr · 2025-10-09 · in Hacker News Live Feed
  24. …https://github.com/jerbear2008/hn-live And live firebase source/api (run by HN) used for this: https://github.com/HackerNews/API (just making sure it's obvious - I didn't create this site! all credits to @jerbear4328 who is here on HN -…
    comment by gregsadetsky · 2025-10-09 · in Hacker News Live Feed
  25. https://github.com/HackerNews/API
    comment by throw-the-towel · 2025-09-18 · in Ask HN: Dark Mode for HN?
  26. https://github.com/HackerNews/API?tab=readme-ov-file You can use the API to find some of these answers.
  27. Thanks. Currently i am using the HN api ( https://github.com/HackerNews/API ) . It's a read only API and doesn't support writes. I heard that might be away to do this with a webview initially, haven't explored that yet.
    comment by krishnasangeeth · 2025-07-08 · in Show HN: HN client app that remembers reading history
  28. …) as per their api documentation [1], it might be linked to firebase, which might explain this? [1] https://github.com/HackerNews/API
    comment by rldjbpin · 2025-06-13 · in GCP Outage
  29. …for a long time. We don't publish data to them except in the sense that we publish it to everybody: https://github.com/HackerNews/API . I think their page gives a misleading impression that the project is somehow official, when it's not (…
    comment by cwillu · 2025-05-20 · in Show HN: Chat with 19 years of HN
  30. …for a long time. We don't publish data to them except in the sense that we publish it to everybody: https://github.com/HackerNews/API . I think their page gives a misleading impression that the project is somehow official, when it's not (…
    comment by dang · 2025-05-18 · in Show HN: Chat with 19 years of HN
  31. …learn about how we think about these things [1]). There are plenty of ways of examining the data: - https://github.com/HackerNews/API - https://news.ycombinator.com/item?id=40644563 - https://hn.algolia.com/ -…
  32. …the Text-to-Speech accessibility button in their browser, really (albeit with better voices). [0]: https://github.com/HackerNews/API
  33. …com/ClickHouse/ClickHouse/issues/29693#issuec... And ofc, for those that don't know, the official API https://github.com/HackerNews/API
  34. https://github.com/HackerNews/API https://hacker-news.firebaseio.com/v0/user/perching_aix.json... it's fairly easy to export your data. I find the quality level comes and goes on HN, but overall it's still much higher than anywhere else…
    comment by luckylion · 2025-04-13 · in A Reddit bot drove me insane
  35. …to look at publicly [5] [1] https://console.cloud.google.com/bigquery?p=bigquery-public-... [2] https://github.com/HackerNews/API?tab=readme-ov-file [3] https://hn.algolia.com/api [4] https://github.com/user-attachments/assets/a97ba432-d6dd…
  36. It's public... You can download the whole thing https://github.com/HackerNews/API Gets surveilled by people like me. Trying to find "interesting" content in a large archive is pretty difficult, see https://news.ycombinator.com/item?id=43344…
    comment by PaulHoule · 2025-03-12 · in Tell HN: US Government is surveilling HN
  37. …the "Top Comments" is sourced from the "kids" field of the "items" endpoint. As the API docs ( https://github.com/HackerNews/API?tab=readme-ov-file#items ) says, it is "in ranked display order" so I just used it to sort the top comments.
  38. I misread completely and read "this site" as hn, which greatly confused me because: https://github.com/HackerNews/API Then I realized I also didn't get the sarcasm.
  39. > Fairly certain HN itself is built on [firebase] The HN API is indeed https://github.com/HackerNews/API
  40. …to the world for the specific purpose of making it easy for anyone to analyze our comments here. ( https://github.com/HackerNews/API ) No comments you write on the Internet have ever been temporary. They stopped even pretending to be so…
  41. https://github.com/HackerNews/API
    comment by gabrielsroka · 2024-07-10 · in I created a Hacker News redesign
  42. Are you crawling the HN via the normal website? It’s better to use the API. https://github.com/HackerNews/API
    comment by codetrotter · 2024-07-03 · in Show HN: I made a search engine for Hacker News
  43. …enough, initially I allowed usernames to be case sensitive because of what was said on this API https://github.com/HackerNews/API?tab=readme-ov-file#users . But after feedback ( https://news.ycombinator.com/threads?id=mmarian#40857404 )…
  44. …I'll update both asap. Funnily enough, I assumed the usernames are case-sensitive based on this https://github.com/HackerNews/API?tab=readme-ov-file#users so I didn't bother testing. I was wrong :)
  45. …you point to does not cover HN posts. [1] https://huggingface.co/datasets/OpenPipe/hacker-news [2] https://github.com/HackerNews/API
  46. …dataset is entirely 3rd party, based on the public HN data (presumably via the HN Firebase API - https://github.com/HackerNews/API ), so anyone is free to do this.
  47. Or HN's actual API, which isn't rate limited: https://github.com/HackerNews/API
  48. fwiw, the API (described here https://github.com/HackerNews/API ) will just give you json, eg https://hacker-news.firebaseio.com/v0/item/40564831.json?pri...
  49. Hey! This leverages the official HN API ( https://github.com/HackerNews/API ), no scraping involved. I don't think it's my place to opine on "who owns the posts".
  50. …⁰ using the official HN API ¹ ⁰ https://github.com/gabrielsroka/gabrielsroka.github.io/blob/... ¹ https://github.com/HackerNews/API