canonical: https://jentic.com/apis/hn.algolia.com/hn-algolia

# Hn Algolia Hacker News Search API (Algolia)

The Hacker News Search API, powered by Algolia, provides public keyword search over the full Hacker News archive of stories and comments. Results can be ranked by relevance through the search operation or ordered reverse-chronologically through the search-by-date operation, and both can be narrowed by tags such as story or comment and by numeric time filters. The API is public and requires no key.

## For AI agents

Search the full Hacker News archive of stories and comments by keyword, ranked by relevance or ordered by date, with tag and time filtering. No key required.

## Scope

Does not post, vote, or read individual items by ID, and does not cover user profiles. Use for keyword search over the Hacker News archive only.

## Capabilities

- Search Hacker News stories and comments by keyword, ranked by relevance
- Search the archive ordered from newest to oldest
- Filter results by tags such as story or comment
- Filter results by a time range using numeric filters
- Page through large result sets

## Use cases

### Agent-Powered Hacker News Monitoring

An AI agent tracking what the tech community says about a product or topic searches the Hacker News archive on a schedule. The Hacker News Search API returns keyword matches across stories and comments ordered by date, so the agent can surface new mentions since its last check through Jentic.

Example prompt: Search Hacker News by date for a keyword and return posts newer than a given timestamp

### Relevance-Ranked Research Lookup

When researching a topic, an agent wants the most relevant Hacker News discussions rather than the newest. The search operation ranks results by relevance, so the agent can pull the top matching stories and comments to summarize a topic's history on Hacker News.

Example prompt: Search Hacker News by relevance for a topic and return the top-ranked stories

### Filtered Story or Comment Search

An app needs to search only stories or only comments within a time window. The Hacker News Search API accepts tag and numeric time filters, so a client can restrict a keyword search to a specific item type and date range.

Example prompt: Search Hacker News for a keyword restricted to comments within the last week

## Key resources

- **Search** — Keyword search across stories and comments ranked by relevance
- **Search by Date** — Keyword search ordered from newest to oldest with tag and time filters

## Why Jentic

- **Setup:** Wiring the Hacker News Search API by hand means building the query, tag, and time-filter parameters and paging through results yourself. Through Jentic you install once, import the API from the Directory, and your agent searches the archive with no key to configure.
- **Permission scoping:** The API is read-only with two search operations and no write path, so a rule simply governs whether your agent may search at all. You choose which operations it may call, so it can run keyword searches and nothing more.
- **Credential handling:** The Hacker News Search API is public and keyless, so there is no credential to store or inject. Jentic still logs every request your agent makes for review.
- **Discovery method:** Agents search Jentic by intent such as 'search hacker news for a topic' or 'find recent hacker news comments', and Jentic returns the matching search operation with its input schema.

## Related APIs

- **Hacker News Firebase API** — The official Firebase Hacker News API browses items, users, and lists by ID but offers no keyword search, complementing the Algolia search index.
- **News API** — News API searches articles across mainstream news publishers, an alternative when the agent needs press coverage rather than Hacker News discussion.
- **GNews API** — GNews searches and aggregates news articles by keyword, another option when the agent wants news coverage rather than the Hacker News archive.

## FAQ

### Does the Hacker News Search API require an API key?

No. The Hacker News Search API is public and keyless, so there is no key or token to configure, per its OpenAPI spec. Through Jentic your agent calls the search operations directly, and every call it makes is logged for review.

### Is there a Hacker News Search API MCP server?

You don't need an MCP server to give your agent Hacker News search. Jentic connects the API directly from the API Directory: import it and your agent searches the archive as it needs to. Nothing extra is loaded into the agent's context until a call is made.

### Can I limit what my agent is allowed to do with the Hacker News Search API?

Yes. The API is read-only and has just two operations, relevance search and date-ordered search, and you choose which of them your agent may call. It can search the archive and do nothing else.

### Can I search only recent Hacker News posts?

Yes. The search-by-date operation orders results from newest to oldest and accepts numeric time filters, so an agent can restrict a keyword search to a recent window.

### How do I search Hacker News through Jentic?

Search Jentic for 'search hacker news', which returns the search operation with its input schema. Add the Hacker News Search API from the Jentic API Directory, and your agent can query the archive right away since no key is needed. To run it on your own infrastructure, install Jentic One from its GitHub repo.
