Hacker News API
news.ycombinator.com
Hacker News — get top/new/best/ask/show/job stories, fetch items with nested comments, search posts, view user profiles.
- Actions
- 4
- Category
- News
- Login
- Not required
- Output
- JSON
Call the Hacker News API
Submit a task, then poll the job until it settles. This example runs hn_item_details.
curl -X POST https://api.anakin.io/v1/wire/task \
-H "X-API-Key: $ANAKIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action_id": "hn_item_details",
"params": {
"id": "<id>"
}
}'4 actions on news.ycombinator.com
Read
Hacker News Item Details
hn_item_detailsread1 credit / callFull item details — story, comment, job, or poll with nested comment tree up to depth 3.
- id
- string · required
- include_comments
- boolean
- comment_depth
- integer
Hacker News Stories
hn_storiesread1 credit / callGet stories from any HN feed — top, new, best, Ask HN, Show HN, jobs. Returns title, score, URL, author, and comment count.
- type
- string
- limit
- integer
- offset
- integer
Hacker News User Details
hn_user_detailsread1 credit / callUser profile — karma, about, and optionally recent submissions with details.
- username
- string · required
- include_submissions
- boolean
- submissions_limit
- integer
Search Hacker News
hn_searchread1 credit / callSearch Hacker News posts via Algolia API. Returns stories with title, score, URL, author, and comment count.
- query
- string · required
Hacker News API questions
- Is there an API for Hacker News?
- Hacker News does not offer a public data API for this, but Anakin Wire provides 4 maintained endpoints for news.ycombinator.com. You call Anakin's REST API with an action ID and parameters and get structured JSON back; Anakin handles the browser, proxies, anti-bot, and parsing.
- How do I scrape Hacker News data?
- POST to https://api.anakin.io/v1/wire/task with your API key, the action ID, and its parameters, then poll GET /v1/wire/jobs/{id} until the job settles. There is nothing to install and no scraper to maintain — when news.ycombinator.com changes its markup, Anakin updates the action.
- Do I need a Hacker News account?
- No. Every Hacker News action listed here runs anonymously — no account and no credentials required.
- What does the Hacker News API cost?
- Usage-based credits, charged per call and refunded automatically when a job fails. New accounts start with 300 free credits and no card. See anakin.io/pricing for the current rates.
More News APIs
Al Jazeera
Al Jazeera — get latest articles, browse by section, read full articles, search by keyword, and follow journalists. Leading English-language source for Middle East, Africa, and Global South coverage.
AP News
AP News — get latest wire articles, browse by section, read full articles with keywords, search by keyword, follow journalists, and access AP fact-check articles.
BBC News
BBC News — get top stories, browse by section or world region, read full articles with author and topics, browse topic pages, search by keyword, follow specific journalists, and get sport news.
CNBC
CNBC — get top stories, browse by section or market category, read full articles, get real-time stock quotes, search by keyword, follow journalists, and access specialized feeds like Buffett Watch and Trader Talk.
Google News
Google News — search articles, get top stories, browse by topic, track trending stories, read local news, monitor specific publishers, extract full article text, and find related coverage across sources.
Nikkei Asia
Nikkei Asia — get latest articles, browse by section or country/region, read full articles (including paywalled), search natively, see most read, find related articles, and track topics.