gads_create_search_campaign
Google Ads write high risk
Part of the Search Campaign Agent.
What it does
Creates a Search campaign (advertising_channel_type=SEARCH): builds the CampaignBudget, the Campaign (network_settings target_google_search=true, optional target_search_network/target_content_network), and the bidding strategy. geo_targets and languages are NOT applied at create, as with the other campaign creates: the preview names them, and they are applied with gads_add_location_targeting / gads_add_language_targeting once the campaign exists. Ad groups, keywords, and RSAs are added by their own tools/flow. Optional geo option: geo_target_type_setting.positive_geo_target_type (PRESENCE recommended by the Scalix framework). Inputs: customer_id, name, daily budget (micros), bidding goal (MAXIMIZE_CONVERSIONS [+ optional target CPA], TARGET_ROAS, MAXIMIZE_CLICKS, or MANUAL_CPC), optional partner/content-network toggles, geo, languages, start/end dates. Money is micros (÷1e6 to display). PREVIEW->APPROVE->COMMIT: validate_only=true preview (returns errors without creating anything) -> plain-English diff (budget/day, search-network reach, bidding goal, geo, status) -> explicit approval -> execute (atomic: budget and campaign together or neither) -> return resource_name + timestamp + audit log. Defaults to PAUSED so it serves only after go-live approval. Returns the standard success/error envelope. PREVIEW SEMANTICS: the first call (no preview_id) is sent to the Google Ads API in validation mode — field, enum, policy and permission errors surface AT PREVIEW, nothing is changed, and the response returns a preview_id. To apply, show the preview to the user, get their approval, and re-call with that preview_id and IDENTICAL arguments within 30 minutes; changed arguments or an expired token fail closed to a fresh preview. validate_only=true forces another preview; validate_only=false alone never commits.
When to use it
Before building, collect the goal (leads/purchases/traffic), the bidding strategy (Max Clicks, Max Conversions, tCPA, tROAS, Manual CPC) and any target, the daily budget, the networks (Search, or with Search Partners), locations and languages, and whether it launches paused or active; only then preview. geo_targets and languages are NOT applied by this tool: apply them with gads_add_location_targeting / gads_add_language_targeting. First call gads_plan_search_campaign for the blueprint, operation order and policy pre-checks.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID, dashes stripped; non-manager operating account. |
name | string | yes | Unique campaign name (DUPLICATE_CAMPAIGN_NAME otherwise). |
budget_amount_micros | integer | yes | Daily budget in micros (currency ×1e6, e.g. $50 -> 50000000). Either this or budget_resource_name. |
budget_resource_name | string | no | Existing campaign_budget resource to reuse instead of creating one (warn if explicitly_shared). |
bidding_strategy | object | yes | {type:MAXIMIZE_CONVERSIONS|TARGET_ROAS|MAXIMIZE_CLICKS|MANUAL_CPC, target_cpa_micros?, target_roas?}; enum-normalize. |
target_search_network | boolean | no | Include Google search partners (default false). |
target_content_network | boolean | no | Include Display Network expansion (default false). |
positive_geo_target_type | string | no | Geo option for targeted locations: PRESENCE_OR_INTEREST | SEARCH_INTEREST | PRESENCE. Omitted = Google's default PRESENCE_OR_INTEREST; the Scalix framework recommends PRESENCE for local/service businesses. Enum-normalized (uppercase); an invalid value is rejected at preview naming the allowed list. |
geo_targets | array | no | Accepted but NOT applied at create (a warning says so) — apply with gads_add_location_targeting after create. |
languages | array | no | Accepted but NOT applied at create (a warning says so) — apply with gads_add_language_targeting after create. |
status | enum | no | ENABLED|PAUSED; defaults PAUSED. |
start_date | string | no | YYYY-MM-DD; default today. |
end_date | string | no | YYYY-MM-DD; optional. |
declare_eu_political | boolean | no | Set true ONLY if the campaign contains EU political advertising (Google requires the contains_eu_political_advertising declaration on every new campaign; omitted -> declares does-not-contain, which is a FALSE declaration for EU political ads). The preview names the declaration it sends, for the user to confirm. |
validate_only | boolean | no | Optional. true forces another preview even with a preview_id; false is DEPRECATED and no longer commits — only a valid preview_id applies the write. |
preview_id | string | no | Omit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview. |
Safeguards
A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.
Policy
Search campaigns and their ads undergo editorial review (no excessive capitalization, gimmicky/repeated punctuation, clickbait; correct spelling/grammar) and Misrepresentation review (claims and offers must match the landing page). Restricted verticals (alcohol, gambling, healthcare, financial, political) require certification before serving. Never recreate disapproved content or use a new account to circumvent enforcement.
Reminder
Preview with validate_only, approve the exact diff, default PAUSED; ad copy must meet Google editorial standards and never claim what the landing page can't support.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Customer ID not found / not accessible. | Verify CID and account access; prompt re-auth if needed. | no |
TOKEN_REVOKED | OAuth token invalid/revoked (401 UNAUTHENTICATED). | Refresh token; if still failing, set needs_reauth and prompt reconnect. | no |
OPERATION_ON_MANAGER_ACCOUNT | Cannot create a campaign on a manager (MCC) account. | Use a non-manager operating account. | no |
INVALID_ARGUMENT | Preview validation failed (e.g. TARGET_ROAS without conversion-value tracking, invalid search/content network combination). | Surface the platform message verbatim; correct and re-preview — do not guess a substitute. | no |
PERMISSION_DENIED | Missing write scope / out-of-bearer-scope (403). | Confirm adwords scope + account role; re-consent. | no |
RESOURCE_EXHAUSTED | Rate/quota exceeded (429). | Backoff 5->10->20s cap 60s, honor retryDelay, retry once. | yes |
PLATFORM_UNAVAILABLE | Google Ads API 5xx/INTERNAL. | Retry once with backoff; do not assume creation succeeded. | yes |
Edge cases
- Smart Bidding (TARGET_ROAS / MAXIMIZE_CONVERSIONS with tCPA) requires active conversion tracking — preview will reject otherwise; surface the message.
- Enabling Display Network expansion (target_content_network) changes reach and reporting; warn the user.
- validate_only preview does not execute; commit is a separate call and must be idempotent on retry.
- Reusing a shared budget affects other campaigns sharing it — warn.
- Campaign created but ad groups/keywords/RSAs are separate steps; it won't serve until at least one enabled ad group with an eligible RSA (min 3 headlines @30 chars + 2 descriptions @90 chars) exists.
- Preview TTL expiry -> re-preview before commit.
- Default PAUSED; ENABLE only on explicit go-live.
- Expired token mid-call -> refresh once and retry.