x402

Hacker News Search (x402)

Search Hacker News stories and comments via the official Algolia API: title, URL, points, author, comment count, date and text, by relevance or date.

post/x402/v2/hacker-news-search

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/hacker-news-search
  • Auth: none required

Request body

sortstring

relevance (default) or date

typestring

story (default), comment, or all

limitinteger

Results to return, 1-30. Default: 10

querystring required

Search terms. At least 2 characters.

since_daysinteger

Only items created within the last N days

Response

Success

typestring
querystring
returnednumber
total_resultsnumber

Example response

{
  "sort": "relevance",
  "type": "story",
  "query": "deno",
  "results": [
    {
      "id": "23172483",
      "url": "https://deno.land/v1",
      "text": null,
      "type": "story",
      "title": "Deno 1.0",
      "author": 3803,
      "hn_url": "https://news.ycombinator.com/item?id=23172483",
      "points": 2081,
      "story_id": 23172483,
      "created_at": "2020-05-13T22:18:14Z",
      "num_comments": 583
    }
  ],
  "returned": 1,
  "total_results": 34746
}

Changes

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