Live data from Hacker News

Hacker News Official API

github.com

31–40 of 138 posts

Re: Hacker News Official API

#31
post #11

Earlier quoted context omitted.

What difference would exposing counts make? Why should this data be mineable? We're already helping to create a training set of slightly above average English speaker discourse for free.

If it was up to me, all data would be publicly available aside from emergency recovery email and password. This would include mod commutations and mod logs; unless it was security related, which would have a formal process with deadlines for release. —- To address you specific question as why the comment voting data would be of use, among other reasons, it would allow users to have custom filters. For example, posts…

> This would include mod commutations

In 2019 I set up a bot to store titles for HN stories as soon as they appear on the "new" page, so that I could then compare them to the current version.

I had also made a browser extension for FF and Chrome that compared the current version of any HN story to the stored one, and displayed a warning if they differed.

There was zero downloads of the extensions, so they fell into disrepair and don't work anymore, but the cron job for storing the titles is still active.

If there is any interest I could resuscitate the extensions, or some other system to make that information useful.

Re: Hacker News Official API

#32
post #28

Firebase is owned by google. There are plenty of OSS solutions to create this exact realtime thing without getting too close to the elephant in the room.

I don't think it was owned by google when hn started using it for the API.

I think using Google or not is pretty irrelevant, but I looked because I was curious.

This repo started in 2015, and Firebase was bought in 2014. I'm really surprised; I thought it was way more recent than that.

Re: Hacker News Official API

#34
Has anyone done a mass archiving of HN via this API?

It would be a shame for this vast trove of expert knowledge and nerd sniping to vanish into the ether after the next hard drive apocalypse or similar.

Re: Hacker News Official API

#36

> The v0 API is essentially a dump of our in-memory data structures. TIL that HN doesn't use a "proper" / persistent DB. I wonder then how HN handles data persistence. Is it as simple as creating write-ahead logs + checkpointing every some duration?

Sure they do, what they are saying is that the data format is just the raw format they use in memory after loading it from a database.

Re: Hacker News Official API

#37
I wrote a fairly simple "Who is hiring?" browser (using this API) that fetched the post listings and stored them locally in an HTML file accessible by pointing your browser at file:///... . It supported filtering by "Remote", "Interns", and "Visa" with buttons, had an ad hoc Regex filter, and the ability to remove posts using a delete button and not see them again (or to restore all deleted posts) using the localStorage api.

It was indeed barebones but I'd like to think it helped me find a job. I would link the code (it's on GitHub) but today the "Who is hiring?" posts include a few considerably more advanced and capable "searchers" right in the top of the post:

> Searchers: try https://kennytilton.github.io/whoishiring/, https://hnjobs.emilburzo.com, https://news.ycombinator.com/item?id=10313519.

It was fun; I enjoyed working on it.

Re: Hacker News Official API

#38

How hard is it for HN to make its own API? so I could do something like: curl https://api.news.ycombinator.com/

My understanding is that this is the official HN API. I think Firebase is a YC company. Others can correct me if I'm wrong.

See the link at the bottom of every HN item page.

Edit: I took a look, it seems like Firebase is owned by Google now, but it was original a YC-funded startup, judging by this page: https://www.crunchbase.com/funding_round/firebase-pre-seed--...

Re: Hacker News Official API

#39
For a few years I am working on the side on a HN client. One thing that is really sad is that there is now way to handle authentication properly as a 3rd party. The user basically has to trust you with her/his password or you have to "steal" the auth token from a login.

Re: Hacker News Official API

#40
post #9

Annoying how it doesn't show the text or anything for dead items. Is there any way to query this API as if showdead is switched on?

I used to query flagged comments from time to time using the API, just out of some morbid curiosity. It definitely used to work for that; I am not sure if flagged items are in the same class as dead ones, though, or if they have since deliberately eliminated this capability. I eventually found more interesting things to do :)
Post reply on HN