Skip to content

Search geo targeting locations (Meta)

Resolve a human-readable location name into Meta's opaque key used in targeting.cities[] / targeting.regions[] on POST /v1/ads/create (and the same fields under targeting.geo_locations on POST /v1/ads/boost). Wraps Meta's /search?type=adgeolocation endpoint.

Meta-only for now. Other platforms have their own location id systems and are not exposed here.

Per Meta's docs, q must contain only the locality name (e.g. "Amsterdam", not "Amsterdam, NL"). Use countryCode to disambiguate when the same name exists in multiple countries.

Resolve a human-readable location name into Meta's opaque key used in targeting.cities[] / targeting.regions[] on POST /v1/ads/create (and the same fields under targeting.geo_locations on POST /v1/ads/boost). Wraps Meta's /search?type=adgeolocation endpoint.

Meta-only for now. Other platforms have their own location id systems and are not exposed here.

Per Meta's docs, q must contain only the locality name (e.g. "Amsterdam", not "Amsterdam, NL"). Use countryCode to disambiguate when the same name exists in multiple countries.

Parameters

  • accountId (query, string) required — Social account ID (must be a connected Facebook or Instagram account).

  • q (query, string) required — Location name. Locality only — no region/country suffix.

  • type (query, string) — Type of location to search. Defaults to city.

  • countryCode (query, string) — ISO 3166-1 alpha-2 country code (e.g. NL) to scope the search.

  • limit (query, integer) — Maximum results to return.

Responses

200 — Matching locations

  • results (array)

400 — Missing or invalid query parameters

401

403 — Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.

404 — Account not found, or platform does not support targeting search (Meta only)