100 free credits. No credit card required. Get a key

Hacker News search API

Full-text search over Hacker News stories (or comments, polls, Show HN, Ask HN) by relevance or date, with numeric filters on points, comments and time, as Hacker News’s own search hits.

GET /v1/hackernews/search1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/hackernews/search?q=sqlite&sort=date&hitsPerPage=50",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"hits": [
{
"objectID": "50657159",
"_tags": [
"story",
"author_HarsH_1849",
"… 2 more"
],
"author": "HarsH_1849",
"created_at": "2026-11-26T16:59:24Z",
"created_at_i": 1795712364,
"title": "Show HN: Dev-Mem – Local-first SQLite knowledge graph for AI coding agents",
"url": "https://github.com/HarsH-1877/Dev-Mem",
"points": 1,
"num_comments": 0,
"story_id": 50657159,
"updated_at": "2026-11-26T17:01:50Z"
},
{
"objectID": "50657069",
"_tags": [
"story",
"author_HarsH_1877",
"… 2 more"
],
"author": "HarsH_1877",
"created_at": "2026-11-26T16:51:34Z",
"created_at_i": 1795711894,
"title": "Show HN: Dev-Mem – Local-first SQLite knowledge graph for AI coding agents",
"url": "https://github.com/HarsH-1877/Dev-Mem",
"points": 7,
"num_comments": 0,
"story_id": 50657069,
"updated_at": "2026-11-26T22:51:59Z"
},
"… 48 more"
],
"nbHits": 4671,
"page": 0,
"nbPages": 20,
"hitsPerPage": 50,
"query": "sqlite",
"exhaustive": {
"nbHits": false,
"typo": false
},
"exhaustiveNbHits": false,
"exhaustiveTypo": false,
"params": "query=sqlite&tags=story&hitsPerPage=50&page=0&advancedSyntax=true&analyticsTags=backend",
"processingTimeMS": 23,
"processingTimingsMS": {
"_request": {
"queue": 1,
"roundTrip": 15
},
"afterFetch": {
"format": {
"highlighting": 2,
"total": 3
}
},
"fetch": {
"query": 8,
"scanning": 12,
"total": 21
},
"total": 23
},
"serverTimeMS": 28
}

Parameters

NameTypeDescription
qquery · requiredstringSearch terms. Example: rust.
tagsquerystringAlgolia tags. Defaults to story.
numericFiltersquerystringe.g. points>100,created_at_i>1700000000
sortquery"relevance" | "date"relevance (default) or date. One of relevance, date.
hitsPerPagequeryintegerHits per page, 1 to 1000. Defaults to 30.
pagequeryinteger | nullPage number, 0 to 999 (0 is the first page). Defaults to 0.
sincequerystringOnly rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Example: 2026-01-01.
untilquerystringOnly rows published on or before this date: YYYY-MM-DD (that whole UTC day) or an ISO 8601 timestamp. Example: 2026-12-31.
Response fields

200 with a HackerNewsSearch, in Hacker News’s own items and search hits.

FieldTypeDescription
hitsHackerNewsSearchHit[]
nbHitsinteger
pageinteger
nbPagesinteger
hitsPerPageinteger
querystring
Status codes
StatusMeaning
200Matching items, with paging totals.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The item or user does not exist.
429Too many requests. Wait for Retry-After seconds.
503Hacker News is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

How far back does it go?

To the first story in 2006. Pages are 0-based, up to 1,000 hits each.

Hacker News is a trademark of Y Combinator. We are not affiliated with or endorsed by Y Combinator.