Search

Hacker News

Search public Hacker News stories, comments, jobs and polls with bounded time, type and sort filters.

Current price
$0.0050/call
Availability
Ready to run
Last accepted verification

What this API does

Search Hacker News public content by query, relevance or recency, optional content type and optional creation-time bounds. Returns at most 50 normalized items with string IDs, author, plain text, timestamps, scores, hierarchy, external links and canonical Hacker News links. It does not promise complete historical coverage or perform unrestricted crawling.

Agents select this operation with tool ID hacker-news.search, then inspect its current executable contract before a run.

Public input and output shape

Input

created_fromstring · optional

Value supplied for created from.

format: date-time

created_tostring · optional

Value supplied for created to.

format: date-time

limitinteger · optional

Value supplied for limit.

minimum: 1 · maximum: 50

querystring · required

Search terms used to find relevant records.

minLength: 1 · maxLength: 500

sortstring · optional

Value supplied for sort.

enum: relevance, date

typestring · optional

Value supplied for type.

enum: all, story, comment, job, poll

Output

captured_atstring

Returned captured at value.

itemsarray

Returned items value.

returned_resultsnumber

Returned returned results value.

sortstring

Returned sort value.

typestring

Returned type value.

Example request and output

This reviewed worked example is shared with inspect. Inspect also returns the current executable schema and price estimate before a paid run.

Request

{
  "tool_id": "hacker-news.search",
  "input": {
    "sort": "relevance",
    "type": "story",
    "limit": 5,
    "query": "My YC app: Dropbox - Throw away your USB drive"
  }
}

Output

{
  "sort": "relevance",
  "type": "story",
  "items": [
    {
      "id": "8863",
      "type": "story",
      "state": "available",
      "title": "My YC app: Dropbox - Throw away your USB drive",
      "author": "dhouston",
      "points": 104,
      "created_at": "2007-04-04T19:55:01.000Z",
      "source_url": "https://news.ycombinator.com/item?id=8863",
      "comment_count": 71
    }
  ],
  "captured_at": "2026-08-21T00:00:00.000Z",
  "returned_results": 1
}
Teaching errors and limitations
  • invalid_input: The query, content type, time range, sort or result limit was outside the bounded Hacker News search contract.example: {"query":"My YC app: Dropbox - Throw away your USB drive","type":"story","sort":"relevance","limit":5}
Updated
21 August 2026

Use Search with Scrollport

Scrollport identifies and validates the best-in-class API tools and provides them on a pay-as-you-go basis so you don't need to maintain a separate provider account, subscription or credits.

Give your agent the setup prompt to receive $1 in trial credit and start using the tools right away.