Create Search Campaign
đ LONG-RUNNING TOOL: Creates a Google Ads Search campaign with full structure.
Emits MCP progress updates during authentication and campaign creation (typically 5-10 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
â ď¸ GOOGLE ADS POLICY NOTE: Avoid keywords related to health conditions, medical treatments, financial hardship, or political topics. These may trigger policy violations. Use general service terms instead. Example: Use âsenior care servicesâ not ânursing careâ, âhome servicesâ not âmedical servicesâ
curl --request POST \
--url https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"arguments": {
"ad_groups": [
{
"audiences": {
"affinity_audiences": null,
"custom_audiences": null,
"demographics": null,
"in_market_audiences": null
},
"descriptions": [
"string"
],
"final_url": "https://example.com",
"headlines": [
"string"
],
"keywords": [
"string"
],
"name": "string",
"sitelinks": [
{
"description1": null,
"description2": null,
"final_url": null,
"link_text": null
}
]
}
],
"bidding_strategy": "MAXIMIZE_CONVERSIONS",
"budget_daily": 1,
"business_description": "string",
"campaign_name": "string",
"customer_id": "string",
"negative_keywords": [
"string"
],
"objective": "CONVERSIONS",
"target_locations": [
"string"
],
"target_roas": 1,
"website_url": "https://example.com"
}
}
'import requests
url = "https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute"
payload = { "arguments": {
"ad_groups": [
{
"audiences": {
"affinity_audiences": None,
"custom_audiences": None,
"demographics": None,
"in_market_audiences": None
},
"descriptions": ["string"],
"final_url": "https://example.com",
"headlines": ["string"],
"keywords": ["string"],
"name": "string",
"sitelinks": [
{
"description1": None,
"description2": None,
"final_url": None,
"link_text": None
}
]
}
],
"bidding_strategy": "MAXIMIZE_CONVERSIONS",
"budget_daily": 1,
"business_description": "string",
"campaign_name": "string",
"customer_id": "string",
"negative_keywords": ["string"],
"objective": "CONVERSIONS",
"target_locations": ["string"],
"target_roas": 1,
"website_url": "https://example.com"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
arguments: {
ad_groups: [
{
audiences: {
affinity_audiences: null,
custom_audiences: null,
demographics: null,
in_market_audiences: null
},
descriptions: ['string'],
final_url: 'https://example.com',
headlines: ['string'],
keywords: ['string'],
name: 'string',
sitelinks: [{description1: null, description2: null, final_url: null, link_text: null}]
}
],
bidding_strategy: 'MAXIMIZE_CONVERSIONS',
budget_daily: 1,
business_description: 'string',
campaign_name: 'string',
customer_id: 'string',
negative_keywords: ['string'],
objective: 'CONVERSIONS',
target_locations: ['string'],
target_roas: 1,
website_url: 'https://example.com'
}
})
};
fetch('https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'arguments' => [
'ad_groups' => [
[
'audiences' => [
'affinity_audiences' => null,
'custom_audiences' => null,
'demographics' => null,
'in_market_audiences' => null
],
'descriptions' => [
'string'
],
'final_url' => 'https://example.com',
'headlines' => [
'string'
],
'keywords' => [
'string'
],
'name' => 'string',
'sitelinks' => [
[
'description1' => null,
'description2' => null,
'final_url' => null,
'link_text' => null
]
]
]
],
'bidding_strategy' => 'MAXIMIZE_CONVERSIONS',
'budget_daily' => 1,
'business_description' => 'string',
'campaign_name' => 'string',
'customer_id' => 'string',
'negative_keywords' => [
'string'
],
'objective' => 'CONVERSIONS',
'target_locations' => [
'string'
],
'target_roas' => 1,
'website_url' => 'https://example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute"
payload := strings.NewReader("{\n \"arguments\": {\n \"ad_groups\": [\n {\n \"audiences\": {\n \"affinity_audiences\": null,\n \"custom_audiences\": null,\n \"demographics\": null,\n \"in_market_audiences\": null\n },\n \"descriptions\": [\n \"string\"\n ],\n \"final_url\": \"https://example.com\",\n \"headlines\": [\n \"string\"\n ],\n \"keywords\": [\n \"string\"\n ],\n \"name\": \"string\",\n \"sitelinks\": [\n {\n \"description1\": null,\n \"description2\": null,\n \"final_url\": null,\n \"link_text\": null\n }\n ]\n }\n ],\n \"bidding_strategy\": \"MAXIMIZE_CONVERSIONS\",\n \"budget_daily\": 1,\n \"business_description\": \"string\",\n \"campaign_name\": \"string\",\n \"customer_id\": \"string\",\n \"negative_keywords\": [\n \"string\"\n ],\n \"objective\": \"CONVERSIONS\",\n \"target_locations\": [\n \"string\"\n ],\n \"target_roas\": 1,\n \"website_url\": \"https://example.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"arguments\": {\n \"ad_groups\": [\n {\n \"audiences\": {\n \"affinity_audiences\": null,\n \"custom_audiences\": null,\n \"demographics\": null,\n \"in_market_audiences\": null\n },\n \"descriptions\": [\n \"string\"\n ],\n \"final_url\": \"https://example.com\",\n \"headlines\": [\n \"string\"\n ],\n \"keywords\": [\n \"string\"\n ],\n \"name\": \"string\",\n \"sitelinks\": [\n {\n \"description1\": null,\n \"description2\": null,\n \"final_url\": null,\n \"link_text\": null\n }\n ]\n }\n ],\n \"bidding_strategy\": \"MAXIMIZE_CONVERSIONS\",\n \"budget_daily\": 1,\n \"business_description\": \"string\",\n \"campaign_name\": \"string\",\n \"customer_id\": \"string\",\n \"negative_keywords\": [\n \"string\"\n ],\n \"objective\": \"CONVERSIONS\",\n \"target_locations\": [\n \"string\"\n ],\n \"target_roas\": 1,\n \"website_url\": \"https://example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"arguments\": {\n \"ad_groups\": [\n {\n \"audiences\": {\n \"affinity_audiences\": null,\n \"custom_audiences\": null,\n \"demographics\": null,\n \"in_market_audiences\": null\n },\n \"descriptions\": [\n \"string\"\n ],\n \"final_url\": \"https://example.com\",\n \"headlines\": [\n \"string\"\n ],\n \"keywords\": [\n \"string\"\n ],\n \"name\": \"string\",\n \"sitelinks\": [\n {\n \"description1\": null,\n \"description2\": null,\n \"final_url\": null,\n \"link_text\": null\n }\n ]\n }\n ],\n \"bidding_strategy\": \"MAXIMIZE_CONVERSIONS\",\n \"budget_daily\": 1,\n \"business_description\": \"string\",\n \"campaign_name\": \"string\",\n \"customer_id\": \"string\",\n \"negative_keywords\": [\n \"string\"\n ],\n \"objective\": \"CONVERSIONS\",\n \"target_locations\": [\n \"string\"\n ],\n \"target_roas\": 1,\n \"website_url\": \"https://example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"quota": {
"limit": 150,
"period_end": "2026-05-01",
"tier": "plus",
"used": 42
},
"text": "(tool-specific textual output for create_search_campaign)"
},
"success": true,
"tool": "create_search_campaign"
}{
"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,
"success": false,
"tool": "create_search_campaign"
}{
"error": "Not authenticated. Please connect your Adspirer account first at https://adspirer.ai",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}{
"error": "đ¨ Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
"is_error": true,
"quota": {
"limit": 150,
"period_end": "2026-05-01",
"tier": "plus",
"upgrade_url": "https://adspirer.ai",
"used": 150
},
"success": false,
"tool": "create_search_campaign"
}{
"error": "Tool not found: create_search_campaign",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}{
"error": "Upstream platform rate limit hit (Meta Business Use Case throttle at 95%). Retry after 60 seconds.",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}{
"error": "Internal error: RuntimeError",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}Authorizations
API key from https://adspirer.ai/keys. Prefix sk_live_. Treat as a secret â never commit.
Headers
Client-generated UUID to make writes idempotent. Strongly recommended for write tools. A repeat call with the same key returns the cached result instead of re-executing. Example: 550e8400-e29b-41d4-a716-446655440000
Body
All tool arguments are wrapped in an arguments object. The fields accepted inside arguments are listed below â required fields are marked with a red asterisk.
Show child attributes
Show child attributes
Response
Tool executed successfully. data.text carries the human-readable result (markdown-friendly). data.quota shows your current usage against the plan limit. data.structured appears when the tool emits machine-parseable structured content. data.content appears for tools that return non-text blocks (images, resources).
Returned on HTTP 200. data.text is the primary human-readable output. data.quota is always present for billable calls. data.structured is set only when the tool emits machine-parseable structured content. data.content is set only when the tool emits non-text content blocks.
Was this page helpful?
curl --request POST \
--url https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"arguments": {
"ad_groups": [
{
"audiences": {
"affinity_audiences": null,
"custom_audiences": null,
"demographics": null,
"in_market_audiences": null
},
"descriptions": [
"string"
],
"final_url": "https://example.com",
"headlines": [
"string"
],
"keywords": [
"string"
],
"name": "string",
"sitelinks": [
{
"description1": null,
"description2": null,
"final_url": null,
"link_text": null
}
]
}
],
"bidding_strategy": "MAXIMIZE_CONVERSIONS",
"budget_daily": 1,
"business_description": "string",
"campaign_name": "string",
"customer_id": "string",
"negative_keywords": [
"string"
],
"objective": "CONVERSIONS",
"target_locations": [
"string"
],
"target_roas": 1,
"website_url": "https://example.com"
}
}
'import requests
url = "https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute"
payload = { "arguments": {
"ad_groups": [
{
"audiences": {
"affinity_audiences": None,
"custom_audiences": None,
"demographics": None,
"in_market_audiences": None
},
"descriptions": ["string"],
"final_url": "https://example.com",
"headlines": ["string"],
"keywords": ["string"],
"name": "string",
"sitelinks": [
{
"description1": None,
"description2": None,
"final_url": None,
"link_text": None
}
]
}
],
"bidding_strategy": "MAXIMIZE_CONVERSIONS",
"budget_daily": 1,
"business_description": "string",
"campaign_name": "string",
"customer_id": "string",
"negative_keywords": ["string"],
"objective": "CONVERSIONS",
"target_locations": ["string"],
"target_roas": 1,
"website_url": "https://example.com"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
arguments: {
ad_groups: [
{
audiences: {
affinity_audiences: null,
custom_audiences: null,
demographics: null,
in_market_audiences: null
},
descriptions: ['string'],
final_url: 'https://example.com',
headlines: ['string'],
keywords: ['string'],
name: 'string',
sitelinks: [{description1: null, description2: null, final_url: null, link_text: null}]
}
],
bidding_strategy: 'MAXIMIZE_CONVERSIONS',
budget_daily: 1,
business_description: 'string',
campaign_name: 'string',
customer_id: 'string',
negative_keywords: ['string'],
objective: 'CONVERSIONS',
target_locations: ['string'],
target_roas: 1,
website_url: 'https://example.com'
}
})
};
fetch('https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'arguments' => [
'ad_groups' => [
[
'audiences' => [
'affinity_audiences' => null,
'custom_audiences' => null,
'demographics' => null,
'in_market_audiences' => null
],
'descriptions' => [
'string'
],
'final_url' => 'https://example.com',
'headlines' => [
'string'
],
'keywords' => [
'string'
],
'name' => 'string',
'sitelinks' => [
[
'description1' => null,
'description2' => null,
'final_url' => null,
'link_text' => null
]
]
]
],
'bidding_strategy' => 'MAXIMIZE_CONVERSIONS',
'budget_daily' => 1,
'business_description' => 'string',
'campaign_name' => 'string',
'customer_id' => 'string',
'negative_keywords' => [
'string'
],
'objective' => 'CONVERSIONS',
'target_locations' => [
'string'
],
'target_roas' => 1,
'website_url' => 'https://example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute"
payload := strings.NewReader("{\n \"arguments\": {\n \"ad_groups\": [\n {\n \"audiences\": {\n \"affinity_audiences\": null,\n \"custom_audiences\": null,\n \"demographics\": null,\n \"in_market_audiences\": null\n },\n \"descriptions\": [\n \"string\"\n ],\n \"final_url\": \"https://example.com\",\n \"headlines\": [\n \"string\"\n ],\n \"keywords\": [\n \"string\"\n ],\n \"name\": \"string\",\n \"sitelinks\": [\n {\n \"description1\": null,\n \"description2\": null,\n \"final_url\": null,\n \"link_text\": null\n }\n ]\n }\n ],\n \"bidding_strategy\": \"MAXIMIZE_CONVERSIONS\",\n \"budget_daily\": 1,\n \"business_description\": \"string\",\n \"campaign_name\": \"string\",\n \"customer_id\": \"string\",\n \"negative_keywords\": [\n \"string\"\n ],\n \"objective\": \"CONVERSIONS\",\n \"target_locations\": [\n \"string\"\n ],\n \"target_roas\": 1,\n \"website_url\": \"https://example.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"arguments\": {\n \"ad_groups\": [\n {\n \"audiences\": {\n \"affinity_audiences\": null,\n \"custom_audiences\": null,\n \"demographics\": null,\n \"in_market_audiences\": null\n },\n \"descriptions\": [\n \"string\"\n ],\n \"final_url\": \"https://example.com\",\n \"headlines\": [\n \"string\"\n ],\n \"keywords\": [\n \"string\"\n ],\n \"name\": \"string\",\n \"sitelinks\": [\n {\n \"description1\": null,\n \"description2\": null,\n \"final_url\": null,\n \"link_text\": null\n }\n ]\n }\n ],\n \"bidding_strategy\": \"MAXIMIZE_CONVERSIONS\",\n \"budget_daily\": 1,\n \"business_description\": \"string\",\n \"campaign_name\": \"string\",\n \"customer_id\": \"string\",\n \"negative_keywords\": [\n \"string\"\n ],\n \"objective\": \"CONVERSIONS\",\n \"target_locations\": [\n \"string\"\n ],\n \"target_roas\": 1,\n \"website_url\": \"https://example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adspirer.ai/api/v1/tools/create_search_campaign/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"arguments\": {\n \"ad_groups\": [\n {\n \"audiences\": {\n \"affinity_audiences\": null,\n \"custom_audiences\": null,\n \"demographics\": null,\n \"in_market_audiences\": null\n },\n \"descriptions\": [\n \"string\"\n ],\n \"final_url\": \"https://example.com\",\n \"headlines\": [\n \"string\"\n ],\n \"keywords\": [\n \"string\"\n ],\n \"name\": \"string\",\n \"sitelinks\": [\n {\n \"description1\": null,\n \"description2\": null,\n \"final_url\": null,\n \"link_text\": null\n }\n ]\n }\n ],\n \"bidding_strategy\": \"MAXIMIZE_CONVERSIONS\",\n \"budget_daily\": 1,\n \"business_description\": \"string\",\n \"campaign_name\": \"string\",\n \"customer_id\": \"string\",\n \"negative_keywords\": [\n \"string\"\n ],\n \"objective\": \"CONVERSIONS\",\n \"target_locations\": [\n \"string\"\n ],\n \"target_roas\": 1,\n \"website_url\": \"https://example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"quota": {
"limit": 150,
"period_end": "2026-05-01",
"tier": "plus",
"used": 42
},
"text": "(tool-specific textual output for create_search_campaign)"
},
"success": true,
"tool": "create_search_campaign"
}{
"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,
"success": false,
"tool": "create_search_campaign"
}{
"error": "Not authenticated. Please connect your Adspirer account first at https://adspirer.ai",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}{
"error": "đ¨ Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
"is_error": true,
"quota": {
"limit": 150,
"period_end": "2026-05-01",
"tier": "plus",
"upgrade_url": "https://adspirer.ai",
"used": 150
},
"success": false,
"tool": "create_search_campaign"
}{
"error": "Tool not found: create_search_campaign",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}{
"error": "Upstream platform rate limit hit (Meta Business Use Case throttle at 95%). Retry after 60 seconds.",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}{
"error": "Internal error: RuntimeError",
"is_error": true,
"success": false,
"tool": "create_search_campaign"
}
