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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

HN Search can match more records than its ordinary pagination lets you retrieve: the reported ceiling is 1,000 hits per query. A large nbHits value is not proof that all those records are available, and a capped nbPages value can make an incomplete result look finished. To collect a date-bounded set, split it into smaller time slices, adapt the boundaries to returned records, deduplicate by objectID, and compare the final unique count with the first query’s nbHits.

What the 1,000-hit limit does—and does not—mean

The HN Search API reference describes pagination fields such as page, hitsPerPage, nbPages, and nbHits, but does not disclose a 1,000-hit retrieval ceiling. The issue tracker and later reported measurements show that the number of matching records can exceed the number returned through ordinary pagination. HN Search API reference · algolia/hn-search issue #101 · Listwright’s September 2026 measurements.

A matching count is not a fetched-record count

In a measurement reported by Listwright on September 20, 2026, a query had nbHits: 29152, returned 1,000 records, and reported nbPages: 1. In that response, nbHits represented the matching total, but the returned records were still capped. Treating the page metadata as proof that all 29,152 matches had been collected would be a mistake. These are author-reported endpoint measurements, not an official statistic issued by Algolia.

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

Two misleading response patterns

The issue tracker shows a different failure mode. Its date-filtered example reported 5,562 matching stories and 10 pages at 100 hits per page. Page 9 returned records; requesting page 10 returned an empty hits array, nbHits: 0, and a message: “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.” A client that checks only hits may mistake that limit response for an ordinary empty page.

Keep these cases distinct: one reported response exposed the full match count alongside only 1,000 returned records; the issue’s over-limit page response instead reported zero hits and explained the limit in a message. The warning that nbHits “lies” is therefore shorthand for metadata that can mislead, not evidence that the field always reports a false matching total.

Why increasing the page size is not a complete solution

Listwright reports that requests setting hitsPerPage=2000 to either /search or /search_by_date returned 1,000 hits and echoed hitsPerPage as 1,000. The same article reports that a request at the cap can appear successful without an explicit warning, while a later page can return a message. These behaviors are attributed to the author’s measurements and the issue example; the API reference does not document them.

For that reason, don’t use a requested page size, a plausible nbPages, or a successful HTTP response alone as a completeness check. Inspect any response message and count the records actually collected.

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

Collect a date-bounded set with adaptive slices

For stories in a time range, use /search_by_date with numeric filters on created_at_i, the integer timestamp field documented by the API, and retrieve slices that stay below the reported cap. A fixed slice duration cannot be assumed safe: activity varies, so a short interval can still contain too many matches while a much longer one may not.

  1. Record the initial count. Run the query for the full intended date range and save its original nbHits before narrowing the filters. Keep this value separately from later slice responses.
  2. Request a slice. Use /search_by_date and numericFilters to constrain created_at_i to a portion of the range. Use time ordering so you can identify the oldest returned record.
  3. Move the boundary based on the response. Set the next slice’s upper timestamp bound to the oldest hit returned by the preceding slice, then continue through the range. The cited procedure adapts the interval to observed records rather than relying on one universal number of seconds or days.
  4. Deduplicate boundary overlaps. Slices can overlap at a timestamp boundary. Keep one copy of each record using its objectID as the key.
  5. Check for new records and finish deliberately. Stop when a slice produces no new unique records, while confirming that the intended date range has been covered. Do not infer completeness merely from an empty page: an empty response may reflect the retrieval limit or an over-limit response rather than exhaustion of the date range.
  6. Reconcile counts. Compare the final number of unique objectID values with the original full-range nbHits. Do not replace that original count with the nbHits from the latest narrow or empty query.

Listwright reports one 30-day ask_hn example in which 1,080 unique retrieved records matched an initial nbHits of 1,080. That is a reported demonstration of the method, not a guarantee that matching counts will always reconcile: indexing changes, query behavior, or collection errors can still affect the result.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the count check can tell you

Matching the final unique-ID count to the initial nbHits is a useful consistency check. A mismatch is a reason to inspect the slices, boundaries, duplicate handling, response messages, and query filters. A match supports the collection’s internal consistency, but does not independently prove that the index was static or that every record in the real-world time period was indexed.

The API reference documents the endpoint and numeric-filter parameters; the 1,000-hit behavior and adaptive-slicing example come from the issue report and later author measurements, not from a published guarantee in the API documentation.

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

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.