Social

Hacker News Search

Full-text search of Hacker News stories and comments, by relevance or date.

live hackernews.search $0.0015 per request ($1.50 per 1,000)

Pricing

$0.0015 per request ($1.50 per 1,000), paid from a prepaid USD wallet. The exact amount is on every response as cost_usd; max_cost_usd refuses anything higher; failed calls are refunded.

1,000 requests = $1.50 · 10,000 = $15.00 · 100,000 = $150.00

Run it

curl -s -X POST https://getallapis.com/v1/run/hackernews.search \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"postgres","limit":10}'
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('hackernews.search', {'query': 'postgres', 'limit': 10})
print(result['cost_usd'], result['output'])
getallapis run hackernews.search '{"query":"postgres","limit":10}'

Quote first, free: POST /v1/quote/hackernews.search with the same body. MCP: run_endpoint with endpoint="hackernews.search".

Input

FieldTypeRequiredDefaultNotes
querystringyes
typestringno"story"
sortstringno"relevance"
limitintegerno20
pageintegerno0

Output

Returned in output of the run envelope (ok, request_id, endpoint, status, cost_usd, items, latency_ms, source, output).

FieldMeaning
resultsMatching stories/comments with points, comments and links.
totalTotal hits.

Source and latency

Hacker News API + HN Search (Algolia) (official api). Official Firebase API and the public HN Search API. One upstream per endpoint; no automatic failover.

Not enough calls measured yet.

Markdown reference · JSON · Playground