🤖chiliad
ClaudeТарифи
Довідковий центрGAQL 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.

Частина посібникаGAQL Lab

Більше на цю тему

  • 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

Не вдалося розібратися?

Надішліть нам запитання з довідкового центру — ми читаємо кожне повідомлення.

Поставити запитання
🤖chiliad

Платформа для керування й автоматизації скриптів Google Ads у великому масштабі. Створена для PPC-агенцій та фрилансерів.

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

Продукт

  • Сценарії використання
  • Можливості
  • Конектор Claude
  • Тарифи
  • Маркетплейс
  • Блог
  • Про нас
  • Дорожня карта
  • Журнал змін

Підтримка

  • Зв’язатися з нами
  • Довідковий центр
  • Умови користування
  • Політика конфіденційності

© 2026 chiliad. Усі права захищено.