HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
HackerNews
API
Learning & Reference2014–2026
HackerNews / API

API

Documentation and Samples for the Official HN API

206Distinct people
257Mentions
2Explicit recommenders
13.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Documentation and Samples for the Official HN API

GitHub

Where it is used

  • Hacker News Scraper & API — Hacker News Scraper & API: Stories, Who is Hiring uses the official Hacker News API to fetch HN data for its outputs. It relies on the HN Firebase API as part of those official APIs. Source
  • Haiker — Haiker uses the official Hacker News API to retrieve and display content from Hacker News within the app. Source

What people are saying

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…

dang used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 6:01:08 PM UTC.

Mentions over time

HN mentions by year257 dated mentions

Observed mentions: 2014-10-07 17:49:07 UTC to 2026-10-31 21:56:35 UTC.

01020302014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 9 mentions; 3 submissions, 6 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 20 mentions; 4 submissions, 16 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 17 mentions; 3 submissions, 14 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 21 mentions; 6 submissions, 15 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 14 mentions; 1 submissions, 13 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 23 mentions; 4 submissions, 19 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 23 mentions; 3 submissions, 20 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 28 mentions; 4 submissions, 24 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 30 mentions; 6 submissions, 24 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 27 mentions; 3 submissions, 24 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 19 mentions; 0 submissions, 19 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 17 mentions; 0 submissions, 17 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC936
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC909
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC20416
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC17314
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC21615
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC14113
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC23419
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC23320
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC28424
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC30624
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC27324
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC19019
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC17017

From the project README

An excerpt from the repository, fetched Nov 12, 2026.

Read the project’s introduction
Hacker News API Overview In partnership with Firebase, we're making the public Hacker News data available in near real time. Firebase enables easy access from Android, iOS and the web. Servers aren't left out. If you can use one of the many Firebase client libraries, you really should. The libraries handle networking efficiently and can raise events when things change. Be sure to check them out. Please email api@ycombinator.com if you find any bugs. URI and Versioning We hope to improve the API over time. The changes won't always be backward compatible, so we're going to use versioning. This first iteration will have URIs prefixed with https://hacker-news.firebaseio.com/v0/ and is structured as described below. There is currently no rate limit. For versioning purposes, only removal of a non-optional field or alteration of an existing field will be considered incompatible changes. Clients should gracefully handle additional fields they don't expect, and simply ignore them. Design The v0 API is essentially a dump of our in-memory data structures. We know, what works great locally in memory isn't so hot over the network. Many of the awkward things are just the way HN works internally. Want to know the total number of comments on an article? Traverse the tree and count. Want to know the children of an item? Load the item and get their IDs, then load them. The newest page? Starts at item maxid and walks backward, keeping only the top level stories. Same for Ask, Show, etc. I'm not saying this to defend it - It's not the ideal public API, but it's the one we could release in the time we had. While awkward, it's possible to implement most of HN using it. Items Stories, comments, jobs, Ask HNs and even polls are just items. They're identified by their ids, which are unique integers, and live under /v0/item/<id>.json. All items have some of the following properties, with required properties in bold: Field Description id The item's unique id. deleted true if the item is deleted. type The type of item. One of "job", "story", "comment", "poll", or "pollopt". by The username of the item's author. time Creation date of the item, in Unix Time. text The comment, story or poll text. HTML. dead true if the item is dead. parent The comment's parent: either another comment or the relevant story. poll The pollopt's associated poll. kids The ids of the item's comments, in ranked display order. url The URL of the story. score The story's score, or the votes for a pollopt. title The title of the story, poll or job. HTML. parts A list of related pollopts, in display order. descendants In the case of stories or polls, the total comment count. For example, a story: https://hacker-news.firebaseio.com/v0/item/8863.json?print=pretty { "by" : "dhouston", "descendants" : 71, "id" : 8863, "kids" : [ 8952, 9224, 8917, 8884, 8887, 8943, 8869, 8958, 9005, 9671, 8940, 9067, 8908, 9055, 8865, 8881, 8872, 8873, 8955, 10403, 8903, 8928, 9125, 8998, 8901, 8902, 8907, 8894, 8878, 8870, 8980, 8934, 8876 ], "score" : 111, "time" : 1175714200, "title" : "My YC app: Dropbox - Throw away your USB drive", "type" : "story", "url" : "http://www.getdropbox.com/u/2/screencast.html" } comment: https://hacker-news.firebaseio.com/v0/item/2921983.json?print=pretty { "by" : "norvig", "id" : 2921983, "kids" : [ 2922097, 2922429, 2924562, 2922709, 2922573, 2922140, 2922141 ], "parent" : 2921506, "text" : "Aw shucks, guys ... you make me blush with your compliments.<p>Tell you what, Ill make a deal: I'll keep writing if you keep reading. K?", "time" : 1314211127, "type" : "comment" } ask: https://hacker-news.firebaseio.com/v0/item/121003.json?print=pretty { "by" : "tel", "descendants" : 16, "id" : 121003, "kids" : [ 121016, 121109, 121168 ], "score" : 25, "text" : "<i>or</i> HN: the Next Iteration<p>I get the impression that with Arc being released a lot of people who never had time for HN before are suddenly dropping in more often. (PG: what are the numbers on this? I'm envisioning a spike.)<p>Not to say that isn't great, but I'm wary of Diggification. Between links comparing programming to sex and a flurry of gratuitous, ostentatious adjectives in the headlines it's a bit concerning.<p>80% of the stuff that makes the front page is still pretty awesome, but what's in place to keep the signal/noise ratio high? Does the HN model still work as the community scales? What's in store for (++ HN)?", "time" : 1203647620, "title" : "Ask HN: The Arc Effect", "type" : "story" } job: https://hacker-news.firebaseio.com/v0/item/192327.json?print=pretty { "by" : "justin", "id" : 192327, "score" : 6, "text" : "Justin.tv is the biggest live video site online. We serve hundreds of thousands of video streams a day, and have supported up to 50k live concurrent viewers. Our site is growing every week, and we just added a 10 gbps line to our colo. Our unique visitors are up 900% since January.<p>There are a lot of pieces that fit together to make Justin.tv work: our video cluster, IRC server, our web app, and our monitoring and search services, to name a few. A lot of our website is dependent on Flash, and we're looking for talented Flash Engineers who know AS2 and AS3 very well who want to be leaders in the development of our Flash.<p>Responsibilities<p><pre><code> * Contribute to product design and implementation discussions\n * Implement projects from the idea phase to production\n * Test and iterate code before and after production release \n</code></pre>\nQualifications<p><pre><code> * You should know AS2, AS3, and maybe a little be of Flex.\n * Experience building web applications.\n * A strong desire to work on website with passionate users and ideas for how to improve it.\n * Experience hacking video streams, python, Twisted or rails all a plus.\n</code></pre>\nWhile we're growing rapidly, Justin.tv is still a small, technology focused company
Read the full README on GitHub

What Hacker News says

17 sources
relyks·Dec 20, 2017Submission

Ask HN: Way to access favorites of a user by HN API?

The API docs don't have user favorites listed as being accessible. (https://github.com/HackerNews/API) Is there a way to access a user's favorites by some type of API or through some other type of method? I find myself consistently using the favorites features to "bookmark" articles, so that I can read them in the future. I want to be able to search through the entries without manually going through each page.
1 points · Open discussion
One way to calculate this would be to use this controversy formula (https://math.stackexchange.com/a/318510/10887) on all comments of a user whose total karma exceeds a certain threshold, say 1000, and then add up those controversy scores. The problems is that the HackerNews API (https://github.com/HackerNews/API) only provides a total score for a comment, instead of up and down votes, so you'd have to modify your controversy formula to use an appropriate measure of dispersion instead (https://en.wikipedia.org/wiki/Statistical_dispersion). I'm not a statistician myself, so I can't help further.
In Ask HN: Who are the most controversial (yet still popular) HNers?
In a couple places it sounds like you're interested in scraping HN -- if that's the case there is an official API: https://github.com/HackerNews/API My own take on it in general is that for personal/research use I'm not morally opposed to scraping, even when it's in violation of the ToS, with two conditions: that it doesn't place an unreasonable burden on the server, and that it doesn't invade people's privacy. The legal significance of the ToS is murky at best (disclaimer: I'm not a lawyer) but if the site asks you specifically to stop scraping them or puts up a technical barrier you should stop (morally and, in the US at least, legally: see craigslist v 3taps)
In Ask HN: How do you feel about web scraping?
Hi! One related question, and one offtopic question. Do you happen to have any idea what actually happened internally with this? I ask this coming from the standpoint of "ouch, another example of ignored paying customers". Obviously this is a difficult question to answer generally, but extra detail about what happened has the potential to instantly pull this specific instance out of the generic "Google support is insufficiently human" bucket, which might be interesting. (Please note that I'm asking this to get the other side of the story about this, I'm not trying to shoot the messenger :) ) OK, now for my offtopic question. I think you're probably the perfect person to ask this. https://github.com/HackerNews/API (linked from the bottom of every HN page except the add-comment page) describes HN's Firebase-based API. The current API design
Read the rest
tends to require a lot of discrete requests to get at high-level information due to the fact that it doesn't support batching (and the page acknowledges this, with "It's not the ideal public API, but it's the one we could release in the time we had."). Now... that page also says "There is currently no rate limit." For some time I've wanted to track page votes over time. These are not logged, so this operation is necessarily very realtime. There are lots of posts, and when one of them goes viral the vote goes up very quickly. Perhaps you can see where this is going :) If I wanted to try and overcome the poor API design by requesting individual items every 500ms or 250ms, or 100ms.... or 50ms...... a) at what point am I likely to get hard IP-blocked? (I'm also wondering how bad it/I would be if I used a bunch of different IPs, at least in terms of technical load.) b) what rate should I tend to prefer so I can be nice to HN (I'm not sure what tier they're on)?
In Open sourcing the Firebase SDKs
This is awesome ! Congrats.. https://github.com/HackerNews/API The firebase API is excellent. I have been using that to keep http://searchhn.com up to date in real time. Also big query is updated every day with all comments and posts. https://bigquery.cloud.google.com/dataset/bigquery-public-da... This is what I started with to update the Searchera (https://searchera.io) index which powers Searchhn
In Tagger News takes a subset of HN articles, analyzes using ML, and applies tags
DungFu·May 8, 2017Submission

Hacker News API page is broken

https://hacker-news.firebaseio.com/ https://github.com/HackerNews/API It never loads and just shows: "There was an error completing your request" I have been checking the Hacker News API daily for a while now to see if this will start working, but it appears to be permanently be broken. Is there anything that Hacker News can do to get this to work (update in Firebase UI or setting fix)? I want to be able to use the new Firebase API to access the Hacker News data, but I can't download the proper google-services.json to get it working when the Firebase API page is broken. The API is awesome to have and hope that it can be fixed soon! :)
8 points · Open discussion
b5u·Apr 12, 2017Submission

Ask HN: Is there a list of open event streams to do stream processing on?

There are curated lists of open datasets (like https://datahub.io/) for anyone to in (side) projects and/or visualizations. I couldn't find a list of open streams of events (like https://wikitech.wikimedia.org/wiki/EventStreams or https://github.com/HackerNews/API or https://dev.twitter.com/streaming/overview ) that I could use for developing stream processing jobs. If you know any other, please share :)
32 points · Open discussion
Good points! I use the official Hacker News API [1] and my requests come from an ip address that is completely disconnected from my personal account. Even if the API usage were a red flag, there would be no way to automatically connect it to me. You're definitely right about there being miscellanious rules in there. Something that I mentioned in passing in the article is that many stories exhibit a significant drop in position once they're 15 hours old. If you look closely at the typical story trajectories you can also see various other jumps of about 10-30 positions which I would guess are triggered by these various rules. The stories listed in the article exhibit very different behavior where they jump hundreds of positions instantaneously. It's absolutely possible that this is triggered by some automatic mechanism but if that's the cas
Read the rest
e then there's an enormous amount of signifance being assigned to the corresponding rules. If there's some random component to the ranking then I highly doubt that it would be responsible for jumps of this magnitude. I try to emphasize in the article that I do think it's possible that there's a hidden flagging threshold that's responsible and that the data can't tell us with certainty whether or not that's the case. I just personally find it unlikely that that's what happened for all of these stories. If you ran a site like Hacker News then would you put an admin link next to each post that pushes it off of the front page? I know that I would. [1] - https://github.com/HackerNews/API
In Stories that Hacker News removes from the front page

Showing the 15 most recent of 17 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.