ACME API Documentation logo

Cities

Get Facebook Ad Cities by Name

GEThttps://api.acme.com/api/ads/facebook/cities
Available on Premium, Business, Enterprise plans.

Search for cities to be used for targeting when boosting an ad.

  • Cities use Facebook's key identifier and support radius targeting.

  • If a returned city has supportsRegion true, the region for this city is available for targeting. If supportsCity is true, this city is available for targeting.

  • Some locations may be returned as subcity with additional hierarchy fields.

Header Parameters

Authorizationstringrequired
API Key of the Primary Profile.

Format: Authorization: Bearer API_KEY
Profile-Keystring
Profile Key of a User Profile.

Format: Profile-Key: PROFILE_KEY

Query Parameters

searchstring

The search string to filter cities. Provide a partial or full city name.

limitnumberdefault: 25

Maximum number of cities to return.

curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.acme.com/api/ads/facebook/cities?search=Manhattan"
{
  "status": "success",
  "cities": [
    {
      "key": "2447439",
      "name": "Manhattan",
      "type": "city",
      "countryCode": "US",
      "countryName": "United States",
      "region": "Kansas",
      "regionId": 3859,
      "supportsRegion": true,
      "supportsCity": true
    },
    {
      "key": "2703980",
      "name": "Manhattan",
      "type": "subcity",
      "countryCode": "US",
      "countryName": "United States",
      "region": "New York",
      "regionId": 3875,
      "supportsRegion": true,
      "supportsCity": true,
      "geoHierarchyLevel": "SUBCITY",
      "geoHierarchyName": "BOROUGH"
    }
  ],
  "count": 2
}