> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/hackernews/search>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/hackernews/search.mdx>

---

# Hacker News Search API

Full-text search across stories, comments, Ask HN, Show HN, jobs, and polls — with filters brand and launch monitors actually use.

`GET /v1/hackernews/search` is the dedicated search route. Pass a `query` (required unless `frontPageOnly`, `domain`, or `url` covers the request), send `x-api-key`, and read `data.hits` with page metadata under `data.page`. Optional filters include `type` (story, comment, ask_hn, show_hn, launch_hn, job, poll, or all), `sort` (popularity or date), `dateRange`, `author`, `domain`, `url`, and `minPoints`. Page with zero-based `page` and `pageSize` (up to 1,000 accessible hits).

Credit pricing for this operation comes from the API registry and appears on this page, and `meta.creditsCharged` is the billing source of truth. For ranked digests without a keyword, use the feeds route; for a known item id, use stories or items instead.

## Request

- **Endpoint:** `GET /v1/hackernews/search`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by query or front page
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/hackernews/search/get)
- **Platform page:** [/platforms/hackernews](https://www.socialfetch.dev/platforms/hackernews)

## FAQ

### How do I search Hacker News via API?

Call GET /v1/hackernews/search with your Social Fetch API key in the x-api-key header. Pass a query string, or use frontPageOnly, domain, or url when those filters replace a free-text query. Read data.hits and data.page. Full parameters are in the API docs linked from this page.

### How many credits does Hacker News search cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged — that field is the billing source of truth.

### What filters does Hacker News search support?

Optional type (all, story, comment, ask_hn, show_hn, launch_hn, job, poll), sort (popularity or date), dateRange (24h, week, month, year, all), author, domain, url, minPoints, frontPageOnly, and search-field toggles such as searchStoryText, searchAuthor, prefix, and typoTolerance. Keep filter values identical across pages.

### How does pagination work on Hacker News search?

Use zero-based page and pageSize query params. data.page reports returned, hasMore, nextPage, totalHits, and maxAccessibleHits (capped at 1,000). When hasMore is true, request the next page index with the same filters.

### Search vs feeds vs story lookup?

Use search for keyword, author, domain, or URL discovery. Use GET /v1/hackernews/feeds/{feed} for ranked digests (top, new, best, ask, show, jobs). Use GET /v1/hackernews/stories/{id} when you already know the story id.

### Do I need a Hacker News account?

No. Social Fetch authenticates with your Social Fetch API key only. You do not pass HN credentials for this public search route.

### Can I use this for brand or launch monitoring?

Yes. Teams poll search for product names, competitor domains, and minPoints thresholds, then fan out to story or comment routes when a hit needs a full thread. Persist meta.requestId when you need to debug an empty page.
