πŸ€–chiliad
ClaudePricing
Help CenterGAQL Lab

AWQL vs GAQL: updating old Google Ads scripts

Why older scripts use AWQL report names, how GAQL differs, and how to convert a query.

Scripts written some years ago query data with AWQL, the AdWords Query Language, and report names in capitals such as KEYWORDS_PERFORMANCE_REPORT. Current Google Ads scripts use GAQL. Old queries often still run through a compatibility layer, but new fields and campaign types are only available in GAQL, and mixed scripts are hard to maintain.

The differences

  • Reports became resources. CAMPAIGN_PERFORMANCE_REPORT is campaign; KEYWORDS_PERFORMANCE_REPORT is keyword_view; SEARCH_QUERY_PERFORMANCE_REPORT is search_term_view.
  • Fields are prefixed. CampaignName is campaign.name; Clicks is metrics.clicks; Date is segments.date.
  • Cost is in micros β€” metrics.cost_micros.
  • Dates are an ordinary filter β€” segments.date DURING LAST_30_DAYS in the WHERE clause, not a separate DURING clause at the end.

Before and after

AWQL:

SELECT CampaignName, Clicks, Cost
FROM CAMPAIGN_PERFORMANCE_REPORT
WHERE Impressions > 0
DURING LAST_30_DAYS

GAQL:

SELECT campaign.name, metrics.clicks, metrics.cost_micros
FROM campaign
WHERE metrics.impressions > 0
  AND segments.date DURING LAST_30_DAYS

Converting a script

  1. Find every query string in the script.
  2. Replace the report name with the resource and the fields with their GAQL names.
  3. Move the date range into WHERE.
  4. Update the code that reads the results: field names changed, and cost now needs dividing by 1,000,000.
  5. Test each query on its own before running the whole script.

Testing the new queries

Paste each converted query into GAQL Lab. The validator flags unknown fields and fields that do not belong to the resource, and autocomplete suggests the right names. With the Claude connector you can also ask Claude to convert the script and check the queries against a real account.

Part of the guideGAQL Lab

More on this topic

  • What is GAQL (Google Ads Query Language)?
  • GAQL date ranges: DURING, BETWEEN and the predefined ranges
  • What is cost_micros in Google Ads and how do you convert it?
  • AdsApp.search() vs AdsApp.report(): which should you use?
  • How to export Google Ads data to CSV with a query

Still stuck?

Send us a question from the help center β€” we read every message.

Ask a question
πŸ€–chiliad

The platform for managing and automating Google Ads scripts at scale. Built for PPC agencies and freelancers.

chiliad β€” Google Ads Script Management - Monitor and manage Google Ads scripts across every account | Product Hunt

Product

  • Use Cases
  • Features
  • Claude connector
  • Pricing
  • Marketplace
  • Blog
  • About
  • Roadmap
  • Changelog

Support

  • Contact Us
  • Help Center
  • Terms of Service
  • Privacy Policy

Β© 2026 chiliad. All rights reserved.