Hacker News Algolia Search avatar

Hacker News Algolia Search

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Hacker News Algolia Search

Hacker News Algolia Search

Full-text search across all of Hacker News — stories, comments, Ask/Show HN, polls — by keyword, author, date or points, powered by the free official HN Algolia API. Returns clean JSON with title, url, author, points and comment counts. No key or login required.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Assia Fadli

Assia Fadli

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Share

Run a full-text search across all of Hacker News — every story, comment, poll and Ask/Show HN post — straight from its free, official Algolia search API. There is nothing to configure — no API key, no login, and no proxy — the index is public and rock-solid.

Type a query, pick what kind of item you want, optionally filter by author, sort by relevance or date, and get back one tidy JSON row per result.

Features

  • Full-text search over the entire Hacker News archive via Algolia.
  • Filter by item type: Stories, Comments, Polls, Show HN, Ask HN or Front page.
  • Optionally restrict results to a single author.
  • Sort by relevance or newest first.
  • Transparently pages through results until your Max items limit is reached.
  • Emits one flat, ready-to-use JSON record per result.
  • Skips gracefully over any malformed hit so a single bad row never stops the run.

Input

FieldTypeDefaultDescription
querystringKeywords to search for across Hacker News.
tagsselectstoryResult type: story, comment, poll, show_hn, ask_hn, front_page.
sortByselectrelevancerelevance (best match) or date (newest first).
authorstringOptional. Only results by this HN username.
maxItemsinteger50Maximum number of results to fetch.

Example input

{
"query": "rust",
"tags": "story",
"sortBy": "relevance",
"maxItems": 50
}

Or find the newest comments by a given author:

{
"query": "typescript",
"tags": "comment",
"sortBy": "date",
"author": "pg",
"maxItems": 25
}

Output

Each dataset record looks like this:

{
"objectId": "40584021",
"title": "Rust in the Linux kernel",
"url": "https://example.com/rust-kernel",
"author": "pg",
"points": 412,
"numComments": 187,
"storyText": null,
"tags": ["story", "author_pg", "story_40584021"],
"createdAt": "2024-06-11T14:22:07.000Z",
"hnUrl": "https://news.ycombinator.com/item?id=40584021"
}
FieldDescription
objectIdHacker News item ID (Algolia objectID).
titleStory title (falls back to the parent story's title for comments).
urlThe story's external URL (null for Ask HN / text posts).
authorAuthor username.
pointsPoints/upvotes (null for comments).
numCommentsComment count (null for comments).
storyTextBody text for stories, or the comment body for comments, as raw HTML.
tagsThe Algolia _tags array attached to the hit.
createdAtSubmission time as an ISO 8601 timestamp.
hnUrlLink to the item on Hacker News.

Pricing

This actor uses the pay-per-event model: you are charged once per successfully returned search result (the result-scraped event). If the pay-per-event budget is reached mid-run, the actor stops so you are never billed further.

Data source

The actor talks to the official Hacker News search API powered by Algolia:

  • Relevance: https://hn.algolia.com/api/v1/search
  • Newest first: https://hn.algolia.com/api/v1/search_by_date
  • Query params: query, tags, hitsPerPage, page

The API is free and requires no authentication.

License

MIT © Assia Fadli