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
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
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
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
Combine date filters with other WHERE clauses in the same GAQL query as needed
Run the query via GoogleAdsService.search or searchStream
Known gotchas
DURING predefined ranges and BETWEEN custom ranges use different syntax and can't be mixed in the same segments.date clause
Period fields like segments.month must be filtered by their first-day date value with =, not treated as free text or filtered with BETWEEN
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?