Hacker News
Hacker News story search with Algolia filters, story detail, full nested comment trees, and user profiles
Hacker News is a small platform with an outsized signal-to-noise ratio for anything developer-adjacent: launches, outages, hiring, and the unfiltered opinion underneath them. Four endpoints cover it, and all four are 1 credit.
Base URL: /v1/hackernews/...
page on /v1/hackernews/search is 0-indexed, unlike every other
page-paginated endpoint on this API. Sending page=1 skips the first results
rather than returning them.
Quickstart
1. Find the discussion
Stories are identified by their numeric id, which search returns as the objectID.
curl "https://www.socialcrawl.dev/v1/hackernews/search?query=claude%20code&tags=story" \
-H "x-api-key: YOUR_API_KEY"2. Read the thread underneath it
curl "https://www.socialcrawl.dev/v1/hackernews/story/comments?id=38712345" \
-H "x-api-key: YOUR_API_KEY"One call returns the whole thread. There is no pagination and no depth limit.
Search the archive
GET /v1/hackernews/search runs against the Algolia index behind HN's own search, and exposes Algolia's filters directly.
| Endpoint | Credits | What it returns | Key parameters |
|---|---|---|---|
GET /v1/hackernews/search | 1 | Ranked hits from the whole HN archive, each with its objectID and points | query, tags, numericFilters, hitsPerPage, page |
tagsdefaults tostory. The useful values arecomment,poll,show_hn,ask_hn,front_page, andauthor_<username>for one person's submissions. Pass several comma-separated to widen the search (tags=story,show_hn), and passcommentwhen you want to search what people said rather than what they posted.numericFilterstakes an Algolia expression oncreated_at_i, the Unix timestamp, which is the only filterable numeric attribute.numericFilters=created_at_i>1700000000restricts to stories after that moment, and several conditions joined by commas are ANDed. No filter is applied by default.hitsPerPageruns from 1 to 1000 and defaults to 30.pageis 0-indexed.
# Show HN launches mentioning "agent", 100 at a time
curl "https://www.socialcrawl.dev/v1/hackernews/search?query=agent&tags=show_hn&hitsPerPage=100&page=0" \
-H "x-api-key: YOUR_API_KEY"Read a story, its thread, or a person
| Endpoint | Credits | What it returns | Key parameters |
|---|---|---|---|
GET /v1/hackernews/story | 1 | One submission: title, link, author, points, comment count, publish time | id |
GET /v1/hackernews/story/comments | 1 | The whole discussion as a nested tree, each comment with its id, author, text, points, time, replies | id |
GET /v1/hackernews/profile | 1 | A user by handle: id, username, bio, karma, account creation date | handle |
HN handles are case-sensitive.
All endpoints
4 endpoints available.
| Endpoint | Path | Credit Tier |
|---|---|---|
| Get a Hacker News user profile | /v1/hackernews/profile | standard (1cr) |
| Search Hacker News | /v1/hackernews/search | standard (1cr) |
| Get a Hacker News story | /v1/hackernews/story | standard (1cr) |
| Get comments on a Hacker News story | /v1/hackernews/story/comments | standard (1cr) |
Platform notes
pagestarts at 0. Search is the exception to the house convention. Sendingpage=1skips the first results rather than returning them.- Points and comment counts are snapshots. HN scores move for hours after posting. If you are tracking a launch, re-fetch rather than trusting a first read.
- The site has no follower counts and no post counts, so those canonical fields come back empty on a profile rather than zero.
- Hacker News is also a universal-search source. If your question is "who is talking about this anywhere", universal search covers HN alongside Reddit, X, YouTube and the rest in one call. Come here when you need the full comment tree or Algolia's filters.
- The story id is the
objectIDon a search hit, and the number in anews.ycombinator.com/item?id=…URL.
