# Search

Hacker News

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

## Use this tool with your AI agent

1. Copy the prompt
2. Paste it into your agent
3. Tell it what you need

Read https://scrollport.com/start. Use my existing Scrollport connection, or help me connect if needed. Help me use Search (tool ID: hacker-news.search). Ask me for the details you need, then show me the result.

**Already connected:** Your agent can use that connection.

**New user:** Your agent will guide you through setup, sign-in and authorisation.

Provider access is included.

Connect your first agent to receive $1 trial credit.

**Job:** [Search Hacker News](https://scrollport.com/tools/hacker-news-api)

**Current price:** $0.0050/request

**Availability:** Ready to run

## Tool details

**About this tool**

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.

**Inputs and outputs**

### Input

`created_from` string · optional

Value supplied for created from.

format: date-time

`created_to` string · optional

Value supplied for created to.

format: date-time

`limit` integer · optional

Value supplied for limit.

minimum: 1 · maximum: 50

`query` string · required

Search terms used to find relevant records.

minLength: 1 · maxLength: 500

`sort` string · optional

Value supplied for sort.

enum: relevance, date

`type` string · optional

Value supplied for type.

enum: all, story, comment, job, poll

### Output

`captured_at` string

Returned captured at value.

`items` array

Returned items value.

`returned_results` number

Returned returned results value.

`sort` string

Returned sort value.

`type` string

Returned type value.

**Example request and output**

Inspect returns this reviewed example, its estimated cost and the current input schema. Run calculates the estimate for your actual input.

### 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
}
```

**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}

---

Canonical page: https://scrollport.com/tools/providers/hacker-news/search
