Last updated
ChangelogHacker News API
HealthyRead-onlyHacker News story lists (front page, newest, Ask HN, Show HN) with rank, title, url, site, points, author, comment count and age, plus any item's details and its full nested comment thread. Generated from news.ycombinator.com.
/front5 credits per callFront
Stories on the Hacker News front page in HN rank order, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. data.next holds the next page's params, or null on the last page.
Authorization: Bearer <key> on every request.Parameters
page number, 1 to 17 (30 stories per page).
Response fields
feede.g."front"pagee.g.1counte.g.30stories
ranke.g.1ide.g.50663595titlee.g."The group chat where your AI talks behind your back"urle.g."https://construct22.com/"sitee.g."construct22.com"pointse.g.238authore.g."utiiiD"comment_counte.g.104agee.g."3 hours ago"posted_ate.g."2026-11-27T06:44:34Z"typee.g."story"hn_urle.g."https://news.ycombinator.com/item?id=50663595"next
pe.g."2"pagination
counte.g.30has_moree.g.falsenext_cursorfetched_ate.g."2026-11-27T10:11:48.780Z"agee.g.0curl "https://api.maviapi.com/v1/sites/hackernews/front?p=1" \-H "Authorization: Bearer $MAVI_KEY"
{
"feed": "front",
"page": 1,
"count": 30,
"stories": [
{
"rank": 1,
"id": 50663595,
"title": "The group chat where your AI talks behind your back",
"url": "https://construct22.com/",
"site": "construct22.com",
"points": 238,
"author": "utiiiD",
"comment_count": 104,
"age": "3 hours ago",
"posted_at": "2026-11-27T06:44:34Z",
"type": "story",
"hn_url": "https://news.ycombinator.com/item?id=50663595"
}
],
"next": {
"p": "2"
},
"pagination": {
"count": 30,
"has_more": false,
"next_cursor": null
},
"fetched_at": "2026-11-27T10:11:48.780Z",
"age": 0
}Get all the data, no code
Collect every page of GET /front into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use Hacker News API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of Hacker News API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=hackernews -- npx -y '@maviapi/mcp'Import Hacker News API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/hackernews/openapi.json - Postman
https://api.maviapi.com/v1/apis/hackernews/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
Build with the Hacker News API
Choose a starting endpoint
- Front
GET /frontStories on the Hacker News front page in HN rank order, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. data.next holds the next page's params, or null on the last page.
Parameters and response fields for GET /front
Request parameters Name Type / location Required Description p integer / query No page number, 1 to 17 (30 stories per page). Response fields Field Type Description feed string page integer count integer stories object[] stories[].rank integer stories[].id integer stories[].title string stories[].url string stories[].site string stories[].points integer stories[].author string stories[].comment_count integer stories[].age string stories[].posted_at string stories[].type string stories[].hn_url string next object next.p string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Ask
GET /askAsk HN posts in HN rank order, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. data.next holds the next page's params, or null on the last page.
Parameters and response fields for GET /ask
Request parameters Name Type / location Required Description p integer / query No page number, 1 to 17 (30 stories per page). Response fields Field Type Description feed string page integer count integer stories object[] stories[].rank integer stories[].id integer stories[].title string stories[].url string stories[].site null stories[].points integer stories[].author string stories[].comment_count integer stories[].age string stories[].posted_at string stories[].type string stories[].hn_url string next object next.p string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Item
GET /item/{id}One Hacker News item (story, Ask/Show HN, job, poll or a single comment) by id: type, title, url, site, text, points, author, comment_count, age, posted_at (UTC), parent_id / story_id / story_title for comments, poll_options for polls, and its whole comment thread as a nested tree (top level in HN order, each comment with id, author, age, posted_at, depth, parent_id, plain text, raw html, deleted flag and replies). thread_source is "algolia" for the full tree, or "firebase" for a bounded live walk when the item is too new to be indexed.
Parameters and response fields for GET /item/{id}
Request parameters Name Type / location Required Description id integer / path Yes Hacker News item id. Response fields Field Type Description id integer type string title string url string site string text null points integer author string comment_count integer age string posted_at string parent_id null story_id null story_title null poll_options null hn_url string comments_total integer comments object[] comments[].id integer comments[].author string comments[].age string comments[].posted_at string comments[].depth integer comments[].parent_id integer comments[].text string comments[].html string comments[].deleted boolean comments[].replies object[] comments[].replies[].id integer comments[].replies[].author string comments[].replies[].age string comments[].replies[].posted_at string comments[].replies[].depth integer comments[].replies[].parent_id integer comments[].replies[].text string comments[].replies[].html string comments[].replies[].deleted boolean comments[].replies[].replies object[] comments[].replies[].replies[].id integer comments[].replies[].replies[].author string comments[].replies[].replies[].age string comments[].replies[].replies[].posted_at string comments[].replies[].replies[].depth integer comments[].replies[].replies[].parent_id integer comments[].replies[].replies[].text string comments[].replies[].replies[].html string comments[].replies[].replies[].deleted boolean comments[].replies[].replies[].replies object[] comments[].replies[].replies[].replies[].id integer comments[].replies[].replies[].replies[].author string comments[].replies[].replies[].replies[].age string comments[].replies[].replies[].replies[].posted_at string comments[].replies[].replies[].replies[].depth integer comments[].replies[].replies[].replies[].parent_id integer comments[].replies[].replies[].replies[].text string comments[].replies[].replies[].replies[].html string comments[].replies[].replies[].replies[].deleted boolean comments[].replies[].replies[].replies[].replies object[] comments[].replies[].replies[].replies[].replies[].id integer comments[].replies[].replies[].replies[].replies[].author string comments[].replies[].replies[].replies[].replies[].age string comments[].replies[].replies[].replies[].replies[].posted_at string comments[].replies[].replies[].replies[].replies[].depth integer comments[].replies[].replies[].replies[].replies[].parent_id integer comments[].replies[].replies[].replies[].replies[].text string comments[].replies[].replies[].replies[].replies[].html string comments[].replies[].replies[].replies[].replies[].deleted boolean comments[].replies[].replies[].replies[].replies[].replies object[] comments[].replies[].replies[].replies[].replies[].replies[].id integer comments[].replies[].replies[].replies[].replies[].replies[].author string comments[].replies[].replies[].replies[].replies[].replies[].age string comments[].replies[].replies[].replies[].replies[].replies[].posted_at string comments[].replies[].replies[].replies[].replies[].replies[].depth integer comments[].replies[].replies[].replies[].replies[].replies[].parent_id integer comments[].replies[].replies[].replies[].replies[].replies[].text string comments[].replies[].replies[].replies[].replies[].replies[].html string comments[].replies[].replies[].replies[].replies[].replies[].deleted boolean comments[].replies[].replies[].replies[].replies[].replies[].replies string[] thread_source string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null - Feed
GET /feedThe first page (30 stories) of a Hacker News story list in HN order, each story with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type, hn_url and comments. With comments=true the first `top` stories carry their top-level comments in HN order, each with its direct replies; every other story has comments null.
Parameters and response fields for GET /feed
Request parameters Name Type / location Required Description type string / query No which story list: front, newest, ask or show. Allowed values: front, newest, ask, show. comments boolean / query No attach top comments to the first `top` stories. top integer / query No how many stories to enrich with comments (1-5). Allowed values: 1, 2, 3, 4, 5. comments_per_story integer / query No top-level comments, and direct replies under each, per enriched story (1, 3, 5 or 10). Allowed values: 1, 3, 5, 10. Response fields Field Type Description feed string with_comments boolean enriched integer count integer stories object[] stories[].rank integer stories[].id integer stories[].title string stories[].url string stories[].site string stories[].points integer stories[].author string stories[].comment_count integer stories[].age string stories[].posted_at string stories[].type string stories[].hn_url string stories[].comments null pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Newest
GET /newestNewest Hacker News submissions, newest first, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. data.next holds the next page's params, or null on the last page.
Parameters and response fields for GET /newest
Request parameters Name Type / location Required Description p integer / query No page number, 1 to 17 (30 stories per page). Response fields Field Type Description feed string page integer count integer stories object[] stories[].rank integer stories[].id integer stories[].title string stories[].url string stories[].site string stories[].points integer stories[].author string stories[].comment_count integer stories[].age string stories[].posted_at string stories[].type string stories[].hn_url string next object next.p string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Show
GET /showShow HN posts in HN rank order, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. data.next holds the next page's params, or null on the last page.
Parameters and response fields for GET /show
Request parameters Name Type / location Required Description p integer / query No page number, 1 to 17 (30 stories per page). Response fields Field Type Description feed string page integer count integer stories object[] stories[].rank integer stories[].id integer stories[].title string stories[].url string stories[].site string stories[].points integer stories[].author string stories[].comment_count integer stories[].age string stories[].posted_at string stories[].type string stories[].hn_url string next object next.p string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Best
GET /bestBest (highest-voted recent) Hacker News stories, ranked, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. data.next holds the next page's params, or null on the last page.
Parameters and response fields for GET /best
Request parameters Name Type / location Required Description p integer / query No page number, 1 to 7 (30 stories per page). Response fields Field Type Description feed string page integer count integer stories object[] stories[].rank integer stories[].id integer stories[].title string stories[].url string stories[].site string stories[].points integer stories[].author string stories[].comment_count integer stories[].age string stories[].posted_at string stories[].type string stories[].hn_url string next object next.p string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer
Export Hacker News data to CSV
Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.
| List | CSV columns |
|---|---|
FrontGET /front | rank, id, title, url, site, points, author, comment_count, age, posted_at, type, hn_url |
AskGET /ask | rank, id, title, url, site, points, author, comment_count, age, posted_at, type, hn_url |
ItemGET /item/{id} | id, author, age, posted_at, depth, parent_id, text, html, deleted, replies |
FeedGET /feed | rank, id, title, url, site, points, author, comment_count, age, posted_at, type, hn_url, comments |
NewestGET /newest | rank, id, title, url, site, points, author, comment_count, age, posted_at, type, hn_url |
ShowGET /show | rank, id, title, url, site, points, author, comment_count, age, posted_at, type, hn_url |
BestGET /best | rank, id, title, url, site, points, author, comment_count, age, posted_at, type, hn_url |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
Hacker News API questions
What you get, what it costs and how to call it.
Is there an official Hacker News API?
Yes. Hacker News has an official API, run with Firebase, that makes its public data (stories, comments, polls, users) available in near real time. Source: Hacker News API (checked 2026-11-25). This Hacker News API is a separate, unofficial one: an independent, hosted API from maviapi for the public data on news.ycombinator.com. It is not made, endorsed or supported by Hacker News.
What data can I get from the Hacker News API?
The Hacker News API has 7 endpoints. Each returns JSON with the parameters and fields documented above:
- GET
/front: Stories on the Hacker News front page in HN rank order, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at… - GET
/ask: Ask HN posts in HN rank order, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. - GET
/item/{id}: One Hacker News item (story, Ask/Show HN, job, poll or a single comment) by id: type, title, url, site, text, points, author, comment_count, age, posted_at… - GET
/feed: The first page (30 stories) of a Hacker News story list in HN order, each story with rank, id, title, url, site, points, author, comment_count, age, posted_at… - GET
/newest: Newest Hacker News submissions, newest first, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and… - GET
/show: Show HN posts in HN rank order, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at (UTC), type and hn_url. - GET
/best: Best (highest-voted recent) Hacker News stories, ranked, 30 per page, each with rank, id, title, url, site, points, author, comment_count, age, posted_at…
How much does the Hacker News API cost?
Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 5 credits per call. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. Failed calls are free. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the Hacker News API?
Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /front:
curl 'https://api.maviapi.com/v1/sites/hackernews/front' \
-H "Authorization: Bearer $MAVI_KEY"Create a key on your API keys page, or try any endpoint first in the console above with the free test key.
What are the ways to get Hacker News data as JSON?
Each way to get Hacker News data as JSON fits a different need:
- Hacker News API: Hacker News has an official API, run with Firebase, that makes its public data (stories, comments, polls, users) available in near real time. Better when you need write access, account data or an agreement with Hacker News.
- Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on news.ycombinator.com are yours. Better for a one-off pull from a page that rarely changes.
- Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
- RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
- maviapi: The Hacker News API on this page: 7 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.
What happens when news.ycombinator.com changes its layout?
Your code does not change. maviapi keeps the Hacker News API working when news.ycombinator.com changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.
Will an update break my Hacker News API integration?
No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.
Related APIs
- Hürriyet API
Latest Turkish news from Hürriyet: a combined newest-first feed across sections (gündem, ekonomi, dünya, spor, ...)…
- Tripadvisor API
Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…
- Google Maps API
Structured data from maps.google.com.