
How to Scrape Hacker News in 2026: Stories, Comments, and Trends
How the Hacker News API Works Hacker News exposes a public REST API built on Google's Firebase. It requires no authentication, no API keys, and no developer application. You can query it right now with a single curl command. The base URL is https://hacker-news.firebaseio.com/v0/ . All responses are JSON. Because it is built on Firebase's real-time database, every item — stories, comments, job posts, polls — lives at a predictable URL based on its integer ID. Here are the core endpoints: Top, New, and Best Story Lists These endpoints return an array of item IDs sorted by their respective ranking algorithm: # Top stories (front page ranking) curl "https://hacker-news.firebaseio.com/v0/topstories.json" # Newest submissions curl "https://hacker-news.firebaseio.com/v0/newstories.json" # Best stories (long-term quality ranking) curl "https://hacker-news.firebaseio.com/v0/beststories.json" # Ask HN posts curl "https://hacker-news.firebaseio.com/v0/askstories.json" # Show HN posts curl "https:
Continue reading on Dev.to Tutorial
Opens in a new tab

