Filter a Google Ads API GAQL report using custom, predefined, or period-based date ranges

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

Steps

  1. For a custom range, filter segments.date with BETWEEN and two ISO 8601 dates, or with >=/<= comparisons, in either extended (YYYY-MM-DD) or basic (YYYYMMDD) format
  2. For a predefined range, use segments.date DURING <RANGE>, choosing values like TODAY, YESTERDAY, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH, LAST_BUSINESS_WEEK, THIS_WEEK_SUN_TODAY/MON_TODAY, or LAST_WEEK_SUN_SAT/MON_SUN
  3. For period-based segmentation (not filtering), select fields like segments.week, segments.month, or segments.quarter and filter with = against the period's first day
  4. Combine date filters with other WHERE clauses in the same GAQL query as needed
  5. Run the query via GoogleAdsService.search or searchStream

Known gotchas

Related routes

Run a GAQL searchStream report via Google Ads API
developers.google.com/google-ads/api · 6 steps · unrated
Paginate Google Ads API GAQL search results with fixed 10,000-row pages
developers.google.com · 6 steps · unrated
Query and export Xero Profit and Loss report with custom date ranges via the Reports API
developer.xero.com · 5 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