Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › API

HN Search’s 1,000-Hit Limit: What `nbHits` and Pagination Really Mean

By Freedom251 Team · · 3 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

HN Search can match more than 1,000 records but return no more than 1,000 for a query through ordinary pagination. A large `nbHits` value is the matching total, not proof that every matching record is retrievable: capped page metadata can make a partial result set look complete. For date-based collection, split the window into adaptive slices, deduplicate records, and compare the final unique IDs with the original matching count.

What the 1,000-hit limit means

The HN Search API reference documents pagination fields such as `page`, `hitsPerPage`, `nbPages` and `nbHits`, but does not disclose a 1,000-hit retrieval ceiling. A concrete example appears in an algolia/hn-search issue opened August 29, 2022: a date-filtered query reported 5,562 matching stories, 100 hits per page and 10 pages. Page 9 returned records; requesting page 10 returned no hits and a limit message.

As an Amazon Associate I earn from qualifying purchases.

The message reproduced in that issue says: “you can only fetch the 1000 hits for this query. You can extend the number of hits returned via the paginationLimitedTo index parameter or use the browse method.” That is the response text shown in the issue, not a guarantee that those alternatives are available to ordinary API clients.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More recent observations, reported by Listwright from measurements run September 20, 2026, found requests for 2,000 hits on both `/search` and `/search_by_date` returned 1,000. The response echoed `hitsPerPage` as 1,000. These are author-reported measurements, not an official service specification.

#1 Best Overall
Sale

Why `nbHits` can mislead without always being wrong

In one Listwright example, `nbHits` was 29,152 while the response contained 1,000 hits and reported `nbPages: 1`. In that case, `nbHits` represented the matching total; the misleading signal was the combination of a single reported page and a capped result set, which could be mistaken for complete pagination.

That is different from the over-limit page in the 2022 issue, where the response had an empty `hits` array, `nbHits: 0` and a message explaining the limit. A client that checks only `hits` or `nbHits` may treat that response as ordinary exhaustion and discard the explanation. Read the entire response, including any `message`, and do not assume page metadata proves that all matches were returned.

How to retrieve a date range more safely

For date-bounded retrieval, the API reference documents `/search_by_date` and numeric filters on `created_at_i`. The adaptive method described by Listwright uses time-ordered results and adjusts the upper boundary as it proceeds, rather than assuming one fixed interval will always stay below the cap.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Record the initial count. Run the query for the full intended date range and save its `nbHits` before narrowing the range. Keep that value separately; do not replace it with the count from a later slice or empty query.
  2. Fetch a bounded slice. Use `/search_by_date`, a `numericFilters` condition on `created_at_i`, and time ordering. Keep each slice below the reported ceiling where possible.
  3. Advance using the returned records. Set the next slice’s upper timestamp boundary to the oldest record returned by the previous slice. The appropriate interval depends on the result density; the sources do not establish a universally safe slice width.
  4. Deduplicate boundary overlap. Adjacent slices can include records sharing a timestamp at their boundary. Deduplicate by `objectID` so the same record is not counted twice.
  5. Reconcile the result. Compare the number of unique retrieved `objectID` values with the original query’s saved `nbHits`. Stop when a slice returns no new records, but treat that as a practical stopping signal, not proof by itself that every intended match was collected.

Listwright reports one 30-day `ask_hn` example in which 1,080 unique records matched an initial `nbHits` of 1,080. That demonstrates a reconciliation check for that run; it does not guarantee completeness for other queries or rule out changes in indexing or query behavior.

Rank #3
Sale
1,000 Books to Read Before You Die: A Life-Changing List
  • Book - 1, 000 books to read before you die: a life-changing list (1000 before you die)
  • Language: english
  • Binding: hardcover
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to check in a client

  • Preserve the original query’s `nbHits` independently from per-slice counts.
  • Inspect `hits`, `nbHits`, `nbPages`, `hitsPerPage` and any `message` together.
  • Do not infer full coverage just because the last advertised page is empty or `nbPages` is small.
  • Deduplicate by `objectID` and report the final unique count alongside the initial matching count.
  • Choose slice boundaries based on the records returned, not a fixed time width assumed to work for every query.

The API reference describes the pagination parameters, while the 1,000-hit behavior comes from the issue example and the later author-reported measurements. Treat the ceiling and response patterns as observed behavior rather than a complete official contract.

Quick Recap

SaleBestseller No. 1
The Phantom Tollbooth
The Phantom Tollbooth
Great product!
$7.64
Bestseller No. 2
SaleBestseller No. 3
1,000 Books to Read Before You Die: A Life-Changing List
1,000 Books to Read Before You Die: A Life-Changing List
Book - 1, 000 books to read before you die: a life-changing list (1000 before you die); Language: english
$18.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

APIdata retrievalHN Searchpagination

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.