SCALIX help

← All tools

gads_list_product_groups

Google Ads read low risk

Part of the Shopping Campaign Agent.

What it does

List the Shopping listing-group (product-group) STRUCTURE for an ad group (or PMax-retail asset group) via GAQL on ad_group_criterion (listing_group) / asset_group_listing_group_filter, returning the hierarchy with each node's type (SUBDIVISION/UNIT), dimension + case_value, parent, exclusion state, and cpc_bid_micros. Structure-only: per-node performance metrics are NOT available here (GAQL rejects metrics alongside the listing_group.case_value fields) — use gads_get_shopping_performance or gads_get_pmax_channel_performance for product-group metrics. Accuracy: cpc_bid micros (÷1e6); reflects the platform tree exactly. Read-only.

When to use it

When the user asks how a Shopping campaign's product groups/partitions are structured or subdivided.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
ad_group_idstringnoShopping ad group ID. Provide this OR asset_group_id (PMax-retail).
asset_group_idstringnoPMax-retail asset group ID (uses listing_group_filter).

Safeguards

Policy

Read-only; reflects the platform listing tree and product metrics. Figures reconcile to the Google Ads UI (±1%); no fabricated splits.

Reminder

Match the UI exactly; convert micros; feed attributes only (no user data); account-isolated.

Errors

Error classMeansWhat to doRetry
NOT_FOUNDAd group / asset group not found.Verify the ID.no
MANAGER_ACCOUNT_METRICSMetrics requested on an MCC CID.Re-issue against a serving child CID.no
TOKEN_REVOKEDToken revoked/expired.Set needs_reauth; prompt reconnect.no
INVALID_ARGUMENTNeither ad_group_id nor asset_group_id supplied, or bad range.Provide one container id; fix the range.no
RESOURCE_EXHAUSTEDQuota/QPS exceeded (HTTP 429).Backoff 5/10/20s cap 60s, retry once.yes
PLATFORM_UNAVAILABLEBackend 5xx/INTERNAL.Retry once after backoff.yes

Edge cases

  • No listing group built yet (everything served under root 'Other') -> single-node tree; success.
  • Excluded nodes are returned with negative=true (always included).
  • Structure only -> for product-group performance (impressions/clicks/cost/conversions) call gads_get_shopping_performance or gads_get_pmax_channel_performance; metrics can't be selected here.
  • PMax-retail uses listing_group_filter resource, different field names -> branch on container type.
  • MCC customer_id -> query the child CID, not the manager.