App Logo
hn.algolia.com

Search Hacker News with HN Search by Algolia

Automatically search Hacker News with HN Search by Algolia on hn.algolia.com. Search Hacker News stories and comments with HN Search (hn.algolia.com) and return one page of hits, 30 by default, with each hit's id, type, title, link, author, points, comment count, creation time, text and its Hacker News item link, plus the total hit count and page count. Filter by type (all, story, comment, Ask HN, Show HN, Launch HN, job, poll), sort by popularity or by date, and limit to a date range: a preset or your own start and end dates. Pages start at 0. A search with no match returns an empty list. For a comment, title and link are those of its story.

Inputs

query required

Search text, e.g. "browser automation". An empty text lists all items in the order chosen.

page optional

Result page, from 0.

Default: 0
sort optional

byPopularity or byDate (newest first).

Default: "byPopularity"
type optional

Kind of item to search.

Default: "all"
prefix optional

Also match words that start with the last search word. Omit to keep the site's setting.

dateEnd optional

Last day of a custom window, YYYY-MM-DD (UTC), included.

dateRange optional

Time window. Giving dateStart or dateEnd sets it to custom.

Default: "all"
dateStart optional

First day of a custom window, YYYY-MM-DD (UTC).

Output

url required

The HN Search page for this search.

hits required
page required
nbHits optional

Total number of matching items.

nbPages optional
hitsPerPage optional

FAQ

Search Hacker News stories and comments with HN Search (hn.algolia.com) and return one page of hits, 30 by default, with each hit's id, type, title, link, author, points, comment count, creation time, text and its Hacker News item link, plus the total hit count and page count. Filter by type (all, story, comment, Ask HN, Show HN, Launch HN, job, poll), sort by popularity or by date, and limit to a date range: a preset or your own start and end dates. Pages start at 0. A search with no match returns an empty list. For a comment, title and link are those of its story.
Ask an AI agent connected to Reduck to run reduck/hn.algolia.com/search, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/hn.algolia.com/search
You do not need one. "Search Hacker News with HN Search by Algolia" drives the real hn.algolia.com pages in a browser, so it works whether or not hn.algolia.com offers an API for this.
Required: query. Optional: page, sort, type, prefix, dateEnd, dateRange, dateStart.
It returns url, hits, page, nbHits, nbPages, hitsPerPage.
No. It only uses pages of hn.algolia.com that are reachable without signing in.
It only reads. It looks things up on hn.algolia.com and changes nothing there.
Ask an AI agent connected to Reduck to run reduck/hn.algolia.com/search, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/hn.algolia.com/search
It is one of Reduck's official scripts.

Start building not clicking