Pushbuild

Hacker News API – Search, Front Page & Users

Search every Hacker News story and comment by keyword, date and points, or pull the live Top, New, Best, Ask, Show and Jobs feeds. Returns title, URL, author, points, comment count, text and dates. Official APIs, no blocks.

$0.24 per 1,000 items

Get an API key

Example request

POST /hacker-news/run
{
  "searchQueries": [
    "rust",
    "openai"
  ],
  "maxItems": 20
}

What a response looks like

POST /hacker-news/run{"maxItems": 5, "searchQueries": ["rust", "openai"]}
{"count": 5, "items": [{ "author": "Sikul", "comments": 642, "createdAt": "2020-02-04T17:30:40Z", "hnUrl": "https://news.ycombinator.com/item?id=22238335", "id": 22238335, "parentId": null, "points": 1582, "query": "rust", "storyId": 22238335, "tags": [ … ]}
Sikul642darthdeus972selvan330jhund306formalsystem264
comments by author in this sample response
authorcommentscreatedAthnUrlidparentId
Sikul6422020-02-04T17:30:40Zhttps://news.ycombinator.com/item?id=2223833522,238,335
darthdeus9722024-04-26T17:33:56Zhttps://news.ycombinator.com/item?id=4017203340,172,033
selvan3302021-01-02T05:50:39Zhttps://news.ycombinator.com/item?id=2561074125,610,741
jhund3062015-05-15T17:02:09Zhttps://news.ycombinator.com/item?id=95519379,551,937
formalsystem2642019-04-05T15:18:45Zhttps://news.ycombinator.com/item?id=1958338419,583,384

Real rows returned by this API on 2026-11-09 for the request shown.

What it returns

Search every Hacker News story and comment, or pull the live front page and other lists, as clean JSON.

  • Search all stories, comments, Ask HN, Show HN, jobs or polls by keyword, sorted by relevance or newest, with date range and minimum points filters.
  • Live feeds: Top, New, Best, Ask, Show and Jobs, in their current rank order.
  • User profiles: karma, account age, about text and submission count.

Each item has id, type, title, url, text, author, points, comments, createdAt, hnUrl and the query that produced it.

Common uses

Brand and competitor monitoring, launch tracking, trend research, lead generation from Show HN and hiring threads.

Request

POST https://api.pushbuild.com/hacker-news/run with a JSON body. Send your key in the X-API-Key header.

FieldTypeDescription
searchQuerieslist of stringsKeywords to search all of Hacker News for.
itemTypestring: story, comment, ask, show, job, pollWhich kind of item to search. Default: "story".
sortstring: relevance, dateOrder of search results. Default: "relevance".
fromDatestringOnly items created on or after this date (YYYY-MM-DD).
untilDatestringOnly items created on or before this date (YYYY-MM-DD).
minPointsintegerOnly stories with at least this many points.
feedslist of stringsCurrent Hacker News lists: top, new, best, ask, show, job.
userslist of stringsHacker News usernames to look up (karma, created, about).
maxItemsPerQueryintegerSearch returns up to 1,000 per query; feeds up to 500. Default: 100.
maxItemsintegerMaximum items to return (1-500). Default: 100.

Example

curl -X POST https://api.pushbuild.com/hacker-news/run \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries": ["rust", "openai"], "maxItems": 20}'

Response

{"count": 20, "truncated": false, "seconds": 1.4, "items": [ { ... } ]}

Each call returns up to 500 items. Records that fail validation or are not found are flagged in the items and not charged.

Pricing

Pay only for results returned: $0.24 per 1,000 items. No charge for errors or empty searches.

ItemsCost
1,000$0.24
10,000$2.40
100,000$24.00
1,000,000$240.00
4,166 a monthFree ($1 monthly credit)

Use it from Claude, ChatGPT or Cursor

This API is also an MCP server: https://api.pushbuild.com/mcp/hacker-news. Add it to any assistant that supports remote MCP servers, with your key in the X-API-Key header. Same prices. Setup for each app.

Tell us what you need built.

Questions about this API, higher volumes, or a data source you need that we don't cover yet.

hello@pushbuild.com

New APIs and data, twice a month

New data APIs, coverage changes and analysis from Pushbuild. No spam; one click to leave.

Tell us about your project

A few questions so we can come back with a written scope. We reply within one business day.

Want this data inside your own app or CRM? API integrations and data sync