news

Full-text search across all of Hacker News (via the Algolia...

Full-text search across all of Hacker News (via the Algolia HN API). Search stories or comments by keyword, sorted by relevance or by date (newest first). Filter by tags (story/comment/ask_hn/show_hn/poll) and by author. Each hit: title, URL, author, points, comment count, story/comment text, created time, and canonical HN URL. Net-new vs news.hn-top (curated feeds) and news.search (general news).

get/api/news/hn-search

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/news/hn-search
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

querystring

Search keywords (may be empty when filtering by tags/author).

tags'story' | 'comment' | 'ask_hn' | 'show_hn' | 'poll'

Tags.

sort'relevance' | 'date'

Field to sort results by.

authorstring

Restrict to one HN author.

limitinteger

Maximum number of results to return.

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.