SCALIX help

← All tools

gads_list_campaign_criteria

Google Ads read low risk

Part of the Google Ads Manager Agent.

What it does

List all campaign-level criteria (locations, languages, ad schedules, proximity, demographics, negative keywords, devices, audiences, etc.) for one or more campaigns via GAQL on the campaign_criterion resource. Returns each criterion's resource_name, type, the type-specific detail (e.g. location.geo_target_constant resolved to name, keyword.text/match_type, ad_schedule day/time, age_range/gender/income/parental_status type, and audiences: user_interest (affinity, in-market), user_list, custom_audience, life_event and extended_demographic (detailed demographics)), negative flag, bid_modifier, and status. Used as the discovery step before remove/modify tools. Accuracy: resource_names are returned verbatim so they can be fed to gads_remove_campaign_criterion; bid_modifier is a raw multiplier (not micros); geo/language IDs are resolved to names where possible. This query selects ATTRIBUTES only (no metrics), so it runs fine against manager accounts. Read-only — returns success+count:0 with an empty list when a campaign has no criteria of the requested type.

When to use it

When the user asks what targeting a campaign has — locations, languages, devices, audiences, schedules, or negative criteria.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID, dashes/spaces stripped. Tenant context server-derived.
campaign_idstringnoNumeric campaign ID to filter to one campaign. Omit to list across all campaigns (subject to LIMIT).
criterion_typesstringnoOptional comma-separated filter by campaign_criterion.type (one string, not a list), e.g. 'LOCATION,LANGUAGE' (LOCATION, LANGUAGE, AD_SCHEDULE, PROXIMITY, AGE_RANGE, GENDER, PARENTAL_STATUS, INCOME_RANGE, KEYWORD, DEVICE, USER_LIST, etc.); upper-cased.
include_negative_onlybooleannoIf true, return only negative=true criteria (e.g. campaign negative keywords / exclusions).
limitintegernoMax rows (GAQL LIMIT). Default a sane cap (e.g. 1000); larger reads should paginate via SearchStream.

Safeguards

Policy

Read-only criteria listing carries no write risk; do not present any criterion as performance proof and do not infer targeting the API didn't return.

Reminder

Match the Google Ads UI exactly; never fabricate a criterion; don't retain account targeting data beyond this request.

Errors

Error classMeansWhat to doRetry
CUSTOMER_NOT_FOUNDCustomer ID not found or not linked.Verify CID (dashes stripped); re-auth if stale.no
TOKEN_REVOKEDAuthorization revoked / refresh token expired.Trigger re-auth (needs_reauth); do not retry with the dead token.no
INVALID_ARGUMENTMalformed GAQL / invalid criterion_type filter.Surface the platform message; correct the field/enum. Do not guess a field name.no
PERMISSION_DENIEDBearer token lacks scope or user role can't read this account.Report missing scope / role; do not retry.no
REQUESTED_METRICS_FOR_MANAGERQuerying with metrics against a manager (MCC) CID is not allowed.This tool selects attributes only; if metrics were added, drop them or target a serving account.no
RESOURCE_EXHAUSTEDRate/quota limit (HTTP 429).Backoff 5->10->20s cap 60s, honor retryDelay; retry.yes
PLATFORM_UNAVAILABLEGoogle Ads 5xx / INTERNAL / DEADLINE_EXCEEDED.Idempotent retry with backoff.yes

Edge cases

  • Campaign with no criteria of the requested type -> success:true, count:0, data:[] (not an error).
  • Large accounts: results may be truncated by LIMIT -> tell the user to narrow by campaign_id/criterion_types or paginate via SearchStream.
  • Geo/language constant resolution may fail for deprecated IDs -> return the raw constant resource and flag 'name unavailable'.
  • Mixed criterion types share one row shape; type-specific fields are null for non-matching types -> render per type.
  • Expired token mid-stream -> refresh once and re-issue the query.
  • No metrics are selected, so manager (MCC) accounts list fine; only fail if a metric was added.