API Reference โบ Google Ads โบ create_youtube_campaign
create_youtube_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_youtube_campaign/execute
Headers
Authorization: Bearer sk_live_... โ your Adspirer API key (required)
Content-Type: application/json (required)
Idempotency-Key: <uuid> โ recommended for write operations to make retries safe
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
๐ LONG-RUNNING TOOL: Creates a YouTube Video campaign using Google Ads Demand Gen format with YouTube-only placements. Emits MCP progress updates during authentication and campaign creation (typically 10-20 seconds). Progress stages: validate โ commit.
โ ๏ธ CRITICAL WARNING โ ๏ธ
- Call this tool ONLY ONCE per campaign
- Creates REAL campaigns that cost REAL money
- Do NOT retry automatically if errors occur
- Report errors to user instead of retrying
โ ๏ธ CRITICAL PREREQUISITE:
- MUST validate the YouTube video first using validate_video tool
- Video must be public or unlisted on YouTube (NOT private)
๐ฌ **YouTube Campaign Placements:**
โ
YouTube In-Feed (appears in search results & related videos)
โ
YouTube In-Stream (plays before/during/after videos)
โ
YouTube Shorts (appears in Shorts feed)
โ Gmail (disabled for YouTube campaigns)
โ Discover (disabled for YouTube campaigns)
โ Display (disabled for YouTube campaigns)
๐ **YOUR CRITICAL ROLE: Campaign Strategist & Text Creator**
**STEP 1: Validate Video First**
Before calling this tool:
1. Get user's YouTube video URL or ID
2. Call validate_video tool with platform="pmax" to verify it
3. Confirm video is accessible (public or unlisted)
๐ด **STEP 1.5: MANDATORY โ Discover Existing Assets**
BEFORE proceeding, you MUST call discover_existing_assets to check for existing image/logo assets:
1. Call: discover_existing_assets(asset_types=["image", "logo"], target_domain="<user's domain>")
2. Present findings to the user:
- Show all available logos and images with dimensions
- Show count of assets found per type
3. Ask the user:
"I found [N] existing assets in your account. Would you like to:
A) Reuse an existing logo (saves time, consistent branding)
B) Upload a new logo image
C) Upload a new logo from URL"
4. Based on answer:
- Reuse โ Use logo_asset_id from discovered assets
- Upload new โ Use validate_and_prepare_assets with logos_square โ asset_bundle_id
5. ๐ซ NEVER skip this step โ even if the user didn't mention assets
**STEP 2: Collect Campaign Details from User**
YOU MUST collect these from the user (ask if not provided):
**REQUIRED Fields:**
1. **Campaign Name** - Descriptive and unique
2. **Daily Budget** - Minimum $15/day (recommended $50+)
3. **YouTube Video ID** - 11-character video ID (validated in Step 1)
4. **Final URL** - Landing page (must match verified domain)
5. **Business Name** - Max 25 characters
**STEP 3: Generate High-Quality Ad Copy**
**๐จ BEFORE GENERATING TEXT - READ CHARACTER LIMITS ๐จ**
**Headlines (1-5 required):**
- **STRICT LIMIT: 40 characters maximum per headline**
- Count characters BEFORE calling this tool!
- Examples:
- "Shop Premium Watches Today" (26 chars) โ
- "Free Worldwide Shipping Now" (27 chars) โ
**Descriptions (1-5 required):**
- **STRICT LIMIT: 90 characters maximum per description**
- Count characters BEFORE calling this tool!
- Examples:
- "Shop authentic luxury timepieces with expert curation and free worldwide shipping." (82 chars) โ
**Long Headlines (optional, 1-5):**
- **STRICT LIMIT: 90 characters maximum per long headline**
- Falls back to regular headlines if not provided
**โ ๏ธ WILL BE REJECTED IF YOU EXCEED LIMITS - NO RETRIES!**
**LOGO (REQUIRED - one of two options):**
- **Option A** (existing logo): logo_asset_id from discover_existing_assets โ use this if the account already has logo images
- **Option B** (new upload): asset_bundle_id from validate_and_prepare_assets โ use this if the account has NO existing logos (e.g., Search-only accounts)
**Workflow:**
1. First try discover_existing_assets to find existing logos
2. If logos found โ use logo_asset_id
3. If NO logos found โ ask user for a logo image URL, run validate_and_prepare_assets with logos_square, then use the returned asset_bundle_id
**OPTIONAL Fields (use defaults if not provided):**
- call_to_action: Default "LEARN_MORE". Options: 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, REGISTER
- target_locations: Defaults to ["United States"]
- target_languages: Defaults to ["en"]
- additional_video_ids: Up to 4 more videos (5 total max)
- bidding_strategy: MAXIMIZE_CLICKS (default), MAXIMIZE_CONVERSIONS (needs conversion tracking), TARGET_CPA
- target_cpa: Required only for TARGET_CPA bidding
**STEP 4: Call create_youtube_campaign**
After you have ALL details:
- Validate character counts yourself BEFORE calling
- Call create_youtube_campaign with complete payload
- Wait for response (may take 10-20 seconds)
**STEP 5: Handle Response**
**If SUCCESS:**
- Show campaign ID, name, budget, status
- Explain YouTube-only placements (In-Feed, In-Stream, Shorts)
- Explain campaign starts PAUSED for safety
- Provide next steps (review, activate, monitor)
**If FAILURE:**
- Show error message clearly
- Do NOT retry automatically
- Guide user to fix the issue
**Example Conversation Flow:**
User: "I want to run YouTube ads for my product"
You: "I'd be happy to help create a YouTube video campaign! First, can you share your YouTube video URL so I can validate it?"
[User provides: https://youtu.be/eIZtladpm6c]
[Call validate_video with video_url_or_id="eIZtladpm6c", platform="pmax"]
You: "Your video is validated and ready! Now I need a few details:
1. Campaign name?
2. Daily budget? (minimum $15, recommended $50+)
3. Landing page URL?
4. Business name?
I'll create compelling headlines and descriptions for your YouTube ads."
[User provides details]
[Call create_youtube_campaign with all details]
**Video Specifications:**
- Must be on YouTube (public or unlisted, NOT private)
- Minimum 10 seconds duration recommended
- Maximum 5 videos per campaign (1 primary + 4 additional)
- Validated via validate_video tool before campaign creation
**Bidding Options:**
- MAXIMIZE_CLICKS: Best for most campaigns (default, works without conversion tracking)
- MAXIMIZE_CONVERSIONS: Best when conversion tracking is set up on the account
- TARGET_CPA: Best when you know your target cost per acquisition (requires conversion tracking)
**Campaign Creation Best Practices:**
1. Always validate video first with validate_video tool
2. ๐ด MANDATORY: Run discover_existing_assets to find logos/images โ present results to user, ask if they want to reuse or upload new
3. If reuse โ use logo_asset_id; if upload new โ validate_and_prepare_assets โ asset_bundle_id
4. Confirm budget with user ($15/day minimum)
5. Create compelling, benefit-focused ad copy
6. Campaign starts PAUSED - explain this to user
7. This costs real money - be transparent
8. ๐ด AFTER campaign creation: Add extensions (sitelinks, callouts, structured snippets) โ see STEP 6 below
**STEP 6: MANDATORY โ Add Extensions After Creation**
After the campaign is successfully created, you MUST:
1. Crawl the user's website to gather relevant page links, features, and service categories
2. Add sitelinks: at least 4 links to key pages (add_sitelinks tool)
3. Add callout extensions: 4-6 business highlights (add_callout_extensions tool)
4. Add structured snippets: categorized features (add_structured_snippets tool)
5. Verify with list_campaign_extensions to confirm all extensions are attached
Extensions are FREE and increase ad visibility by 15-25%. NEVER skip this step.
**Execution Time:** 10-20 seconds (direct backend API call)
**Authentication:** Required (MCP OAuth 2.1)
**CRITICAL REMINDERS:**
- Campaign starts PAUSED for user safety
- This costs real money - be transparent with user
- Never retry on failure - report error to user
- Always validate video BEFORE creating campaign
Request body
All tool arguments are wrapped in an arguments object.
| Field | Type | Description |
campaign_name | string required | Campaign name (e.g., 'YouTube Summer Promo 2025') |
budget_daily | number required | Daily budget in the account's native currency. IMPORTANT: Do NOT convert currencies โ pass the user's amount as-is. Example: if user says 'โน1000/day', pass 1000 (not a USD conversion). The Google Ads API interprets this in the account's currency automatically. Google recommends minimum ~$20/day USD equivalent for YouTube/Demand Gen campaigns. |
youtube_video_id | string required | Primary YouTube video ID (exactly 11 characters). Must be validated first using validate_video tool. Example: 'dQw4w9WgXcQ' |
final_url | string required | Landing page URL (must match verified domain). Example: 'https://example.com/product' |
business_name | string required | Business name, max 25 characters. Example: 'Luxury Watch Co' |
headlines | array required | MUST BE JSON ARRAY: 1-5 headlines, each EXACTLY 40 characters maximum. Commas ARE allowed within headlines. Example: ["Shop Premium Watches Today", "Free Shipping"]. COUNT CHARACTERS! ANY over 40 will be REJECTED! |
descriptions | array required | MUST BE JSON ARRAY: 1-5 descriptions, each EXACTLY 90 characters maximum. Commas ARE allowed within descriptions. Example: ["Shop authentic luxury timepieces with expert curation and free shipping."]. COUNT CHARACTERS BEFORE CALLING - ANY over 90 will be REJECTED! |
long_headlines | array optional | MUST BE JSON ARRAY: Optional 1-5 long headlines, each EXACTLY 90 characters maximum. Falls back to regular headlines if not provided. Example: ["Premium Swiss Watches - Certified Authentic, Free Worldwide Shipping"]. COUNT CHARACTERS! ANY over 90 will be REJECTED! |
call_to_action | string optional | Call-to-action button label. Options: LEARN_MORE (default), 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, REGISTER default: "LEARN_MORE" |
target_locations | array optional | Optional: Geographic targets -- supports countries, states, cities, and regions globally. Examples: ['India'], ['Bangalore, India'], ['Karnataka'], ['New York, NY'], ['United States', 'Canada']. Defaults to United States. |
target_languages | array optional | Optional: Language targets as ISO codes (e.g., ['en', 'es']). Defaults to English. |
additional_video_ids | array optional | Optional: Up to 4 additional YouTube video IDs (max 5 total including primary). Each must be exactly 11 characters. Example: ['abc123xyz00', 'def456uvw00'] |
bidding_strategy | string optional | Bidding strategy: MAXIMIZE_CLICKS (default, works without conversion tracking), MAXIMIZE_CONVERSIONS (requires conversion tracking), or TARGET_CPA (requires target_cpa). TARGET_CPA requires target_cpa parameter. default: "MAXIMIZE_CLICKS" |
target_cpa | number optional | Target CPA in USD (only required when bidding_strategy='TARGET_CPA'). Example: 25.0 means target $25 per conversion. |
logo_asset_id | string optional | Logo image asset ID (1:1 square aspect ratio) from discover_existing_assets. Either this OR asset_bundle_id is required. Example: '123456789' |
asset_bundle_id | string optional | Asset bundle ID (UUID) from validate_and_prepare_assets. Use this when the account has no existing logo images. The bundle must contain a square logo (logos_square). Either this OR logo_asset_id is required. Example: '7df76fef-9d1f-4218-8bfb-3173f6de9622' |
audience_segments | object optional | Optional: Audience targeting for the campaign. CRITICAL: Only use segment IDs returned by search_audiences tool. NEVER fabricate or guess IDs -- wrong IDs target unrelated audiences and waste budget. If search_audiences returns no results, skip audience_segments entirely. Keys: 'in_market_audience_ids' (List[int] -- people actively researching), 'affinity_audience_ids' (List[int] -- people with long-term interests), 'custom_audience_ids' (List[str] -- custom audience resource names from search_audiences), 'user_list_ids' (List[str] -- remarketing/customer match resource names). Example: {'in_market_audience_ids': [80463, 80520], 'affinity_audience_ids': [92913]} |
customer_id | string optional | Google Ads customer ID. Required for multi-account users. Get from list_connected_accounts. |
Example request
{
"arguments": {
"campaign_name": "string",
"budget_daily": 1.0,
"youtube_video_id": "string",
"final_url": "https://example.com",
"business_name": "string",
"headlines": [
"string"
],
"descriptions": [
"string"
],
"long_headlines": [
"string"
],
"call_to_action": "LEARN_MORE",
"target_locations": [
"string"
],
"target_languages": [
"string"
],
"additional_video_ids": [
"string"
],
"bidding_strategy": "MAXIMIZE_CLICKS"
}
}
Example responses
200 โ Success
{
"success": true,
"data": {
"text": "(tool-specific textual output for create_youtube_campaign)",
"quota": {
"used": 42,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01"
}
},
"tool": "create_youtube_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_youtube_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_youtube_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