
Hacker News Has a Free API — Track Tech Trends Before They Go Mainstream
Every major tech trend — from the AI boom to the layoff wave — shows up on Hacker News days before mainstream media picks it up. But scrolling HN manually is inefficient. Hacker News has a completely free, no-auth Firebase API. Here's how to use it to spot trends programmatically. The API Base URL: https://hacker-news.firebaseio.com/v0/ Endpoints: /topstories.json — top 500 story IDs /newstories.json — newest 500 story IDs /beststories.json — best 500 story IDs /item/{id}.json — any item (story, comment, job) /user/{username}.json — user profile No API key. No rate limit. No auth. Just fetch. 1. Track What's Hot Right Now import requests def get_top_stories ( limit = 10 ): ids = requests . get ( ' https://hacker-news.firebaseio.com/v0/topstories.json ' ). json () stories = [] for story_id in ids [: limit ]: item = requests . get ( f ' https://hacker-news.firebaseio.com/v0/item/ { story_id } .json ' ). json () stories . append ({ ' title ' : item . get ( ' title ' ), ' score ' : item .
Continue reading on Dev.to Python
Opens in a new tab




