SCALIX help

← All tools

gads_list_campaigns

Google Ads read low risk

Part of the Google Ads Manager Agent.

What it does

Lists campaigns in an account with optional filters (status, channel type, name LIKE) and optional headline metrics per campaign. Returns rows of campaign.id/name/status/advertising_channel_type/sub_type/bidding_strategy_type/campaign_budget.amount_micros and (when a date range is given) impressions/clicks/CTR/average_cpc/cost_micros/conversions/conversions_value, ordered as requested. Accuracy: cost/bid micros ÷1e6 with currency label; metrics reconcile to the Google Ads UI within ±1%; if a date range is given, include the prior_period deltas via include_prior_period=true; do NOT add segments here (segments multiply rows and break per-campaign totals). Read-only; returns {success:true,data:[...],count:N,warnings}; empty account -> count:0. Standard error envelope on failure.

When to use it

FIRST stop when the user asks what campaigns exist or are running/paused — campaign status, names, spend, or an account overview ('show me my campaigns'). For one specific campaign use gads_get_campaign; for a full audit flow gads_audit_account orchestrates the checks.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID, dashes stripped.
status_filterenumnoCampaignStatus filter ENABLED|PAUSED|REMOVED (enum-normalized). Omit or pass ALL for all statuses.
channel_type_filterenumnoFilter by advertising_channel_type (SEARCH, DISPLAY, ...).
name_containsstringnoSubstring match -> GAQL campaign.name LIKE '%...%' (escape % and _ in user input).
include_metricsbooleannoIf true select metrics.* for date_range.
date_rangestringnoGAQL date macro or 'YYYY-MM-DD,YYYY-MM-DD'; required if include_metrics.
order_bystringnoe.g. 'metrics.cost_micros DESC' or 'campaign.name'.
limitintegernoMax rows; paginate for large accounts.
include_prior_periodbooleannoOpt-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_idstringnoOptional MCC login-customer-id.

Safeguards

Policy

Read-only reporting: figures must reconcile to the Google Ads UI within ±1% and never be fabricated; only campaigns in the caller's authorized account are returned.

Reminder

Match the Google Ads UI exactly; never fabricate a metric; do not retain account data beyond this request.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCustomer ID not found / not accessible.Verify CID and access; prompt re-auth if needed.no
TOKEN_REVOKEDOAuth token invalid/revoked (401).Refresh token; if still failing set needs_reauth.no
MANAGER_ACCOUNT_METRICS_NOT_SUPPORTEDMetrics cannot be queried directly on a manager (MCC); list its child accounts instead.List campaigns config-only on the MCC, or query each child account for metrics.no
INVALID_ARGUMENTBad GAQL filter, order_by, or date range.Surface the platform message; correct the query and retry.no
PERMISSION_DENIEDOut-of-bearer-scope or missing read access (403).Confirm adwords scope + account access.no
RESOURCE_EXHAUSTEDRate/quota exceeded (429).Backoff 5->10->20s cap 60s, honor retryDelay, retry once.yes
PLATFORM_UNAVAILABLEGoogle Ads API 5xx/INTERNAL.Retry once with backoff; otherwise report the outage.yes

Edge cases

  • Empty account or no matches -> success:true, count:0 (not an error).
  • Default filter excludes REMOVED campaigns unless status_filter=REMOVED is set.
  • Never add segments.* here — segments multiply rows and double-count per-campaign totals; use a reporting tool for segmented data.
  • Large accounts: use SearchStream and/or LIMIT + pagination; report truncation with guidance to narrow by status/channel/name.
  • Metrics on an MCC unsupported -> MANAGER_ACCOUNT_METRICS_NOT_SUPPORTED.
  • name_contains must escape GAQL wildcards (% and _) so user text isn't treated as a pattern.
  • Cost/bid micros ÷1e6 before display.
  • Expired token mid-call -> refresh once and retry.