API Reference

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` is the setting people forget, and it changes who sees the ad more than the radius does. 'home' is residents only; 'recent' is anyone recently there; Meta's own default is home + recent. Use 'home' alone for a local business selling to locals. ('travel_in' is documented but Meta currently rejects it -- reach visitors with 'recent' instead.) 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: Comma-separated: home, recent, travel_in. Blank leaves Meta's default (home + recent).

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

ParameterTypeRequiredDescription
location_keysstringNoLocation Keys
countriesstringNoCountries
custom_pinsstringNoCustom Pins
radius_kmstringNoRadius Km
excluded_location_keysstringNoExcluded Location Keys
location_typesstringNoLocation Types

Related Meta Ads tools

Before you can call it

This tool needs a connected Meta Ads account. The Meta Ads connect guide covers the OAuth flow and the permissions it asks for, 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.