HackerNews
Social news for CS and entrepreneurship
- Authentication
- No auth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Social
- Documentation / URL
- https://github.com/HackerNews/API
Overview
The Hacker News API exposes everything on Hacker News — top stories, Ask HN, jobs, comments, users — as JSON, keyless and free. Two flavors: the official Firebase API (IDs + item lookup) and the Algolia API (full-text search with scores). The standard data source for HN readers, bots, and analytics projects.
Quick Start
Top story IDs (official Firebase API, verified live):
curl "https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"
Fetch a single item by ID:
curl "https://hacker-news.firebaseio.com/v0/item/8863.json?print=pretty"
New / Ask / Show / Jobs:
curl "https://hacker-news.firebaseio.com/v0/newstories.json"
curl "https://hacker-news.firebaseio.com/v0/askstories.json"
curl "https://hacker-news.firebaseio.com/v0/showstories.json"
curl "https://hacker-news.firebaseio.com/v0/jobstories.json"
Search (Algolia API) — full-text with metadata:
curl "https://hn.algolia.com/api/v1/search?query=rust&tags=story"
curl "https://hn.algolia.com/api/v1/search_by_date?tags=comment&query=openai"
Authentication
None — keyless.
Rate Limits & Notes
- The official Firebase API is fire-and-forget friendly but has no search; Algolia powers the HN search UI (searchable, scored).
- Items are JSON with
id,title,by,score,descendants,kids(comment IDs),url(for stories) /text(for Ask HN). - Algolia endpoints:
/search(relevance) and/search_by_date(chronological), withtags=story|comment|ask_hn|show_hn|job. - Both are free with generous limits; be polite for bulk crawls.
FAQ
Is the Hacker News API free? Yes — both the Firebase and Algolia endpoints are free and keyless.
How do I get comments for a story?
Fetch the story item, then fetch each kid ID — or use Algolia search_by_date?tags=comment&story_id=....
Which API should I use? Firebase for simple listing/ranking apps; Algolia for search, comments, and historical queries.
More in Social
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| 4chan Simple image-based bulletin board dedicated to a variety of topics | No auth | Yes | Yes | ↗ |
| Ayrshare Social media APIs to post, get analytics, and manage multiple users social media accounts | API Key | Yes | Yes | ↗ |
| aztro Daily horoscope info for yesterday, today, and tomorrow | No auth | Yes | Unknown | ↗ |
| Blogger The Blogger APIs allows client applications to view and update Blogger content | OAuth | Yes | Unknown | ↗ |
| Bluesky Decentralized social networking via the AT protocol | No auth | Yes | Yes | ↗ |