Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Python Hacker News API Client

Access Hacker News data without any API key. Get stories, comments, user profiles, and search using HN Firebase API + Algolia.

Quick Start

git clone https://github.com/spinov001-art/python-hn-api.git
cd python-hn-api
python hn_api.py

Zero dependencies. No API key. Python 3.6+.

Features

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")

Use Cases

  • 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

Related

License

MIT

About

Python Hacker News API client — zero dependencies, no API key. Stories, comments, search.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages