Developer
Hacker News search API
Search Hacker News stories or comments (Algolia HN API), by relevance or recency, with points and comment counts. For research/trend agents. Answers 'top HN discussion about X', 'what is HN saying about Y', 'recent HN posts on Z', 'trending on Hacker News'.
Price$0.01per request
MethodPOST
Route/v1/dev/hn-search
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache300s public
devhacker-newshnsearchtech-newstrendsdiscussionresearch
API URL
Integration docshttps://x402.hexl.dev/v1/dev/hn-searchExample request
{
"query": "agentic payments",
"sort": "relevance",
"limit": 1
}Example response
{
"query": "agentic payments",
"type": "story",
"total": 42,
"results": [
{
"title": "Agents are paying each other with x402",
"url": "https://example.com",
"author": "pg",
"points": 240,
"comments": 88,
"createdAt": "2026-05-01T00:00:00Z",
"hnUrl": "https://news.ycombinator.com/item?id=123"
}
]
}Input schema
{
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"examples": [
"x402 payments"
]
},
"type": {
"type": "string",
"enum": [
"story",
"comment"
],
"default": "story"
},
"sort": {
"type": "string",
"enum": [
"relevance",
"recent"
],
"default": "relevance"
},
"limit": {
"type": "number",
"default": 10
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}