curl --request POST \
--url https://app.goosybear.ai/api/v1/tools/ads.google_search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign_id": "<string>",
"target_cpa_dollars": 123,
"target_roas_percent": 123,
"keywords": [
{
"text": "<string>"
}
],
"negative_keywords": [
{
"text": "<string>"
}
],
"lead_form": true,
"target": "<string>",
"portfolio": "<string>",
"portfolio_name": "<string>",
"conversion_action": "<string>",
"workspace": "<string>"
}
'import requests
url = "https://app.goosybear.ai/api/v1/tools/ads.google_search"
payload = {
"campaign_id": "<string>",
"target_cpa_dollars": 123,
"target_roas_percent": 123,
"keywords": [{ "text": "<string>" }],
"negative_keywords": [{ "text": "<string>" }],
"lead_form": True,
"target": "<string>",
"portfolio": "<string>",
"portfolio_name": "<string>",
"conversion_action": "<string>",
"workspace": "<string>"
}
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({
campaign_id: '<string>',
target_cpa_dollars: 123,
target_roas_percent: 123,
keywords: [{text: '<string>'}],
negative_keywords: [{text: '<string>'}],
lead_form: true,
target: '<string>',
portfolio: '<string>',
portfolio_name: '<string>',
conversion_action: '<string>',
workspace: '<string>'
})
};
fetch('https://app.goosybear.ai/api/v1/tools/ads.google_search', 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://app.goosybear.ai/api/v1/tools/ads.google_search",
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([
'campaign_id' => '<string>',
'target_cpa_dollars' => 123,
'target_roas_percent' => 123,
'keywords' => [
[
'text' => '<string>'
]
],
'negative_keywords' => [
[
'text' => '<string>'
]
],
'lead_form' => true,
'target' => '<string>',
'portfolio' => '<string>',
'portfolio_name' => '<string>',
'conversion_action' => '<string>',
'workspace' => '<string>'
]),
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://app.goosybear.ai/api/v1/tools/ads.google_search"
payload := strings.NewReader("{\n \"campaign_id\": \"<string>\",\n \"target_cpa_dollars\": 123,\n \"target_roas_percent\": 123,\n \"keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"negative_keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"lead_form\": true,\n \"target\": \"<string>\",\n \"portfolio\": \"<string>\",\n \"portfolio_name\": \"<string>\",\n \"conversion_action\": \"<string>\",\n \"workspace\": \"<string>\"\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://app.goosybear.ai/api/v1/tools/ads.google_search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": \"<string>\",\n \"target_cpa_dollars\": 123,\n \"target_roas_percent\": 123,\n \"keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"negative_keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"lead_form\": true,\n \"target\": \"<string>\",\n \"portfolio\": \"<string>\",\n \"portfolio_name\": \"<string>\",\n \"conversion_action\": \"<string>\",\n \"workspace\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.goosybear.ai/api/v1/tools/ads.google_search")
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 \"campaign_id\": \"<string>\",\n \"target_cpa_dollars\": 123,\n \"target_roas_percent\": 123,\n \"keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"negative_keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"lead_form\": true,\n \"target\": \"<string>\",\n \"portfolio\": \"<string>\",\n \"portfolio_name\": \"<string>\",\n \"conversion_action\": \"<string>\",\n \"workspace\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "<string>",
"campaign_type": "search",
"launched": true,
"bidding": "<string>",
"keywords": [
{
"resource_name": "<string>",
"text": "<string>",
"match_type": "exact",
"status": "enabled"
}
],
"negative_keywords": [
{
"resource_name": "<string>",
"text": "<string>",
"match_type": "exact",
"status": "enabled"
}
],
"ads": [
{
"resource_name": "<string>",
"status": "enabled"
}
],
"conversion_goal": "<string>",
"lead_form": true,
"portfolios": [
{
"resource_name": "<string>",
"name": "<string>",
"campaigns": 123
}
],
"conversion_actions": [
{
"resource_name": "<string>",
"name": "<string>"
}
],
"waiting_for_approval": [
"<string>"
],
"workspace": "<string>",
"working_in": {
"label": "<string>",
"note": "<string>",
"workspace": "<string>",
"source": "call-override"
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}Call ads.google_search
Read or change a Google campaign’s Search setup — ‘run it on Google Search’, ‘add the keyword running shoes, exact match’, ‘never show for free’, ‘switch to Target CPA at $25’, ‘count booked calls as the conversion’, ‘put it on our shared strategy’, ‘pause that keyword’, ‘remove the second ad’, ‘let people sign up on Google’s form too’. read shows the campaign type, keywords with match types, negative keywords, bidding, conversion goal, ads (each with the resource_name a later change names) and whether Google’s lead form is on, and the account’s shared strategies and conversion actions. set_up, before launch, sets Search or Display (or, as shopping, only a Shopping campaign’s bidding: most clicks, most sales value or a target return) and, for Search, the keywords, negative keywords, bidding — Maximize clicks, Manual CPC, Maximize conversions, Target CPA, Maximize conversion value, Target ROAS or a shared (portfolio) strategy — and the conversion it bids toward, replacing what was there; or, sent alone, lead_form turns Google’s own sign-up form under the ads on or off on a Search or Performance Max campaign (the ads still link to the page), changing nothing else; launching stays the approve. create_portfolio makes a shared strategy (Target CPA, Target ROAS or Maximize conversions), which spends nothing until a campaign uses it. change, after launch, stages ONE change — add keywords or negatives, change bidding or the conversion goal, move a shared strategy’s target, pause, turn on or remove a keyword, negative, ad or the whole campaign — which reaches Google only when the person approves it on the campaign. Removing is permanent at Google. Not for pausing the whole campaign — that is the member’s own Pause on its screen; not for creating a conversion action — that is ads.create_conversion_action.
Every result names the workspace it ran in. Say which workspace the answer is about. When the account has more than one workspace and none is selected, this tool refuses with workspace_ambiguous and lists the choices — offer them, never pick one.
curl --request POST \
--url https://app.goosybear.ai/api/v1/tools/ads.google_search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign_id": "<string>",
"target_cpa_dollars": 123,
"target_roas_percent": 123,
"keywords": [
{
"text": "<string>"
}
],
"negative_keywords": [
{
"text": "<string>"
}
],
"lead_form": true,
"target": "<string>",
"portfolio": "<string>",
"portfolio_name": "<string>",
"conversion_action": "<string>",
"workspace": "<string>"
}
'import requests
url = "https://app.goosybear.ai/api/v1/tools/ads.google_search"
payload = {
"campaign_id": "<string>",
"target_cpa_dollars": 123,
"target_roas_percent": 123,
"keywords": [{ "text": "<string>" }],
"negative_keywords": [{ "text": "<string>" }],
"lead_form": True,
"target": "<string>",
"portfolio": "<string>",
"portfolio_name": "<string>",
"conversion_action": "<string>",
"workspace": "<string>"
}
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({
campaign_id: '<string>',
target_cpa_dollars: 123,
target_roas_percent: 123,
keywords: [{text: '<string>'}],
negative_keywords: [{text: '<string>'}],
lead_form: true,
target: '<string>',
portfolio: '<string>',
portfolio_name: '<string>',
conversion_action: '<string>',
workspace: '<string>'
})
};
fetch('https://app.goosybear.ai/api/v1/tools/ads.google_search', 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://app.goosybear.ai/api/v1/tools/ads.google_search",
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([
'campaign_id' => '<string>',
'target_cpa_dollars' => 123,
'target_roas_percent' => 123,
'keywords' => [
[
'text' => '<string>'
]
],
'negative_keywords' => [
[
'text' => '<string>'
]
],
'lead_form' => true,
'target' => '<string>',
'portfolio' => '<string>',
'portfolio_name' => '<string>',
'conversion_action' => '<string>',
'workspace' => '<string>'
]),
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://app.goosybear.ai/api/v1/tools/ads.google_search"
payload := strings.NewReader("{\n \"campaign_id\": \"<string>\",\n \"target_cpa_dollars\": 123,\n \"target_roas_percent\": 123,\n \"keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"negative_keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"lead_form\": true,\n \"target\": \"<string>\",\n \"portfolio\": \"<string>\",\n \"portfolio_name\": \"<string>\",\n \"conversion_action\": \"<string>\",\n \"workspace\": \"<string>\"\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://app.goosybear.ai/api/v1/tools/ads.google_search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": \"<string>\",\n \"target_cpa_dollars\": 123,\n \"target_roas_percent\": 123,\n \"keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"negative_keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"lead_form\": true,\n \"target\": \"<string>\",\n \"portfolio\": \"<string>\",\n \"portfolio_name\": \"<string>\",\n \"conversion_action\": \"<string>\",\n \"workspace\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.goosybear.ai/api/v1/tools/ads.google_search")
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 \"campaign_id\": \"<string>\",\n \"target_cpa_dollars\": 123,\n \"target_roas_percent\": 123,\n \"keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"negative_keywords\": [\n {\n \"text\": \"<string>\"\n }\n ],\n \"lead_form\": true,\n \"target\": \"<string>\",\n \"portfolio\": \"<string>\",\n \"portfolio_name\": \"<string>\",\n \"conversion_action\": \"<string>\",\n \"workspace\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "<string>",
"campaign_type": "search",
"launched": true,
"bidding": "<string>",
"keywords": [
{
"resource_name": "<string>",
"text": "<string>",
"match_type": "exact",
"status": "enabled"
}
],
"negative_keywords": [
{
"resource_name": "<string>",
"text": "<string>",
"match_type": "exact",
"status": "enabled"
}
],
"ads": [
{
"resource_name": "<string>",
"status": "enabled"
}
],
"conversion_goal": "<string>",
"lead_form": true,
"portfolios": [
{
"resource_name": "<string>",
"name": "<string>",
"campaigns": 123
}
],
"conversion_actions": [
{
"resource_name": "<string>",
"name": "<string>"
}
],
"waiting_for_approval": [
"<string>"
],
"workspace": "<string>",
"working_in": {
"label": "<string>",
"note": "<string>",
"workspace": "<string>",
"source": "call-override"
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"retry_after_seconds": 123
},
"retry_after_seconds": 123
}Authorizations
An API key minted at Settings › API & MCP. Send it as Authorization: Bearer <key>. A key carries its holder's own permissions, resolved on every call — revoking a membership closes the key's reach immediately. Keep it in an environment variable (GOOSY_API_KEY), never in a committed file.
Headers
Body
read: show the campaign's type, keywords, negative keywords, bidding, conversion goal, ads and whether Google's lead form is on, and the account's shared strategies and conversion actions. set_up: before launch, set the campaign type and, for Search, its keywords, negatives, bidding and conversion goal (replaces what was there); or lead_form alone, which changes nothing else. change: after launch, stage one change for the person to approve. create_portfolio: make a shared bidding strategy (portfolio_name, portfolio_kind and its target).
read, set_up, change, create_portfolio set_up only. search runs text ads on Google results for the keywords; display runs the picture ads across sites; shopping sets only a Shopping campaign's bid_choice, maximize_clicks, maximize_conversion_value or target_roas (with target_roas_percent, 1 to 100000), and keeps everything else.
search, display, shopping How Google bids. target_cpa needs target_cpa_dollars; target_roas needs target_roas_percent; portfolio needs portfolio (a shared strategy's resource_name from a read).
maximize_clicks, manual_cpc, maximize_conversions, target_cpa, maximize_conversion_value, target_roas, portfolio change only. add_keywords / add_negatives take keywords; bidding takes bid_choice; keyword_status / ad_status take target and status; remove_keyword / remove_negative / remove_ad take target; conversion_goal takes conversion_action; portfolio_target takes target (the campaign's shared strategy), portfolio_kind and its target; remove_campaign takes nothing.
add_keywords, add_negatives, bidding, keyword_status, ad_status, remove_keyword, remove_negative, remove_ad, remove_campaign, conversion_goal, portfolio_target Response
The call was admitted and dispatched. ok says whether the tool succeeded — a refusal the tool itself produced is still a 200, exactly as it is a successful JSON-RPC result over MCP.
- Option 1
- Option 2
The tool ran and answered.