SCALIX help

← All tools

gads_keyword_themes

Google Ads read low risk

Part of the Keyword Research Agent.

What it does

Assign seed keywords to EXISTING ad groups (KeywordPlanIdeaService.GenerateAdGroupThemes). Given a list of seed keywords and a list of existing ad group resource names, Google suggests which keyword (text + match_type) belongs in which of the supplied ad groups, and also reports any supplied ad groups it could not use. Both `keywords` and `ad_groups` are REQUIRED and checked before calling Google; ad_groups take ad group ids or resource names. Read-only; no metrics or money. Useful as a planning step to slot new keywords into an existing campaign structure. Returns data {ad_group_keyword_suggestions:[{keyword_text, suggested_keyword_text, suggested_match_type, suggested_ad_group, suggested_campaign}], unusable_ad_groups:[{ad_group, campaign, ad_group_status, campaign_status}]} (both lists always present) and count = the number of suggestions. An empty answer carries a warning. Google names no cause per unusable ad group; one extra read labels each with its own and its campaign's status, and a warning says whether Google's documented causes (ad group not ENABLED, campaign not ENABLED or PAUSED) apply.

When to use it

When the user asks which ad group new keywords should go into — e.g. 'which of the ad groups in campaign X should these keywords go into' or 'where do these keywords belong' — Google assigns each keyword to one of the existing ad groups you pass (list them with gads_list_ad_groups). Also for grouping keywords into themes/clusters that fit an existing ad-group structure.

Inputs

NameTypeRequiredDescription
customer_idstringyes10-digit CID; strip dashes.
keywordsarray<string>yesSeed keyword strings to assign to the supplied ad groups. Required.
ad_groupsarray<string>yesExisting ad groups to assign the keywords into: ad group ids or resource names (customers/{cid}/adGroups/{agid}); ids become this customer's resource names. Required: refused before any Google call when missing.
manager_idstringnoOptional MCC login-customer-id.

Safeguards

Policy

Theme/assignment suggestions are organizational planning output; do not present them as guaranteed performance groupings. No spend.

Reminder

Assignments are planning suggestions, not performance guarantees.

Errors

Error classMeansWhat to doRetry
VALIDATION_ERRORMissing required input — both keywords and ad_groups must be supplied.Provide at least one keyword and at least one existing ad group resource name.no
RESOURCE_EXHAUSTEDKeywordPlanIdeaService rate/quota limit (~1 QPS, HTTP 429).Backoff 5/10/20s (cap 60s), serialize requests.yes
INVALID_ARGUMENTMalformed keyword input or bad ad_group resource name format.Surface the platform message; clean the keyword list and verify ad_group resource names (customers/{cid}/adGroups/{agid}).no
TOKEN_REVOKEDOAuth token expired/revoked.Refresh and retry once; else prompt reconnect (needs_reauth).yes
CUSTOMER_NOT_FOUNDCustomer ID not found/accessible.Verify the CID is authorized.no
PERMISSION_DENIEDNo access or out-of-bearer-scope read.Confirm read access; else refuse.no
INTERNAL_ERRORTransient Google server error (5xx).Retry after backoff.yes

Edge cases

  • Some supplied ad groups can't be used -> they are returned in unusable_ad_groups with ad_group_status and campaign_status; surface them so the caller knows (no silent failure).
  • Few/very similar seeds -> may return few or no suggestions; success with count:0 and a note.
  • No metrics here — use gads_keyword_ideas/gads_keyword_forecast for volumes/forecasts.
  • ad_groups must be existing ad groups (ids or resource names customers/{cid}/adGroups/{agid}); this method assigns keywords to them rather than inventing new groups.
  • ~1 QPS -> serialize and back off; expired token -> refresh once and retry.