Meta Ads / API Reference
meta_ads_build_geo_targeting
Meta Ads tool. Assemble a valid `geo_locations` block: several places, radii, exclusions, and whether to reach residents or anyone passing through. Does no network call -- it validates and formats. Resolve names to keys with meta_ads_find_location first, then feed the keys in here. `custom_pins` is how you target an exact spot: a shop, a showroom, a venue. Meta has no key for an address, so a point is given as coordinates plus a radius, and that is the only way to say "within 5 km of this door". `location_types` no longer does anything. Meta removed the setting, and an ad set that still carries it builds fine but cannot be PUBLISHED -- error #1870194, "update your location targeting to publish your ad". The field is accepted here and dropped with a warning, so an ad still goes live; targeting now reaches people living in and recently in the area, which was Meta's default anyway. There is no longer any way to ask for residents only, and telling a client otherwise would be wrong. Args: location_keys: Comma-separated keys from meta_ads_find_location, each optionally prefixed with its type, e.g. '2420379,city:1234,zip:5678'. Without a prefix the key is treated as a city, which is what the lookup returns most often. Prefix anything that is not a city. countries: Comma-separated two-letter codes, e.g. 'IL,US'. custom_pins: JSON list of exact points, e.g. '[{"lat":32.0853,"lng":34.7818,"radius_km":5,"name":"Tel Aviv shop"}]'. radius_km defaults to the `radius_km` argument, or 10. A pin may be as tight as 1 km, which is the whole reason to use one. radius_km: Default radius in km for every city, postcode and pin that does not carry its own. Named places accept 16-80 km only -- below 16 Meta reaches nobody without complaining, so this rejects it and points you at custom_pins. Blank leaves Meta's own city boundary. excluded_location_keys: Same format as location_keys, for places to exclude -- e.g. run nationally but not in the one city already saturated. location_types: Ignored. Meta removed it; passing it is answered with a warning rather than an error so the ad can still publish. See above.
This is a write tool: it builds geo targeting in your Meta Ads account. Claude asks you to confirm before it runs.
Ask Claude
You do not call this tool yourself. Ask for the outcome and the client picks the tool:
Build geo targeting in my Meta Ads account.
It takes 0 required and 6 optional parameters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location_keys | string | No | Location Keys |
countries | string | No | Countries |
custom_pins | string | No | Custom Pins |
radius_km | string | No | Radius Km |
excluded_location_keys | string | No | Excluded Location Keys |
location_types | string | No | Location Types |
Related Meta Ads tools
meta_ads_ab_test_resultsmeta_ads_account_change_historymeta_ads_account_diagnosticsmeta_ads_account_spending_limitmeta_ads_admeta_ads_ad_account
Before you can call it
This tool needs a connected Meta Ads account. The Meta Ads connect guide covers how to authorize it and what it unlocks, and the quickstart gets a client talking to the server in about five minutes.
Workflows that use this
Rather than calling tools one at a time, these skills run a whole procedure against the same account:
Start free — 30 tool calls a month
No card required. Connect Google Ads, Meta Ads, GA4 or Search Console and ask Claude for the outcome — it picks the tool.