In short: GAQL is the language you use to ask the Google Ads API questions:
SELECTfields and metricsFROMa resourceWHEREconditions. The interface is just a view of the same thing. It does three things the screen doesn't: cross-referencing, volume and your own history. It changes nothing and cannot show what Google doesn't expose.
This whole course has kept repeating that "the scripts read through GAQL what the interface hides". This module explains what that means, so you know which questions you can ask Google Ads, how they are phrased and what their limits are — with no programming needed. What you learn here will help you ask for better data, audit a script and understand where every figure in a sheet comes from.
What is GAQL?
GAQL (Google Ads Query Language) is the query language of the Google Ads API: the way to tell Google "give me these columns, from this table, with these conditions". It looks like the SQL used in databases and it reads almost like plain English:
SELECT campaign.name, metrics.cost_micros, metrics.conversions
FROM campaign
WHERE segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESC
"Give me the name, the cost and the conversions of every campaign over the last 30 days, sorted by cost."
Why does GAQL exist?
The Google Ads interface is a view of the data; the API is access to the data. Everything the interface shows comes from the API (plus a bit more that the interface does not show, or shows aggregated, or takes a while to show). GAQL is the language for asking for it directly: from a script, from a tool, from a report of your own.
What is the difference between GAQL and the interface?
| Concept | In the interface | In GAQL |
|---|---|---|
| Resource (table) | Tabs: Campaigns, Ad groups, Keywords, Search terms… | campaign, ad_group, keyword_view, search_term_view, shopping_performance_view, detail_placement_view… (dozens) |
| Field (attribute) | Text columns: name, status, type | campaign.name, campaign.status, campaign.id, ad_group_criterion.keyword.text… |
| Metric | Numeric columns | metrics.clicks, metrics.cost_micros (in millionths), metrics.conversions, metrics.search_impression_share… |
| Segment | The "Segment" button | segments.date, segments.device, segments.ad_network_type, segments.conversion_action_name… |
| Filter | The funnel icon | WHERE campaign.status = 'ENABLED' AND metrics.clicks > 100 |
Everything has a name and a type; there is no ambiguity. And every resource documents which fields, metrics and segments it accepts.
Where do GAQL queries run?
- Google Ads scripts (
AdsApp.report(query)orAdsApp.search(query)): the Suite's route. The script runs the query inside the account and writes the result wherever it wants. - The Google Ads API (external programs with credentials): for platforms and tools.
- Google's online tools for learning: the query builder (you pick a resource and fields and it assembles the query for you) and the validator (it checks the syntax). They are the way to start without writing a line of code.
What does GAQL allow that the interface doesn't?
- Joins the interface does not offer: search terms with their keyword, their match type, their ad group, their campaign and their conversions by action, all in a single table; PMax placements; hour-of-day and day-of-week statistics per campaign; Quality Score components per keyword with daily history if you store it.
- Volume: thousands of rows every night, with no manual paging and no exporting.
- Your own history: the interface shows today's state; a script that queries through GAQL every day and stores the result builds the time series Google does not give you (daily QS, daily IS, ad asset performance across months).
What can't GAQL do?
- It does not show what Google does not expose (the full auction insights, certain PMax breakdowns, search terms below the privacy threshold).
- It does not change anything: GAQL reads. Changes go through other calls (mutations) with their own permissions.
- It has strict rules: whatever you filter on must be selected, date segments require a range, and each resource accepts only its own fields.
💡 Ninja trick: the house rule at Ninja Scripts for GAQL is the one that prevents the most errors: if a field is in the WHERE, it is also in the SELECT, and campaigns and ad groups are identified by
campaign.idandad_group.id, never by name (names change and break the joins). If you ever read a script's query, those two things tell you whether whoever wrote it knew what they were doing.
What you should remember
- GAQL is the API's query language: SELECT fields and metrics FROM a resource WHERE conditions.
- Resources, fields, metrics and segments with fixed names; the interface is a view of the same thing.
- It runs in scripts, in the API and in the online builder/validator.
- It gives you joins, volume and your own history; it changes nothing and it does not show what Google does not expose.