Google Ads: add location targets
set_geo_targetsADDS location criteria to a campaign; its existing locations stay.
On a campaign that already targets locations, each added target widens
where its ads show at once, which can raise what a running campaign
spends.
This never replaces targeting: the locations and exclusions the campaign
already has are left as they are. Moving a campaign from country A to
country B is two changes: add B here, then take A out with
remove_geo_targets. A campaign with no location criteria serves
everywhere; the first location added narrows it.
Add locations to TARGET with `location_ids`, locations to EXCLUDE with
`excluded_location_ids` (e.g. target India but exclude one city), and/or
a radius around a point or an address with `radius_targets` (e.g. 10 km
around a shop). Provide at least one of the three. A radius can only be
targeted, not excluded. With radius_targets the campaign is read first,
and a Video campaign is refused before anything is sent: the Google Ads
API cannot change Video campaigns, so its locations are set in Google
Ads.
Common location IDs (Google Ads geo target constants):
US=2840, UK=2826, Canada=2124, Australia=2036,
India=2356, Singapore=2702, UAE=2784,
Germany=2276, France=2250
Find more IDs at:
https://developers.google.com/google-ads/api/data/geotargets
Args:
customer_id: The Google Ads customer ID.
campaign_id: The ID of the campaign.
location_ids: Geo target constant IDs to TARGET. Optional.
excluded_location_ids: Geo target constant IDs to EXCLUDE. Optional.
radius_targets: Radius targets to add, each an object with:
- radius: The distance, a number greater than zero.
- radius_units: KILOMETERS or MILES. Default: KILOMETERS.
- latitude and longitude: The centre in degrees (both together).
- street_address, city_name, postal_code, province_code,
province_name, country_code: The centre as an address, which
Google turns into a point. With latitude and longitude the
address is only a label.
Each needs latitude and longitude, or an address. Optional.
Returns:
Dictionary with created location criteria.Tools revision: d80f65c0.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"campaign_id": "<campaign_id>"
},
"name": "set_geo_targets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ||
| customer_id | Yes | ||
| location_ids | No | ||
| radius_targets | No | ||
| excluded_location_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |