Ask HN/PG: Is there an API for hackernews?
If so, where can I find it? If not, how did everyone who got data about HN (such as in posts about the best time to post etc.) get their data? Did you just crawl HN?
5 comments
try http://hnapp.com/ .. get the json response
Yeah, HTML scraping with PHP's DOM functions... I'm cleaning it up atm and will release it on github wehen done.
HN is, from a technological POV, stuck in the Middle Ages when compared to the startups that YCombinator backs.
HN is, from a technological POV, stuck in the Middle Ages when compared to the startups that YCombinator backs.
The Algolia API is far superior than any scraping API (incidentally, it's also a YC startup)
There's an API from the search engine provider, Algolia:
https://hn.algolia.com/api
https://hn.algolia.com/api
The 2010 era blog posts on best time to post used scraping, but the Algolia API just released is robust enough for HN data analysis. (proof: http://minimaxir.com/2014/02/hacking-hacker-news/ )
https://hn.algolia.com/api
https://hn.algolia.com/api
To download all stories:
https://github.com/minimaxir/hacker-news-download-all-storie...
To download all comments:
https://github.com/jaredsohn/hacker-news-download-all-commen...
To download saved stories (not available via API; haven't personally tried it though):
https://github.com/dougk7/hackernews-stories
https://github.com/minimaxir/hacker-news-download-all-storie...
To download all comments:
https://github.com/jaredsohn/hacker-news-download-all-commen...
To download saved stories (not available via API; haven't personally tried it though):
https://github.com/dougk7/hackernews-stories