Set geo targeting
set_geo_targetingSet a campaign's WHOLE geo-targeting set in one call — named areas and radius circles in a single include/exclude list, plus the campaign-level presence-vs-interest choice — the easy front door over update_campaign's geoTargets. Place names in include/exclude are resolved server-side (countries → geo registry → Google suggest); radius entries take lat/lng or an around place name (geocoded). Radius rows can only be INCLUDED (neither platform supports negative proximity — carve out places with an excluded area instead), and a set where every row is negative is rejected (ONLY_EXCLUSIONS). An empty set is legal: no geo criteria = ads can serve anywhere. locationIntent defaults to PRESENCE (people actually in the locations) — deliberately NOT the platforms' wider search-interest default. Use dry_run:true to get the resolved rows + the plain-language effective-targeting sentence (exactly what the UI shows) WITHOUT mutating the campaign. Scoped to the active Space.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| radii | No | Radius circles: { radius, unit?: 'km'|'mi', around?: place name (geocoded), lat?, lng?, name? }. "5km around Alexanderplatz" = { radius: 5, around: "Alexanderplatz" }. Radius is clamped to 1-500 at push. | |
| dry_run | No | If true, return the resolved rows + effective-targeting sentence WITHOUT writing. Use to verify resolution before committing. | |
| exclude | No | Areas to carve out of the included set — same shapes as include. "Germany except Bavaria" = include: ["Germany"], exclude: ["Bavaria"]. | |
| include | No | Areas to include: place names ("Germany", "Berlin") or { name, type?, countryCode? } objects. Resolved server-side. | |
| space_id | No | Override the active Space for this one call. | |
| geoTargets | No | Structured rows (see update_campaign.geoTargets). Alternative to include/exclude/radii — provide one form or the other. | |
| campaign_id | Yes | Campaign id (as returned by list_campaigns). | |
| locationIntent | No | Who counts as being in the targeted places. PRESENCE (the default) = people in — or regularly in — them. PRESENCE_OR_INTEREST = also people elsewhere who merely search about them (wider, much less qualified). Maps to Google geoTargetTypeSetting and Microsoft IntentOption. |