run_gaql_query
Run a read-only GAQL query to retrieve raw data from a Google Ads account. Use valid GAQL syntax to access fields and segments.
Instructions
Run a read-only GAQL query against a customer account.
This is the explicit raw-query escape hatch: the query is passed through as-is, so the
caller is responsible for valid GAQL. Use get_segments_metadata / get_metrics_metadata
/ get_resource_metadata first to discover valid field names. customer_id is validated.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"query": "<query>"
},
"name": "run_gaql_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | max rows returned to the caller (hard-capped at 10,000 by the API). | |
| query | Yes | a GAQL query (SELECT ... FROM ... [WHERE ...] [LIMIT ...]). | |
| customer_id | Yes | Google Ads customer id (digits only; hyphens are stripped). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||