Skip to Content
Tool referenceSearch geo locations

Search geo locations (adsap_search_geo_locations)

Platform: Meta · Read or write: Read · Plan: All plans · Consumes a task: No · Preview supported: No

What it does

Searches Meta location keys for cities and regions so the assistant can target them. You can narrow the search by location type or country. Country codes need no lookup; two-letter ISO codes work directly in targeting.

When to use it

  • Use it when an ad set targets a city or a region, to get the location key Meta needs.
  • Skip it for whole countries. Two-letter ISO codes go straight into targeting.countries.
  • query is required. location_types defaults to city and region, and country_code narrows the search to one country.
  • It searches Meta live, through your own Meta connection. It needs no ad account.
  • It returns 25 locations at most, with no further pages. Add country_code when a place name is common.

Worked example

You ask

“Which cities called Austin can I target in the US?”

The assistant calls adsap_search_geo_locations

{ "query": "Austin", "location_types": ["city"], "country_code": "US" }

Adsap returns

The field names are the ones Adsap returns. The values are examples.

{ "ok": true, "data": [ { "key": "1234567", "name": "Austin", "type": "city", "country_code": "US", "country_name": "United States", "region": "Texas", "supports_radius": true }, { "key": "1234568", "name": "Austin", "type": "city", "country_code": "US", "country_name": "United States", "region": "Minnesota", "supports_radius": true } ], "meta": { "total_count": 2, "query": "Austin" } }

How to read it

key is what adsap_create_ad_sets takes in targeting.cities or targeting.regions. type says which of the two lists it belongs in. region tells apart places that share a name, as with the two cities here. supports_radius is true when Meta allows a radius around the place.

total_count is the number of locations returned. If the right place is missing, the assistant can search again with a different spelling or another country_code.

Parameters

Descriptions are shortened from the tool schema. Your assistant sees the full text.

NameTypeRequiredDescription
querystringYes
location_typesarray of stringNo
country_codestringNoISO alpha-2 to narrow results.
limitintegerNo

Example prompts

  • “Find the Meta location key for Lyon.”
  • “Search for regions in Germany named Bavaria.”
  • “Which cities called Springfield can I target in the US?”

Guide

Read Audiences and targeting for the workflow around this tool, and the Tool reference for every tool.

The Meta Ads MCP server  page shows how to connect Meta Ads to Claude, ChatGPT or Perplexity.

Last updated on