GAQL — Google Ads Query Language — is the language every Google Ads API report is written in. One statement — SELECT fields FROM one resource, with optional WHERE, ORDER BY and LIMIT — describes exactly which columns, rows and date range come back. The Google Ads UI builds these queries behind its screens; the API makes you, or your AI, write them. And that is the honest 2026 update: you no longer need to write GAQL. You need to read enough of it to check what an AI wrote for you.
How a GAQL query is built
A representative query:
SELECT
search_term_view.search_term,
metrics.cost_micros,
metrics.conversions
FROM search_term_view
WHERE segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESC
LIMIT 50
Four parts, four jobs. FROM names exactly one resource — the table-like view the query runs against: campaign, ad_group, keyword_view, search_term_view, change_event. SELECT names fields of that resource, plus metrics.* (the numbers) and segments.* (the slicers, such as date or device). WHERE filters — and carries the date range. ORDER BY and LIMIT shape the output. Selecting a segment splits rows by it: add segments.device and each campaign comes back as one row per device.
Money needs one reflex: the API returns cost in micros — millionths of the currency unit. A cost_micros of 12,500,000 is 12.50 in account currency. Every sane tool divides before showing you, and an undivided micros column is the first thing to suspect when a number looks absurdly large.
GAQL vs SQL: the differences that trip people up
- No JOINs. One resource per query; relationships are pre-baked into the resources themselves, which is why views like
keyword_viewexist at all. - No GROUP BY. Aggregation is implicit in the resource; slicing happens by selecting segments, not by grouping.
- No SELECT-star. Every field is named explicitly — verbose, but self-documenting.
- Dates are special.
DURING LAST_30_DAYS, orBETWEENtwo ISO dates — the range lives in WHERE, and getting it wrong quietly answers a different question than you asked. - Zeros need asking for. Whether entities with no impressions appear depends on the resource and filters — a "missing" keyword is usually a filtered keyword, not a deleted one.
Five useful queries, written as plain-English prompts
With a connected account, prompts do the writing — a Google Ads MCP server exposes the query tool and the AI fills in the GAQL:
- "Search terms with spend and zero conversions, last 30 days, worst first" — the waste finder, straight into search terms report territory.
- "Campaign spend, conversions and conversion value by week, last eight weeks" — the trend baseline.
- "Keywords whose Quality Score components are below average, with their spend" — the diagnostic pull.
- "Everything that changed in this account in the last 14 days" —
change_event, the audit view. - "Conversion rate by device per campaign, this quarter" — the segment slice.
More where these came from in the prompt library.
Four checks on a query an AI wrote
An AI writes GAQL fluently and fast — and like any fluent writer, it can be confidently wrong in quiet ways. Four checks catch nearly everything:
- The date range. Is
WHERE segments.datethe period you asked about? A defaulted or shifted range is the commonest silent error. - Micros. Confirm the division happened; a figure a million-fold off is an undivided
cost_micros. - The resource. Search terms come from
search_term_view, notkeyword_view— the answer changes with the FROM. - Zeros and filters. Before believing an entity vanished, ask what filtered it.
The queries are no longer the skill. The verification reflex is — and it takes ten seconds per query, which is a fair price for acting on numbers you trust.