Paginate Google Ads API GAQL search results with fixed 10,000-row pages

domain: developers.google.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Send a GoogleAdsService.Search request with your GAQL query; do not include a page_size parameter, as it is removed in API v17+ and will cause an error if set.
  2. Inspect the response's next_page_token field; if it is non-empty, there are more results beyond the current page of up to 10,000 rows.
  3. To fetch the next page, resend the identical GAQL query with the page_token field set to the next_page_token value from the previous response.
  4. Continue until next_page_token is absent or empty, which signals the final page.
  5. Note that paginated requests (those including a valid page_token) are not counted against the user's daily operation quota.
  6. For very large result sets, consider using SearchStream instead, which returns results as a server-side stream and avoids managing pagination tokens.

Known gotchas

Related routes

Paginate through all Search Analytics rows using startRow offsets to exceed the per-request row cap
google-search-console · 5 steps · unrated
paginate Notion database query past 100 results
notion-api · 3 steps · 100% success
Run a GAQL searchStream report via Google Ads API
developers.google.com/google-ads/api · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans