Skip to main content
POST
Call ads.google_search

Authorizations

Authorization
string
header
required

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

x-request-id
string

Your own id for this request, echoed back and recorded on the audit trail. 1–128 characters from A–Z a–z 0–9 . _ : -, starting with a letter or digit; anything else is replaced by a generated id.

Maximum string length: 128

Body

application/json
action
enum<string>
required

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).

Available options:
read,
set_up,
change,
create_portfolio
campaign_id
string

The campaign's id. Leave it out to use the campaign the person is looking at.

campaign_type
enum<string>

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.

Available options:
search,
display,
shopping
bid_choice
enum<string>

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).

Available options:
maximize_clicks,
manual_cpc,
maximize_conversions,
target_cpa,
maximize_conversion_value,
target_roas,
portfolio
target_cpa_dollars
number

Target CPA in DOLLARS per conversion, e.g. 25 for $25.

target_roas_percent
number

Target ROAS as a PERCENT, e.g. 400 for 400%.

keywords
object[]

Keywords as the person said them, each with its match type: exact, phrase or broad. Up to 80 characters and 10 words each.

Maximum array length: 50
negative_keywords
object[]

Negative keywords: searches the ads must never show for, with match types.

Maximum array length: 50
lead_form
boolean

set_up only: true puts Google's own sign-up form under the ads, beside the link to their page, on a Search or Performance Max campaign; false sends people to the page only. Send it alone to change just this.

op
enum<string>

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.

Available options:
add_keywords,
add_negatives,
bidding,
keyword_status,
ad_status,
remove_keyword,
remove_negative,
remove_ad,
remove_campaign,
conversion_goal,
portfolio_target
target
string

change only: the keyword, negative or ad to act on, as its resource_name from a read.

portfolio
string

bid_choice portfolio: the shared strategy's resource_name from a read.

portfolio_name
string

create_portfolio: the shared strategy's name.

Maximum string length: 255
portfolio_kind
enum<string>

create_portfolio / portfolio_target: the shared strategy's type; its target rides target_cpa_dollars or target_roas_percent.

Available options:
target_cpa,
target_roas,
maximize_conversions
conversion_action
string

The conversion action the campaign bids toward, as its resource_name from a read.

status
enum<string>

keyword_status / ad_status: where it should stand.

Available options:
paused,
enabled
workspace
string

Which workspace to run in — its slug. Omit to use your default. With more than one reachable workspace and no default, the call is refused and the choices are listed.

Minimum string length: 1

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.

The tool ran and answered.

ok
boolean
required
message
string
required
campaign_type
enum<string>
required
Available options:
search,
display,
performance_max,
demand_gen,
shopping
launched
boolean
required
bidding
string | null
required
keywords
object[]
required
negative_keywords
object[]
required
ads
object[]
required
conversion_goal
string | null
required
lead_form
boolean
required
portfolios
object[]
required
conversion_actions
object[]
required
waiting_for_approval
string[]
required
workspace
string
required

The slug of the workspace this call ran in.

working_in
object
required

Which workspace this call ran in, and how that was decided. Present on every workspace-scoped result.