Hacker News reference
Hacker News API guide
Search Hacker News submissions or comments, resolve a selected story and retain the relationships in its available comment tree.
Quickstart
Start with Hacker News
Search Hacker News submissions or comments, resolve a selected story and retain the relationships in its available comment tree.
These requests use your API key and can spend credits. Check the current price on the endpoint page; each new page is a separate request. Later examples use illustrative identifiers: replace them with values from your earlier response.
1. Find stories
Keep id for the story lookup and hn_url for a discussion citation. url can point to an external article. Parameters and current cost →
curl "https://www.monocrawl.com/v1/hackernews/search?query=developer%20tools&tags=story" \ -H "x-api-key: mn_your_key_here"
2. Open the discussion
Replace the illustrative id with one returned by search. Preserve source text and timestamps. Parameters and current cost →
curl "https://www.monocrawl.com/v1/hackernews/story?id=8863" \ -H "x-api-key: mn_your_key_here"
3. Read the comment tree
Use the same story id. Keep parent_id and depth; inspect truncation and coverage. Parameters and current cost →
curl "https://www.monocrawl.com/v1/hackernews/story/comments?id=8863" \ -H "x-api-key: mn_your_key_here"
Filters and coverage
Choose filters with the source behavior in mind
| Control | Behavior and limits |
|---|---|
| Search filters | tags selects story/comment and other supported kinds. numericFilters constrains numeric fields; created_at_i is Unix seconds, not milliseconds. Search page is zero-based. Endpoint reference → |
| Discussion versus destination | hn_url identifies the discussion; url can be an external destination. Keep both for citations. Endpoint reference → |
| Comment trees | The tree is flattened with parent IDs and depth under server bounds. Deleted nodes can be skipped while their visible replies remain. A tree response is not a cursor-paged search. Endpoint reference → |
Source availability, ordering and field coverage can change. Inspect warnings and partial-result metadata alongside the rows. See runnable workflows, metric semantics, computed fields and the pagination matrix.
Choose an endpoint
Match the operation to your task
| Your task | Endpoint | When to use it |
|---|---|---|
| Search comment text | search | Choose tags=comment instead of assuming story search covers comment bodies. |
| Read a user | profile | Use the declared username input, separate from numeric item IDs. |
Explore all documented operations by purpose below. Each endpoint reference contains its accepted parameters and current price.
Accounts and audiences
Search and discovery
Posts and media
Comments and replies
Operations
Hacker News
Each row is a registry operation: expand it for parameters, a curl built from the registry's own examples, and a Markdown copy of the whole entry. The badge on the right is the operation's state, read at request time — we publish all three rather than rounding up. Recorded proof is historical, not a guarantee of current availability.
- live · proven
- a real upstream response has been served through this API and recorded
- wired · unproven
- a real-data route is registered, but qualifying proof is absent; permission or capacity restrictions may apply
- sample · free
- no live upstream — /v1 refuses it, /sandbox returns a marked sample
Hacker News
4 operationsElsewhere
The same registry, other shapes
- Hacker News overview — supported data categories and use cases for this platform.
- Full endpoint reference — every platform on one page.
/openapi.jsonor/openapi.yaml— the machine-readable contract, for Postman, Insomnia or a client generator.GET /v1/utility/endpoints?platform=hackernews— the same rows to your code at runtime, for 0 credits.