Skip to main content
When your users want more than the first 10 results, the Custom Search JSON API lets you page through up to 100 results per query using the 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=1 returns results 1–10 (the default first page)
  • start=11 returns results 11–20 (page 2)
  • start=21 returns results 21–30 (page 3)
  • …and so on
Each “page” contains up to num results (default 10, maximum 10). The formula for the start index of any given page is:
For the default of 10 results per page:
The maximum allowed value of start is 91. Combined with num=10, this gives a hard ceiling of 100 results per query, regardless of how many total results searchInformation.totalResults reports. Requests with start greater than 91 return an error.

Compute total available pages

The response includes a searchInformation.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 add start:
This returns results 11–20 — the second page.

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 a queries 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:
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.
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.
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 totalResults to 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 start to 0. The parameter is 1-based; start=0 returns an error. The default is start=1.
  • Mixing start and num incorrectly. If you set num=5, page 2 starts at start=6, not start=11. Always use the formula start = (page - 1) * num + 1.
  • Not handling an empty items array. For the last page of a result set, items may have fewer elements than num, 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.