---
title: "Hacker News API: endpoints, search and limits | Mentio"
description: "The two Hacker News APIs explained: the official Firebase API for items, users and story lists, and the Algolia search API for keywords and dates. Endpoints, curl examples, rate limits, and how to watch Hacker News for a keyword."
canonical: https://mentio.dev/blog/hacker-news-api/
markdown: https://mentio.dev/blog/hacker-news-api/index.md
last-updated: 2026-11-23T20:55:42.235Z
---

# Hacker News API: endpoints, search and limits | Mentio

> The two Hacker News APIs explained: the official Firebase API for items, users and story lists, and the Algolia search API for keywords and dates. Endpoints, curl examples, rate limits, and how to watch Hacker News for a keyword.

Source: https://mentio.dev/blog/hacker-news-api/

Hacker News has two APIs, and most confusion about “the Hacker News API” comes from mixing them up. The official one, run with Firebase, gives you items, users and the front page lists, but it cannot search. The Algolia one can search every story and comment by keyword and date, but it is a separate service with its own limits. This guide covers both: what each returns, the requests you will actually make, the limits, and how to watch Hacker News for a keyword without reading the whole site yourself.

Key takeaways

-   There are two free Hacker News APIs and neither needs a key: the official Firebase API (`hacker-news.firebaseio.com/v0`) and the Algolia HN Search API (`hn.algolia.com/api/v1`).
-   The official API returns items, users and the top, new, best, Ask, Show and job lists (up to 500 ids for top and new, up to 200 for Ask, Show and jobs) and states there is currently no rate limit. It has no search.
-   Algolia adds full-text search over stories and comments, newest-first ordering and date filters, at up to 10,000 requests an hour per IP, with pagination capped at 1,000 hits per query.
-   Hacker News produces roughly 300 to 1,100 new stories and comments an hour, so a keyword monitor reads by time window, not by page.
-   For alerts without code: hnrss.org (RSS) and F5Bot (email) are free; Mentio adds AI scoring and Slack, webhook and MCP delivery for $5 per keyword a month.

## Which Hacker News API should you use?

Use the official API to read things you already have the id of, and Algolia to find things by what they say:

Official API (Firebase)

Algolia HN Search API

Base URL

`https://hacker-news.firebaseio.com/v0/`

`https://hn.algolia.com/api/v1/`

Key or account

None

None

Search by keyword

No

Yes, stories and comments

Filter by date

No

Yes, `created_at_i` in Unix seconds

Story lists

Top, new (500), best, Ask, Show, jobs (200)

Front page via `tags=front_page`

Whole comment tree

One request per comment

One request per story (`/items/ID`)

Rate limit

“Currently no rate limit”

10,000 requests an hour per IP

Realtime

Firebase change notifications, `/updates`

Poll `search_by_date`

## What does the official Hacker News API return?

Everything on Hacker News is an **item**: a story, a comment, a job, an Ask HN, a poll or a poll option. You fetch one by id:

```
curl https://hacker-news.firebaseio.com/v0/item/8863.json
```

An item carries `id`, `type`, `by` (the author), `time` (Unix seconds), `title`, `url`, `text` (HTML), `score`, `descendants` (comment count), `kids` (the ids of its direct replies) and `parent` for comments. Deleted and dead items keep their id with `deleted` or `dead` set.

The lists return arrays of ids, newest or highest ranked first:

```
curl https://hacker-news.firebaseio.com/v0/topstories.json   # up to 500 ids
curl https://hacker-news.firebaseio.com/v0/newstories.json   # up to 500 ids
curl https://hacker-news.firebaseio.com/v0/showstories.json  # up to 200 ids
curl https://hacker-news.firebaseio.com/v0/maxitem.json      # the newest item id
```

A user lives at `/v0/user/USERNAME.json` with `created`, `karma`, `about` and `submitted` (their item ids). `/v0/updates.json` lists items and profiles that changed recently, and because the API is Firebase you can subscribe to changes instead of polling.

## How do you get the comments of a Hacker News story?

With the official API you walk the tree: fetch the story, then every id in `kids`, then the `kids` of each of those. A thread with 400 comments is 400 requests.

Algolia returns the whole tree in one call, nested:

```
curl https://hn.algolia.com/api/v1/items/8863
```

Each node has `author`, `text`, `created_at` and `children`. For anything that reads full discussions, this is the one to use.

## How do you search Hacker News with the API?

The official API has no search, so search means Algolia. Two endpoints, same parameters:

-   `/search` ranks by relevance, then points and comments. Good for “what has HN said about X”.
-   `/search_by_date` returns newest first. Good for “what is new about X”.

```
# Stories mentioning "supabase", newest first
curl "https://hn.algolia.com/api/v1/search_by_date?query=supabase&tags=story"

# Comments from the last 24 hours (Unix seconds)
curl "https://hn.algolia.com/api/v1/search_by_date?query=supabase&tags=comment&numericFilters=created_at_i>1759449600"

# Show HN posts with at least 100 points
curl "https://hn.algolia.com/api/v1/search?query=database&tags=show_hn&numericFilters=points>=100"
```

The parameters worth knowing:

-   `tags`: `story`, `comment`, `poll`, `show_hn`, `ask_hn`, `front_page`, `author_USERNAME`, `story_ID`. Tags are ANDed; wrap them in parentheses to OR them: `tags=(story,comment)`.
-   `numericFilters`: `created_at_i`, `points` and `num_comments` with `<`, `<=`, `=`, `>`, `>=`. A comma between two filters is an AND.
-   `hitsPerPage` and `page`: paging stops at 1,000 hits per query, however you split it.

Two quirks catch everyone. Comment and story bodies (`comment_text`, `story_text`) are HTML with entities encoded, so strip tags and decode `&#x27;` before you match text, but leave titles alone, they are plain text. And a query matches words, not phrases, unless you quote it: `query="hacker news api"`.

## What are the rate limits of the Hacker News API?

The official Firebase API says plainly that there is currently no rate limit. Be reasonable anyway: walking a big thread item by item is the fastest way to be the reason that changes.

Algolia limits each client to 10,000 requests an hour per IP address, and its pagination ends at 1,000 hits for any one query. The second limit matters more than the first. If you need more than 1,000 results, do not ask for page 6 of 200; narrow the time window with `numericFilters=created_at_i<=` and ask again.

## How do you monitor Hacker News for a keyword?

Polling `search_by_date` once per keyword works for a handful of terms. The pattern that holds up:

1.  Keep a cursor: the `created_at_i` of the newest item you have seen.
2.  Every hour, ask for `created_at_i>=cursor`, newest first. Use `>=`, not `>`, so items that share the cursor’s second are never skipped, and drop the duplicates you already have.
3.  If a page comes back full, read backwards: ask again with `created_at_i<=` the oldest second on that page, until you reach the cursor.
4.  Strip the HTML, then match. Count a comment as a mention, not only stories; most product talk on Hacker News happens in comments.

For volume: on November 23, 2026, Algolia counted between 304 and 1,077 new stories and comments per hour over the previous 24 hours (one `search_by_date` call per hour with `tags=(story,comment)` and `hitsPerPage=1`, reading `nbHits`). One global poll that reads all of them, matched against every keyword you care about, is cheaper than one search per keyword once you track more than a few terms. That is how Mentio reads it: one hourly pass over every new story and comment, matched against every customer’s keywords.

Get Hacker News mentions without writing the poller

Mentio reads every new Hacker News story and comment every hour, scores each match for relevance and intent, and sends it to Slack, email, a webhook or your agent.

claude mcp add --transport http mentio https://mcp.mentio.dev/mcp

[Start free](https://app.mentio.dev/login?mode=signup&utm_source=blog&utm_medium=post&utm_campaign=hacker-news-api)[Read the docs](https://docs.mentio.dev/mcp)

## What are the free ways to get Hacker News alerts?

If you want alerts and not an integration, you do not need either API:

Tool

What you get

Cost

[hnrss.org](https://hnrss.org)

RSS feeds of new stories or comments matching a query: `hnrss.org/newest?q=term`, `hnrss.org/newcomments?q=term`

Free

[F5Bot](https://f5bot.com)

An email when a keyword appears on Hacker News, Reddit or Lobsters

Free

Algolia search

Bookmark `hn.algolia.com/?query=term&sort=byDate` and check it

Free

[Mentio](/hacker-news/)

Hourly matches on Hacker News and 18 other platforms, scored for relevance, sentiment and intent, sent to Slack, Telegram, email, webhooks or an MCP agent

$5 per keyword a month, $0.008 per matched mention

hnrss and F5Bot are exact keyword matches, which is fine for a unique product name and noisy for a common word. The difference with Mentio is the filter: each match is read and scored, so “Vercel is down again” and “we moved off Vercel” reach you, and a passing link in a long thread does not.

## Frequently asked questions

Is the Hacker News API free?

Yes. Neither the official Firebase API nor the Algolia search API needs a key or an account, and neither charges. The official API states that there is currently no rate limit; the Algolia API asks clients to stay under 10,000 requests an hour per IP address.

How can I get an alert when my product is mentioned on Hacker News?

Free options: hnrss.org gives an RSS feed of new stories or comments matching a query (hnrss.org/newest?q=term, hnrss.org/newcomments?q=term), and F5Bot emails you matches from Hacker News, Reddit and Lobsters. Mentio reads every new Hacker News story and comment hourly, scores each match with AI and sends it to Slack, email, a webhook or your agent over MCP.

Where this applies

-   [Hacker News monitoringHow Mentio reads every new story and comment on Hacker News.](/hacker-news/)
-   [Reddit API pricingThe same guide for Reddit: keys, limits and pricing.](/blog/reddit-api-pricing/)
-   [X API pricingWhat reading X costs per post.](/blog/x-api-pricing/)
-   [PricingWhat a keyword and a mention cost on Mentio.](/pricing/)

Written by Pau Guirao, founder of Mentio. Prices and product facts were checked on November 23, 2026; if one has changed, [tell us](/contact/) and we will fix it.

## Related posts

[![](/blog/google-reviews-api/cover.png)](/blog/google-reviews-api/)

Nov 22, 2026

## [Google Reviews API: what each Google API returns](/blog/google-reviews-api/)

The two official ways to get Google reviews by API (the Business Profile API for your own listings and Place Details in the Places API for any place, capped at five reviews), what each costs, the display and caching rules, a curl example, and how to watch every new review of any place.

-   [Platforms](/blog/tag/platforms/)
-   [Google reviews](/blog/tag/google-reviews/)
-   [APIs](/blog/tag/apis/)

[![](/blog/trustpilot-api/cover.png)](/blog/trustpilot-api/)

Nov 22, 2026

## [Trustpilot API: endpoints, access, pricing and limits](/blog/trustpilot-api/)

What the Trustpilot API reads and who can use it: the public and private reviews endpoints, the API module and its yearly call tiers, the rate limit, Data Solutions for other companies, the scraping vendors and what they charge, and how to watch every new review of any company.

-   [Platforms](/blog/tag/platforms/)
-   [Trustpilot](/blog/tag/trustpilot/)
-   [APIs](/blog/tag/apis/)

[![](/blog/x-api-pricing/cover.png)](/blog/x-api-pricing/)

Oct 1, 2026

## [X API pricing in 2026: what every read and post costs](/blog/x-api-pricing/)

The X API is pay per use: $0.005 per post read, $0.010 per user read, $0.015 per post created and a 3 million read monthly cap. What that means for a bot, a dashboard and a keyword monitor, with the costs worked out.

-   [Platforms](/blog/tag/platforms/)
-   [X](/blog/tag/x/)
-   [APIs](/blog/tag/apis/)

## Start monitoring brand mentions

One request tracks your first keyword. The first scored mention lands within minutes, in Slack, a webhook, or your agent.

[Get your API key ›](https://app.mentio.dev/login?mode=signup)[Read the docs ›](https://docs.mentio.dev)

$5.80 free credit · no card · no subscription
