execute_gaql_query
Run Google Ads Query Language (GAQL) queries to retrieve campaign data, performance metrics, and account information with pagination support and multiple output formats.
Instructions
Execute GAQL. Aliases accepted: customerId, pageSize, pageToken, autoPaginate, maxPages, outputFormat.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| autoPaginate | No | Alias of auto_paginate. | |
| auto_paginate | No | fetch multiple pages automatically | |
| customerId | No | Alias of customer_id. | |
| customer_id | No | 10-digit customer ID (no dashes). Optional. | |
| maxPages | No | Alias of max_pages. | |
| max_pages | No | limit when auto_paginate=true (1-20) | |
| outputFormat | No | Alias of output_format. | |
| output_format | No | render format | table |
| pageSize | No | Alias of page_size. | |
| pageToken | No | Alias of page_token. | |
| page_size | No | optional page size (1-10000) | |
| page_token | No | optional page token | |
| query | Yes | GAQL query string. Examples: SELECT campaign.id, campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_30_DAYS LIMIT 10 SELECT ad_group_ad.ad.id, metrics.impressions FROM ad_group_ad WHERE campaign.status = 'ENABLED' LIMIT 50 |