create_display_campaign

Google Ads Write

๐Ÿšจ **IF THIS TOOL RETURNS A QUOTA ERROR:** - The error message will include a clickable upgrade link - Show the FULL error message to the user (it contains the upgrade link) - DO NOT attempt to work ar

Endpoint

POST https://api.adspirer.ai/api/v1/tools/create_display_campaign/execute

Headers

Description

๐Ÿšจ **IF THIS TOOL RETURNS A QUOTA ERROR:** - The error message will include a clickable upgrade link - Show the FULL error message to the user (it contains the upgrade link) - DO NOT attempt to work around the error or use alternative data - DO NOT create campaigns or perform actions without valid tool data - STOP and direct the user to upgrade via the provided link Create a Google **Display** campaign with a Responsive Display Ad on the Google Display Network (GDN). ๐Ÿ›‘ **STOP โ€” IMAGES ARE MANDATORY. ASK THE USER FIRST.** ๐Ÿ›‘ A Display campaign cannot be created without images. Before calling this tool you MUST have: - At least 1 landscape image URL (1.91:1 aspect ratio, min 600ร—314, max 5 MB) - At least 1 square image URL (1:1 aspect ratio, min 300ร—300, max 5 MB) If the user has not provided image URLs, **ASK THEM** โ€” do not invent URLs, do not guess Wikipedia/stock-photo URLs (they 403 to server fetches), do not pass `marketing_images: null`. Suggest the user upload to a host like postimages.org and paste the direct .jpg/.png URLs. โœ… **STRONGLY RECOMMENDED โ€” pre-validate first**: call `validate_and_prepare_assets` with the user's image URLs BEFORE calling this tool. It checks aspect ratio, dimensions, file size, and content-type, then returns an `asset_bundle_id` you can pass here. This avoids a Google Ads API rejection mid-create (e.g., "aspect ratio doesn't match expected"). **When to use this tool:** - User explicitly asks for "Display campaign", "Google Display Network", "GDN", "banner ads", or "display ads" - User wants visual/banner placements across millions of websites, mobile apps, YouTube, and Gmail (display slots only) - User wants Smart Display (Google-managed automation): pass smart_display=true and bidding_strategy='TARGET_CPA' **When NOT to use:** - User wants text ads in Google Search โ†’ use create_search_campaign - User wants cross-channel (YouTube + Discover + Gmail + Display together) โ†’ use create_demandgen_campaign - User wants a PMax-like multi-channel approach โ†’ use create_pmax_campaign **Step-by-step workflow:** 1. Ask user for: budget, landing URL, business name, **AT LEAST 1 LANDSCAPE + 1 SQUARE IMAGE URL**, headlines (1-5 @ 30 chars), long headline (1 @ 90 chars), descriptions (1-5 @ 90 chars) 2. Resolve any free-text locations via `resolve_google_locations` first (returns exact `geoTargetConstants/<id>` to avoid ambiguity) 3. Pre-validate the image URLs with `validate_and_prepare_assets` โ†’ use the returned `asset_bundle_id` (recommended) OR pass the URLs directly as `marketing_images` / `square_marketing_images` (we'll validate before upload, but the API may still reject for subtle aspect-ratio mismatches) 4. Optional: logos, YouTube videos, audience/topic/placement targeting 5. Call `create_display_campaign` with the full payload (must include images one way or another) 6. After success, add extensions: `add_sitelinks`, `add_callout_extensions`, `add_structured_snippets` **Targeting surfaces supported (ad-group level, ignored for Smart Display):** - audience_segments: user_interests (affinity/in-market via search_audiences), custom_audiences, user_lists, combined_audiences - topics: topic constants - managed_placements: specific websites/apps/YouTube channels/videos - display_keywords: contextual keywords (always BROAD match on Display) - demographics: age/gender/parental/income (exclude-the-inverse pattern) **Bidding strategies:** - MAXIMIZE_CLICKS (default, works without conversion tracking) - MAXIMIZE_CONVERSIONS (needs conversion tracking) - TARGET_CPA (needs target_cpa + conversion tracking) - TARGET_ROAS (needs target_roas + conversion tracking) - MANUAL_CPC (enhanced CPC, needs cpc_bid in account currency) - MANUAL_CPM (viewable CPM, needs cpm_bid in account currency) **Smart Display (smart_display=true):** - sub_type=DISPLAY_SMART_CAMPAIGN (Google-managed) - Bidding MUST be TARGET_CPA - Manual audience/topic/placement/keyword/demographic inputs are REJECTED - Account needs conversion tracking with enough history (โ‰ฅ50 Display conversions or โ‰ฅ100 Search conversions in last 30 days) **Character limits (strictly enforced โ€” validation will reject before hitting the API):** - Headlines: MAX 30 chars each (1-5) - Long headline: MAX 90 chars (exactly 1) - Descriptions: MAX 90 chars each (1-5) - Business name: MAX 25 chars - Price prefix: MAX 10 chars - Promo text: MAX 20 chars **Image requirements:** - Landscape (1.91:1): min 600x314, max 5MB, 1-15 images - Square (1:1): min 300x300, max 5MB, 1-15 images - Landscape logo (4:1): min 512x128, up to 5 (optional) - Square logo (1:1): min 128x128, up to 5 (optional) **Safety:** - Campaigns always start PAUSED (user must review + enable manually in Google Ads UI) - Never retry on failure โ€” surface the error to the user **Execution time:** 10-20 seconds (atomic mutate: budget + campaign + ad group + all criteria + assets + ad)

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
campaign_namestring requiredCampaign name (e.g., 'Display Spring Promo 2026')
budget_dailynumber requiredDaily budget in the account's native currency. IMPORTANT: Do NOT convert currencies โ€” pass the amount as-is.
final_urlstring requiredLanding page URL where users go after clicking the ad. **REQUIRED โ€” ask the user for their website URL before calling this tool. Do NOT guess.** Must be HTTPS and reachable. Example: 'https://example.com/product'.
business_namestring requiredBusiness name, max 25 characters. Example: 'Adspirer'
headlinesarray requiredJSON ARRAY: 1-5 short headlines, each MAX 30 characters. Count characters carefully โ€” any over 30 will be REJECTED.
long_headlinestring requiredExactly 1 long headline, max 90 characters. Example: 'Run Google, Meta, LinkedIn and TikTok ads from one workspace'
descriptionsarray requiredJSON ARRAY: 1-5 descriptions, each MAX 90 characters.
marketing_imagesarray optionalLandscape images (1.91:1, min 600x314, max 5MB). Format: [{"url": "https://...", "name": "img1"}]. At least 1 landscape required (unless reusing via existing_images).
square_marketing_imagesarray optionalSquare images (1:1, min 300x300, max 5MB). Format: [{"url": "https://...", "name": "img1"}]. At least 1 square required (unless reusing via existing_images).
logo_imagesarray optionalOptional landscape logos (4:1). Up to 5.
square_logo_imagesarray optionalOptional square logos (1:1, min 128x128). Up to 5.
existing_imagesobject optionalReuse existing image asset resource names. Keys: marketing_images_landscape, marketing_images_square, logos_landscape, logos_square.
asset_bundle_idstring optionalUUID returned by `validate_and_prepare_assets`. RECOMMENDED PATH โ€” pre-validates URLs, dimensions, aspect ratio, and content-type before upload, avoiding mid-create Google API rejections. The bundle's marketing_images_landscape, marketing_images_square, logos_landscape, logos_square are auto-mapped into this campaign's image fields (only for keys you didn't explicitly pass). Bundle is consumed (deleted) on success.
youtube_video_idsarray optionalOptional YouTube video IDs (0-5). Each is an 11-char YouTube ID.
bidding_strategystring optionalOne of: MAXIMIZE_CLICKS, MAXIMIZE_CONVERSIONS, TARGET_CPA, TARGET_ROAS, MANUAL_CPC (enhanced CPC), MANUAL_CPM (viewable CPM). Smart Display requires TARGET_CPA. default: "MAXIMIZE_CLICKS"
target_cpanumber optionalTarget CPA in account currency. Required for TARGET_CPA bidding (and Smart Display).
target_roasnumber optionalTarget ROAS multiplier. Required for TARGET_ROAS bidding. Example: 3.5 = 350% ROAS.
cpc_bidnumber optionalMax CPC bid in account currency. Required for MANUAL_CPC.
cpm_bidnumber optionalMax viewable CPM bid in account currency. Required for MANUAL_CPM.
target_locationsarray optionalGeographic targets (e.g., ['India', 'United States']). Defaults to United States.
target_languagesarray optionalLanguage ISO codes (e.g., ['en', 'es']). Defaults to English.
audience_segmentsobject optionalAd-group audience targeting. Keys: 'user_interests' (affinity/in-market category IDs), 'custom_audiences' (resource names), 'user_lists' (remarketing/customer-match resource names), 'combined_audiences' (resource names). Use search_audiences to get valid IDs. NEVER fabricate IDs. IGNORED when smart_display=true.
topicsarray optionalTopic IDs or 'topicConstants/<id>' resource names for ad-group topic targeting. IGNORED when smart_display=true.
managed_placementsarray optionalManaged placements (ad-group level). List of {type, value}: type in ('website','mobile_app','youtube_channel','youtube_video'). Example: [{"type":"website","value":"example.com"}]. IGNORED when smart_display=true.
display_keywordsarray optionalContextual display keywords (ad-group level, always BROAD match). List of {text, negative?}: negative=true for negative keywords. IGNORED when smart_display=true.
demographicsobject optionalAd-group demographic targeting (we EXCLUDE everything not listed). Keys: age_ranges (AGE_RANGE_18_24, AGE_RANGE_25_34, etc.), genders (MALE, FEMALE, UNDETERMINED), parental_statuses (PARENT, NOT_A_PARENT, UNDETERMINED), income_ranges (INCOME_RANGE_70_80, etc.). IGNORED when smart_display=true.
call_to_actionstring optionalCTA label. Options: LEARN_MORE, SHOP_NOW, SIGN_UP, SUBSCRIBE, DOWNLOAD, BOOK_NOW, CONTACT_US, GET_QUOTE, APPLY_NOW, WATCH_NOW, ORDER_NOW, BUY_NOW, SEE_MORE, START_NOW, VISIT_SITE, DONATE_NOW, PLAY_NOW
format_settingstring optionalDisplay ad format setting: ALL_FORMATS (default), NATIVE, or NON_NATIVE.
main_colorstring optionalMain brand color as hex (e.g., '#112233' or '#FFF').
accent_colorstring optionalAccent color as hex (e.g., '#FFAABB').
allow_flexible_colorboolean optionalLet Google pick optimal colors when it performs better. Default true. default: true
price_prefixstring optionalOptional price prefix displayed before a price. Max 10 chars. Example: 'from'.
promo_textstring optionalOptional promotional text. Max 20 chars. Example: 'Up to 50% off'.
smart_displayboolean optionalIf true, creates a Smart Display campaign (Google-managed, sub_type=DISPLAY_SMART_CAMPAIGN). Requires bidding_strategy=TARGET_CPA. Manual targeting fields (audience_segments/topics/managed_placements/display_keywords/demographics) are rejected when smart_display=true. Account needs conversion tracking + sufficient conversion history. default: false
start_datestring optionalOptional start date YYYY-MM-DD. Defaults to tomorrow.
end_datestring optionalOptional end date YYYY-MM-DD. Defaults to 1 year from now.
customer_idstring optionalGoogle Ads customer ID. Required for multi-account users.

Example request

{
  "arguments": {
    "campaign_name": "string",
    "budget_daily": 1.0,
    "final_url": "https://example.com",
    "business_name": "string",
    "headlines": [
      "string"
    ],
    "long_headline": "string",
    "descriptions": [
      "string"
    ],
    "marketing_images": [
      {}
    ],
    "square_marketing_images": [
      {}
    ],
    "logo_images": [
      {}
    ],
    "square_logo_images": [
      {}
    ],
    "existing_images": {},
    "asset_bundle_id": "string"
  }
}

Example responses

200 โ€” Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for create_display_campaign)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "create_display_campaign"
}

400 โ€” Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "create_display_campaign"
}

402 โ€” Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "create_display_campaign",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API โ€” get an API key at adspirer.ai/keys ยท adspirer.ai