gads_create_price_extension
Google Ads write medium risk
Part of the Ad Extensions Agent.
What it does
Create a PriceAsset (price type + price qualifier + language + 3-8 price offerings, each with header <=25 chars, description <=25 chars, price value, optional unit, and final URL) and link it with field_type=PRICE. Asset-based price extension. Returns {asset_resource_name, link_resource_name, scope}. Accuracy: each offering's price is sent in MICROS with a currency_code (value x 1e6); the tool converts the currency input to integer micros and validates the 3-8 offering count and per-field char limits. A single currency_code must apply to all offerings in one asset. Flow: preview (validate_only=true to catch count/char/currency errors) -> diff (type, qualifier, offering list with prices) -> approval -> execute (atomic: the asset and its link together) -> confirm + immutable audit log. The preview's amounts give each price in plain units with its currency (e.g. 4999.00 INR). 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
Use to add a structured price table (3-8 offerings). Confirm every price equals the landing page, pass each price_amount in currency units with its currency_code (the tool converts it to integer micros), and verify headers/descriptions <=25 chars before creating.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
price_type | string | yes | Enum (BRANDS, EVENTS, LOCATIONS, NEIGHBORHOODS, PRODUCT_CATEGORIES, PRODUCT_TIERS, SERVICES, SERVICE_CATEGORIES, SERVICE_TIERS); enum-normalize. |
price_qualifier | string | no | Enum FROM/UP_TO/AVERAGE/NONE. |
language_code | string | yes | ISO language code (e.g., en). |
offerings | array | yes | 3-8 items: {header <=25, description <=25, price_amount (currency, converted to integer micros), currency_code, unit (PER_HOUR | PER_DAY | PER_WEEK | PER_MONTH | PER_YEAR | PER_NIGHT; NONE or omitted for no unit), final_url}. Single currency across all offerings. |
scope | string | yes | Enum CUSTOMER/CAMPAIGN/AD_GROUP. |
scope_id | string | no | Required when scope != CUSTOMER. |
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
Prices shown must match the landing page exactly and be currently available; stale or bait pricing = Misrepresentation (egregious). No hidden fees. Currency must match the destination market.
Reminder
Reflect only real, current prices; do not retain pricing data beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
INVALID_ARGUMENT | Fewer than 3 or more than 8 offerings, or header/description over 25 chars. | Surface the count/char error; correct offerings. | no |
PRICE_ERROR_INVALID_CURRENCY | Currency code unsupported or amount_micros invalid. | Validate currency_code and re-derive integer micros (value x 1e6). | no |
FIELD_ERROR_REQUIRED | Missing required offering field or scope_id for non-customer scope. | Require the missing field. | no |
URL_ERROR_INVALID_FINAL_URL | An offering final URL is invalid. | Require a valid advertiser-domain HTTPS URL. | no |
TOKEN_REVOKED | Token revoked/expired. | Set needs_reauth; prompt reconnect. | no |
RESOURCE_EXHAUSTED | Quota/QPS exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, retry once. | yes |
PARTIAL_FAILURE | Asset/link partial failure. | Return per-op errors. | no |
PLATFORM_UNAVAILABLE | Backend 5xx/INTERNAL. | Retry once after backoff. | yes |
Edge cases
- Currency->micros conversion: 49.99 USD -> 49990000; rounded to integer micros.
- Mixed currencies across offerings in one asset are invalid; the tool does not check this, so Google's preview answer is returned.
- Exactly 3 minimum offerings required to serve; flag if fewer.
- Customer scope = account-wide; campaign/ad-group narrows.
- validate_only=true creates nothing.
- preview TTL expiry -> re-preview.