Live data from Hacker News

Hacker News API

blog.ycombinator.com

81–90 of 315 posts

Re: Hacker News API

#81
post #48
post #40

Earlier quoted context omitted.

[Firebase Dev Advocate here] We don't currently have rate limits. I'd recommend using our SDKs, they handle connections more efficiently than dealing with the REST API. You can also run your own server process using our Node ( https://www.npmjs.org/package/firebase ) or Java libraries ( https://www.firebase.com/docs/android/quickstart.html ).

Any kind of rate limitations with the REST API we should be made aware of?

You really want to use the Firebase SDKs.

https://news.ycombinator.com/item?id=8423055

Re: Hacker News API

#82
post #40
post #10

Any kind of rate limitations we should be made aware of?

[Firebase Dev Advocate here] We don't currently have rate limits. I'd recommend using our SDKs, they handle connections more efficiently than dealing with the REST API. You can also run your own server process using our Node ( https://www.npmjs.org/package/firebase ) or Java libraries ( https://www.firebase.com/docs/android/quickstart.html ).

This implies that your SDKs don't use your own REST API. What do they use instead?

Re: Hacker News API

#83
post #48
post #40

Earlier quoted context omitted.

[Firebase Dev Advocate here] We don't currently have rate limits. I'd recommend using our SDKs, they handle connections more efficiently than dealing with the REST API. You can also run your own server process using our Node ( https://www.npmjs.org/package/firebase ) or Java libraries ( https://www.firebase.com/docs/android/quickstart.html ).

Any kind of rate limitations with the REST API we should be made aware of?

There are currently no rate limits on the REST API.

Re: Hacker News API

#85
post #50

I've been working on a Hacker News client for Windows Phone over the past several weeks and am very close to an initial release, so I feel somewhat ambivalent about this. On the one hand, of course it's great that HN is finally getting a proper API and also modernizing its markup (which is a mess even if you ignore all the tables – for example, the first paragraph in a comment usually isn't wrapped in tags), but on t…

> (which is a mess even if you ignore all the tables – for example, the first paragraph in a comment usually isn't wrapped in tags) Oh, that's in the actual API. https://hacker-news.firebaseio.com/v0/item/8422922.json?prin... I strongly hope they add a plain-text field for returned comments.

What you're getting there is how the comment text happens to be stored (and presumably always has been). We've talked about changing that, because it would allow us to do some implementation improvements like... well, I forget just now. Might have had to do with caching. Anyhow, if enough people want it, we'll bump up the priority.

Re: Hacker News API

#86
post #53

Earlier quoted context omitted.

UNIX time is actually much easier to parse and more accurate. Almost all platforms (even Windows[0]) have a way to convert a UNIX time into a culture specific local time. What you're asking for is a string you have to parse. That's a lot more work and there is a lot more that can go wrong. [0] https://stackoverflow.com/questions/249760/how-to-convert-un...

How is it more accurate? ISO-8601 allows for leap seconds, it uses the same second counting frequency as the Unix timestamp, it can represent dates before 1970 and after 2038 (64-bit Unix timestamps will also.) and it's an international standard. There are very few good reasons to choose a Unix timestamp to represent a date when compared with ISO-8601.

When UNIX is converted into the local culture leap seconds are added (along with time zone, daylight savings time, et al), defining dates before 1970 is irrelevant (and also untrue, UNIX times can be negative), and as systems are moving rapidly to 64 bit the 2038 deadline will be irrelevant (e.g. my Chrome AND their server software are both 64 bit already).

> There are very few good reasons to choose a Unix timestamp to represent a date when compared with ISO-8601.

Complete lack of string parsing is a good one.

Re: Hacker News API

#87
post #79

Why do you have all the times in Unix time instead of ISO-8601 UTC? EDIT: Also, the "about" value in the users api appears to be truncated. Compare... https://hacker-news.firebaseio.com/v0/user/angersock# ...with... https://news.ycombinator.com/user?id=angersock EDIT2: Note that the JSON is correct, but the preview in the firebase API seems to be broken. EDIT3: No issue tracker on the Github? Laaaame.

[Firebase Dev Advocate] @angersock - the "about" value you're seeing on the Firebase Dashboard isn't broken, it's just a truncated preview. The HN team is using email for issues, so you can send them any feedback at api@ycombinator.com.

Ah, cool. There was no warning of that fact--maybe you could add that?

Re: Hacker News API

#89
post #40
post #10

Any kind of rate limitations we should be made aware of?

[Firebase Dev Advocate here] We don't currently have rate limits. I'd recommend using our SDKs, they handle connections more efficiently than dealing with the REST API. You can also run your own server process using our Node ( https://www.npmjs.org/package/firebase ) or Java libraries ( https://www.firebase.com/docs/android/quickstart.html ).

Thanks for answering.

I'd rather use the REST API directly, for what I need is rather simple and not downloading, installing and maintaining an SDK is more appealing. (My app was developed a while ago and was doing HTML scraping, but the 30-second limit on HN killed it, because of testing -- I don't need to query more often than twice per minute, but while testing I ran the thing a little too often).

So, what are the limits on the REST API, and how do limits work? (A max number of requests per hour would be better than per minute for example).

Re: Hacker News API

#90

Oh man you guys, patio11 has generated massive amounts of content: https://hacker-news.firebaseio.com/v0/user/patio11.json?prin... I count 8,483 submissions. I'm sure there's something interesting to be done with all of this data. A word frequency chart? --- Edit: So apparently there's a ruby gem that lets you feed it a body of text and generates pseudo-random phrases based on that text. I present to you the patio11…

tptacek is similarly impressive, with 30,051 posts. https://hacker-news.firebaseio.com/v0/user/tptacek.json?prin...

We're all eating the elephant one byte at a time. With 193,000+ karma his average item gets about six upvotes/resubmissions.
Post reply on HN