27 ms·
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?
- mschuster91 13y agoYeah, 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.
- minimaxir 13y agoThe Algolia API is far superior than any scraping API (incidentally, it's also a YC startup)
- neilco 13y agoThere's an API from the search engine provider, Algolia: https://hn.algolia.com/api https://hn.algolia.com/api
- minimaxir 13y agoThe 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/ http://minimaxir.com/2014/02/hacking-hacker-news/ ) https://hn.algolia.com/api https://hn.algolia.com/api
- jaredsohn 13y agoTo download all stories: https://github.com/minimaxir/hacker-news-download-all-stories https://github.com/minimaxir/hacker-news-download-all-storie... To download all comments: https://github.com/jaredsohn/hacker-news-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/dougk7/hackernews-stories
- shamsulbuddy 13y agotry http://hnapp.com/ http://hnapp.com/ .. get the json response