gads_list_ads
Google Ads read low risk
Part of the Google Ads Manager Agent.
What it does
List ads in an ad group, campaign, or account via GoogleAdsService.SearchStream over ad_group_ad, with optional filters (status, ad type, approval status) and optional performance metrics prior_period deltas via include_prior_period=true. Returns rows of ad_group_ad.ad.id, ad.type, status, policy_summary.approval_status, a creative summary (creative_summary: the first 3 headlines and first 2 descriptions with their counts, the long headline of a display ad, and the first final URL; the full assets come from gads_get_ad), and (when requested) impressions/clicks/ctr/cost_micros/conversions. Accuracy: cost is micros (/1e6, currency-labeled); segments multiply rows and must be summed; metrics reconcile to the UI within +/-1%; only ads visible to the account role are returned.
When to use it
When the user asks what ads exist or are running — across an ad group, a campaign, or the whole account — with status and approval.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID, dashes stripped. |
ad_group_id | string | no | Restrict to one ad group. |
campaign_id | string | no | Restrict to one campaign. |
status_filter | string | no | AdGroupAdStatus filter ENABLED|PAUSED|REMOVED (enum-normalized). Omit or pass ALL for all statuses. |
type_filter | string | no | AdType filter (RESPONSIVE_SEARCH_AD, RESPONSIVE_DISPLAY_AD, ...). Enum-normalized. |
approval_filter | string | no | Filter on ad_group_ad.policy_summary.approval_status (APPROVED|DISAPPROVED|...). |
include_metrics | boolean | no | Add metrics.* over date_range + prior-period delta. |
date_range | string | no | GAQL date macro or explicit range; used with include_metrics. |
limit | integer | no | GAQL LIMIT; recommend ORDER BY metrics.cost_micros DESC when narrowing. |
include_prior_period | boolean | no | Opt-in: also run the equal-length preceding window and attach prior_period={date_range, metrics, delta_pct} to every row. Needs a translatable date_range (LAST_7/14/30_DAYS, TODAY, YESTERDAY, THIS_MONTH, LAST_MONTH, or explicit 'YYYY-MM-DD,YYYY-MM-DD'); untranslatable ranges skip with a warning. |
manager_id | string | no | Optional MCC login-customer-id. |
Safeguards
Policy
Read-only; metrics must reconcile to the Google Ads UI within +/-1%. Report only the queried account's own ads; never pool creative across accounts.
Reminder
Per-account isolation (server-derived tenant context + RLS); do not retain or expose ad lists beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Customer ID not found / unauthorized. | Verify CID and authorization; re-auth if revoked. | no |
TOKEN_REVOKED | OAuth credential revoked/expired. | Prompt reconnect (needs_reauth). | no |
INVALID_ARGUMENT | GAQL filter rejected — surfacing Google's message. | Surface exact error; fix filter, don't guess. | no |
PERMISSION_DENIED | Scope/role does not permit reading this account. | Confirm adwords scope and access; CID may be outside the bearer scope. | no |
RESOURCE_EXHAUSTED | Rate/quota exceeded (429). | Backoff 5->10->20s cap 60s; honor retryDelay. | yes |
PLATFORM_UNAVAILABLE | Google Ads API 5xx. | Retry after backoff. | yes |
Edge cases
- No ads matching filters -> success:true, count:0, data:[].
- Large result sets -> apply LIMIT + ORDER BY to narrow; tell the user it is capped, don't silently truncate.
- include_metrics with segments multiplies rows — aggregate per ad for totals.
- REMOVED ads excluded by default; include only when explicitly requested.
- Creative summary fields vary by ad type — show the type-appropriate fields.
- Expired token -> refresh once, retry.