Access Hacker News data without any API key. Get stories, comments, user profiles, and search using HN Firebase API + Algolia.
git clone https://github.com/spinov001-art/python-hn-api.git
cd python-hn-api
python hn_api.pyZero dependencies. No API key. Python 3.6+.
from hn_api import HNClient
client = HNClient()
# Top stories
stories = client.top_stories(limit=10)
# Search HN
results = client.search("python web scraping", tags="story")
# Get comments
comments = client.get_comments(story_id=12345, limit=20)
# User profile
user = client.get_user("pg")
# New and best stories
new = client.new_stories(limit=5)
best = client.best_stories(limit=5)
# Search by date (newest first)
recent = client.search_by_date("AI tools", tags="story")- Tech trend monitoring: Track what's trending on HN
- Content research: Find popular topics in your niche
- Competitor tracking: Monitor mentions of tools and companies
- Dataset building: Collect discussion data for analysis
- News aggregation: Build custom tech news feeds
- awesome-no-auth-apis — 50+ free APIs
- python-reddit-api — Reddit client
- Hacker News Scraper on Apify
MIT