Google Ads Read
See the search CATEGORIES a Performance Max campaign matched (grouped queries), with metrics
POST https://api.adspirer.ai/api/v1/tools/analyze_pmax_search_categories/execute
Authorization: Bearer sk_live_... — your Adspirer API key (required)Content-Type: application/json (required)Idempotency-Key: <uuid> — recommended for write operations to make retries safeAll tool arguments are wrapped in an arguments object.
| Field | Type | Description |
|---|---|---|
campaign_id | string required | Performance Max campaign ID (required). Get it from list_campaigns. |
customer_id | string optional | Google Ads customer ID. Required for multi-account users. Get from get_connections_status. |
lookback_days | integer optional | Trailing window in days: 7, 30, 60, 90, or 120. Default 30. default: 30 |
query | string optional | Free-text filter — case-insensitive substring match against the search term / category text. E.g. 'free' to surface low-intent queries. |
sort_by | string optional | Sort field. Terms: cost (default), clicks, impressions, conversions, conversion_value, ctr, cpc. Categories: impressions (default), clicks, conversions, conversion_value. |
sort_order | string optional | 'desc' (default, biggest first) or 'asc'. default: "desc" |
offset | integer optional | Row offset for paging (0-based). Default 0. Paging is capped near the top (you cannot page far into a large result) — filter with `query` or re-sort instead of paging deep. default: 0 |
limit | integer optional | Rows per page (1-200). Default 100 — one call shows the top 100 by your sort, which is almost always enough. default: 100 |
{
"arguments": {
"campaign_id": "<campaign_id>",
"customer_id": "string",
"lookback_days": 30,
"query": "string",
"sort_by": "string",
"sort_order": "desc",
"offset": 0
}
}
{
"success": true,
"data": {
"text": "(tool-specific textual output for analyze_pmax_search_categories)",
"quota": {
"used": 42,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01"
}
},
"tool": "analyze_pmax_search_categories"
}
{
"success": false,
"error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n - Acme Holdings (ad_account_id=\"act_123456789\")\n - Acme EU (ad_account_id=\"act_987654321\")",
"is_error": true,
"tool": "analyze_pmax_search_categories"
}
{
"success": false,
"error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
"is_error": true,
"tool": "analyze_pmax_search_categories",
"quota": {
"used": 150,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01",
"upgrade_url": "https://adspirer.ai"
}
}
Interactive: Swagger UI
Machine-readable: OpenAPI 3.1 spec · llms-full.txt
More tools: Google Ads · All tools
Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai