start parameter. Understanding how start works — and the hard cap it carries — is essential for building a seamless, non-breaking pagination experience. This guide explains the 1-based indexing scheme, shows you how to calculate the number of available pages from searchInformation.totalResults, and provides ready-to-use helper functions in JavaScript and Python.
How the start parameter works
The start parameter sets the index of the first result to return. It is 1-based, meaning:
start=1returns results 1–10 (the default first page)start=11returns results 11–20 (page 2)start=21returns results 21–30 (page 3)- …and so on
num results (default 10, maximum 10). The formula for the start index of any given page is:
Compute total available pages
The response includes asearchInformation.totalResults field — a string representing the estimated total number of matching documents across the web. Use it only to display friendly context to users (e.g., “About 1,430,000 results”). Do not use it to compute how many API pages you can fetch; always cap your pagination at page 10 (start 91).
Make a paginated API request
A paginated request is identical to a standard search request — just addstart:
Build pagination URLs for a UI
Use a helper function to generate the URL parameters you need for pagination controls (previous, next, and numbered page links):Inspect pagination metadata in the response
The API response includes aqueries object that tells you exactly which results are in the current response and what the next page looks like:
Use
queries.nextPage and queries.previousPage as a guard: if nextPage is absent from the response, you have reached the last available page. This is more reliable than computing pages from totalResults alone, especially for queries with fewer than 100 matching documents.100-result cap: what it means in practice
Google’s Custom Search API only returns a maximum of 100 results per unique query, regardless of how many results actually exist in the index. Here are the practical implications:Why does the cap exist?
Why does the cap exist?
The Custom Search JSON API is a web service, not a full-index export tool. The 100-result cap is a product boundary that balances server load, rate limits, and the reality that users rarely look past the first few pages of search results.
How do I get more results for a single topic?
How do I get more results for a single topic?
You can break a broad query into narrower sub-queries to cover more ground. For example, instead of a single query for
python, use python tutorials, python libraries, python frameworks, etc. You can also use dateRestrict or sort=date to partition by time window.Does start=91 always return 10 results?
Does start=91 always return 10 results?
Not necessarily. If fewer than 100 documents matched your query,
start=91 may return fewer than 10 items — or an empty items array if fewer than 91 matched. Always check items for undefined or an empty array before rendering.Common mistakes to avoid
- Using
totalResultsto compute API pages. This number can be in the millions, but you can only fetch the first 100 results. Always cap your page calculation at 10. - Setting
startto 0. The parameter is 1-based;start=0returns an error. The default isstart=1. - Mixing
startandnumincorrectly. If you setnum=5, page 2 starts atstart=6, notstart=11. Always use the formulastart = (page - 1) * num + 1. - Not handling an empty
itemsarray. For the last page of a result set,itemsmay have fewer elements thannum, or may be absent entirely.
Next steps
Build a Search App
See pagination wired into a complete end-to-end search application.
Localization
Restrict results by language and region to improve relevance for your users.