Back to blog

10 GAQL Queries for Auditing a Google Ads Account (Copy-Paste, API v26)

Ten copy-paste Google Ads Query Language (GAQL) queries for an account audit: settings, impression share, search terms, Quality Score, policy, conversions, landing pages and change history. Validated against the v26 field reference.

DetectivePPC·about 21 hours ago·12 min read

Last verified: 2026-12-03, against the Google Ads API v26 field reference (latest release: v26.2, Nov 11, 2026) and Google's GAQL guides on query structure, date ranges, ordering and limiting and change event. Every field below was checked for selectability with its FROM resource in v26.

The Brief

  • Ten GAQL queries cover most of a manual audit: account settings, campaign settings, impression share, daily trend, wasted search terms, Quality Score, ad policy, conversion actions, landing pages and change history.
  • Each query was checked field by field against Google's v26 reference: every field exists, is selectable with the FROM resource, and every WHERE/ORDER BY field is filterable or sortable.
  • They run anywhere GAQL runs: the Google Ads API, Google Ads scripts (AdsApp.search() / AdsApp.report()), or an AI assistant that uses Google's Google Ads MCP server.
  • Watch the units and the limits: costs are in micros, date ranges follow the account's time zone, and change_event needs both a 30-day window and a LIMIT.
  • Run them against a client account, not the manager account. Some fields, like optimization score, are null for manager accounts.

A GAQL query is the fastest way to answer an audit question with evidence instead of clicking through ten screens. The catch is that LLMs and old blog posts often produce queries with fields that don't exist, or that can't be selected together. So every query here was checked against the current field reference before we published it. Copy them, change the thresholds, and keep them in a file.

Before you run anything

A few rules from Google's docs that trip people up:

  • Costs and budgets are in micros. Google's reference says one million micros equals one currency unit. cost_micros = 50000000 is 50 in the account's currency.
  • Dates use the account's time zone. Google says all date ranges are evaluated relative to customer.time_zone, not UTC or your computer's clock. LAST_30_DAYS means the last 30 days not including today.
  • If you select segments.date, you must filter it. It's a "core date segment," so the WHERE clause needs a finite date range. You can filter on segments.date without selecting it.
  • You can only ORDER BY fields you selected (Google lists ordering on non-selected metrics and segments as not allowed).
  • Zero rows disappear. Google says rows where all selected metrics are zero are not returned. If a campaign is missing from a metrics query, check whether it had any activity in the range.
  • Access. To query production accounts through the API, your Google Cloud project needs Explorer, Basic or Standard access. See our guide to Google Ads API access levels.

1. Account-level settings

SELECT
  customer.descriptive_name,
  customer.currency_code,
  customer.time_zone,
  customer.auto_tagging_enabled,
  customer.optimization_score
FROM customer

What to look for: auto_tagging_enabled = false on an account that reports into Google Analytics is the first thing to question. Note the time zone and currency before you read any other result, since every date range and micros value depends on them. Google's reference says optimization_score runs from 0.0 to 1.0 and is null for manager accounts. It's Google's estimate, not an audit score, so treat it as context only.

2. Campaign settings that quietly cost money

SELECT
  campaign.name,
  campaign.advertising_channel_type,
  campaign.bidding_strategy_type,
  campaign.network_settings.target_search_network,
  campaign.network_settings.target_partner_search_network,
  campaign.network_settings.target_content_network,
  campaign.geo_target_type_setting.positive_geo_target_type,
  campaign_budget.amount_micros
FROM campaign
WHERE campaign.status = 'ENABLED'

What to look for:

  • Search campaigns with target_content_network = true. That's the Display Network opt-in. It isn't always wrong, but it should be a decision someone made.
  • target_partner_search_network = true on campaigns where nobody has looked at search partner performance.
  • positive_geo_target_type = PRESENCE_OR_INTEREST. The v26 enum also includes PRESENCE and SEARCH_INTEREST. If a local business is showing ads to people who are only "interested" in its area, read our breakdown of presence or interest location targeting.
  • Bidding strategy vs. budget. Divide amount_micros by 1,000,000 to get the average daily budget and compare it with the bidding strategy in use.

3. Impression share lost to budget and rank

SELECT
  campaign.name,
  metrics.cost_micros,
  metrics.search_impression_share,
  metrics.search_budget_lost_impression_share,
  metrics.search_rank_lost_impression_share
FROM campaign
WHERE campaign.advertising_channel_type = 'SEARCH'
  AND campaign.status = 'ENABLED'
  AND segments.date DURING LAST_30_DAYS
ORDER BY metrics.search_budget_lost_impression_share DESC

What to look for: high budget-lost share means the campaign runs out of money. High rank-lost share means Ad Rank is the problem (bids, ad quality, or both), and more budget won't fix it. Mind the caps in Google's field descriptions: search impression share below 0.1 is reported as 0.0999, and both "lost" metrics above 0.9 are reported as 0.9001. So 0.9001 means "90% or more," not exactly 90.01%.

4. Daily trend for spotting breaks

SELECT
  segments.date,
  campaign.name,
  metrics.cost_micros,
  metrics.clicks,
  metrics.conversions,
  metrics.cost_per_conversion
FROM campaign
WHERE segments.date DURING LAST_30_DAYS
  AND campaign.status = 'ENABLED'
ORDER BY segments.date

What to look for: a day where conversions drop to zero while clicks stay normal usually points at tracking, not demand. A sudden step up in cost with flat clicks points at CPCs. Put the output in a sheet and chart cost and conversions per campaign. If you'd rather have this checked every day, our post on CPC spike detection covers how to set thresholds.

5. Search terms spending with no conversions

SELECT
  search_term_view.search_term,
  search_term_view.status,
  campaign.name,
  ad_group.name,
  metrics.cost_micros,
  metrics.clicks,
  metrics.conversions
FROM search_term_view
WHERE segments.date DURING LAST_30_DAYS
  AND metrics.conversions = 0
  AND metrics.cost_micros > 50000000
ORDER BY metrics.cost_micros DESC
LIMIT 200

What to look for: this returns search terms that spent more than 50 (in account currency) in the last 30 days with zero conversions. Change 50000000 to fit the account's CPA. search_term_view.status tells you whether the term is already ADDED, EXCLUDED, ADDED_EXCLUDED or NONE, so you can skip terms someone has already handled.

Two caveats. First, Google says search_term_view does not include Performance Max data; for PMax search terms, Google points you to campaign_search_term_view. Second, zero conversions in 30 days doesn't always mean waste. Check the account's conversion lag before you add negatives.

6. Low Quality Score keywords that still spend

SELECT
  campaign.name,
  ad_group.name,
  ad_group_criterion.keyword.text,
  ad_group_criterion.keyword.match_type,
  ad_group_criterion.quality_info.quality_score,
  ad_group_criterion.quality_info.creative_quality_score,
  ad_group_criterion.quality_info.post_click_quality_score,
  ad_group_criterion.quality_info.search_predicted_ctr,
  metrics.cost_micros
FROM keyword_view
WHERE segments.date DURING LAST_30_DAYS
  AND ad_group_criterion.status = 'ENABLED'
  AND ad_group_criterion.quality_info.quality_score <= 4
ORDER BY metrics.cost_micros DESC

What to look for: the three component fields (ad relevance, landing page experience and expected CTR) come back as BELOW_AVERAGE, AVERAGE or ABOVE_AVERAGE, which tells you which part to fix. Two notes from Google's reference: quality_score may not be populated when Google doesn't have enough information, so keywords without a score won't match this filter. And quality_info fields are attributes of the keyword rather than metrics, so they reflect the keyword's current score; the cost column is what's limited to the last 30 days. For scores over time, the reference also lists metrics.historical_quality_score.

7. Disapproved and limited ads

SELECT
  campaign.name,
  ad_group.name,
  ad_group_ad.ad.id,
  ad_group_ad.policy_summary.approval_status,
  ad_group_ad.policy_summary.policy_topic_entries
FROM ad_group_ad
WHERE ad_group_ad.status = 'ENABLED'
  AND ad_group_ad.policy_summary.approval_status IN ('DISAPPROVED', 'APPROVED_LIMITED')

What to look for: enabled ads that can't serve, or can only serve in limited situations. policy_topic_entries tells you which policy is involved. An ad group where every ad is disapproved is effectively paused even though everything shows as enabled.

8. Conversion action setup

SELECT
  conversion_action.name,
  conversion_action.type,
  conversion_action.category,
  conversion_action.status,
  conversion_action.primary_for_goal,
  conversion_action.counting_type,
  conversion_action.include_in_conversions_metric
FROM conversion_action
WHERE conversion_action.status = 'ENABLED'

What to look for:

  • Too many primary actions. Google's reference says that when primary_for_goal is false, the action is non-biddable for all campaigns, with one exception: custom conversion goals ignore it, so a secondary action inside a custom goal is still biddable.
  • counting_type. MANY_PER_CLICK on a lead form usually inflates leads. ONE_PER_CLICK on a purchase usually undercounts sales.
  • include_in_conversions_metric. This decides what lands in the Conversions column your team reports on.

For the full picture of how primary and secondary actions affect bidding now, read primary vs. secondary conversion actions.

9. Landing pages by spend

SELECT
  landing_page_view.unexpanded_final_url,
  metrics.clicks,
  metrics.cost_micros,
  metrics.conversions
FROM landing_page_view
WHERE segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESC
LIMIT 50

What to look for: URLs with real spend and no conversions, old promo pages still getting traffic, and the home page soaking up clicks that should go to a service or product page. Google describes this view as metrics aggregated at the unexpanded final URL level, meaning the URL you set, not the final URL after expansion.

10. Who changed what, and when

SELECT
  change_event.change_date_time,
  change_event.user_email,
  change_event.client_type,
  change_event.change_resource_type,
  change_event.resource_change_operation,
  change_event.changed_fields,
  campaign.name
FROM change_event
WHERE change_event.change_date_time DURING LAST_14_DAYS
ORDER BY change_event.change_date_time DESC
LIMIT 1000

What to look for: match changes against the breaks you found in query 4. client_type shows where the change came from: values in v26 include GOOGLE_ADS_WEB_CLIENT, GOOGLE_ADS_EDITOR, GOOGLE_ADS_API, GOOGLE_ADS_SCRIPTS, GOOGLE_ADS_AUTOMATED_RULE and GOOGLE_ADS_RECOMMENDATIONS, and changed_fields lists exactly which fields moved. Google's rules for this resource: the date filter must fall within the past 30 days, and LIMIT is required, with a maximum of 10,000 rows. Google also says change_event may not include every change you see in the web interface's Change History, and suggests the change_status resource for a more complete list of what changed. campaign.name will be empty for changes that aren't tied to a campaign.

Running them with an LLM or the MCP server

If you use an AI assistant with Google's official Google Ads MCP server, two details from Google's guide matter:

  1. Its search tool doesn't take a raw GAQL string. Google says it builds the query from structured parameters (customer_id, resource, fields, plus optional conditions, orderings and limit). So give your assistant the pieces of each query above: the FROM resource, the field list, the WHERE conditions and the ORDER BY.
  2. There's a metadata tool for checking fields. get_resource_metadata returns the selectable, filterable and sortable fields for a resource. Ask the assistant to call it before running a query it wrote itself.

Whatever writes the query, validate it. Google's Query Validator and Interactive Query Builder catch fields that don't exist or can't be combined. If the assistant has write access, also read our post on prompt injection risks for Google Ads AI agents; Google documents a configurable read-only mode for the MCP server.

In Google Ads scripts, the same queries work through AdsApp.search() (which returns rows for processing in code) or AdsApp.report() (flat rows for a spreadsheet). Google notes that AdsApp.search() returns field names in lowerCamelCase even if you wrote them in underscore_case. Our weekly digest script shows a full example.

Start your free investigation today

A scored case file for your Google Ads account in around 5 minutes.

Where DetectivePPC fits

These ten queries give you the raw evidence. Turning them into an audit still means reading every row, weighing what matters, and running them again next week. DetectivePPC connects with read-only access, investigates 50+ audit dimensions in around 5 minutes, and keeps watching between audits for CPA spikes, budget anomalies and conversion drops, with change detection that shows what shifted between audits. 7-day trial · 1 free audit · Read-only access.

For the manual walkthrough these queries support, see how to audit a Google Ads account.

Verdict

PriorityQueryWhat it catchesEffort
High8. Conversion actionsWrong primary actions and counting that skew biddingLow
High5. Search terms with no conversionsSpend on irrelevant queriesLow
High4. Daily trend + 10. Change historyWhen something broke, and who changed itMedium
Medium2. Campaign settingsDisplay opt-in, partners, location targetingLow
Medium3. Impression shareBudget vs. Ad Rank limitsLow
Medium7. Policy statusEnabled ads that can't serveLow
Low6. Quality ScoreWhich QS component to fixMedium
Low1. Account settings, 9. Landing pagesAuto-tagging, time zone, wasted page trafficLow

FAQ

What is GAQL? GAQL is the Google Ads Query Language. You use it to read reporting and account data from the Google Ads API, Google Ads scripts (AdsApp.search and AdsApp.report) and tools built on the API. A query has a SELECT, a FROM resource and optional WHERE, ORDER BY and LIMIT clauses.

Can I run these GAQL queries without writing code? Yes. Google Ads scripts accept the same queries through AdsApp.search() and AdsApp.report(), and Google's Query Validator and Interactive Query Builder on developers.google.com let you check a query before you run it. You still need API or scripts access to see real results.

Why is cost in my GAQL results a huge number? Cost and budget fields ending in _micros are in micros. Google's field reference says one million micros equals one unit of the account's currency, so divide by 1,000,000. In the search terms query, cost_micros > 50000000 means more than 50 in account currency.

Why don't Performance Max search terms show up in search_term_view? Google's v26 reference says search_term_view does not include Performance Max data. For Performance Max search terms, Google points you to campaign_search_term_view instead.

How far back can I query change_event? Change event queries must filter on change_event.change_date_time within the past 30 days and include a LIMIT of at most 10,000 rows. Google also notes that change_event may not include every change you see in the web interface's Change History.

Start your free investigation today

A scored case file for your Google Ads account in around 5 minutes.