
Scraping Hacker News in 2026: Complete Guide (Algolia API + Date Filters)
Why Scrape Hacker News? Hacker News gets 10M+ visits/month from developers, founders, and investors. Whether you're tracking trends, monitoring mentions of your product, or building a dataset for analysis — HN data is gold. The good news: HN has an official search API powered by Algolia. Most devs don't know about it. Let me show you how to use it properly. The Algolia Search API Base URL: https://hn.algolia.com/api/v1/ Fetching Stories by Type import requests # Search stories resp = requests . get ( " https://hn.algolia.com/api/v1/search " , params = { " query " : " LLM " , " tags " : " story " , " hitsPerPage " : 20 }) stories = resp . json ()[ " hits " ] for s in stories : print ( f " { s [ \ " points \" ] } pts - { s [ \ " title \" ] } ( { s [ \ " url \" ] } ) " ) The tags parameter controls what you get: Tag What it returns story All stories ask_hn Ask HN posts show_hn Show HN posts comment Comments only front_page Currently on front page Date Filtering with numeric_filters This i
Continue reading on Dev.to Python
Opens in a new tab


