AI Search

Get Cities List

This metadata API returns a list of cities within a specified country and (optionally) a specific state. It is used to configure precise city-level targeting while creating or updating deals.

API Endpoint

GET https://apis.demand.ssp.inmobi.com/v1/meta/cities

Parameters

Headers

Field Name Type Is mandatory (Y/N)? Description
Authorization String Y Bearer token for authentication (Bearer <token>)
X-USER-ID String Y The ID of the user making the request
X-INMOBI-ORG-ID String Y The organization ID associated with the user
Content-Type String Y Specifies the media type of the request body. Use: application/json

Query Parameters

Field Name Type Is mandatory (Y/N)? Description
country_id Integer Y The ID of the country to filter cities by
state_id Integer N The ID of the state to further filter cities

Sample Request

curl -X GET "https://apis.demand.ssp.inmobi.com/v1/meta/cities?country_id=108&state_id=31301" \
-H "Authorization: Bearer <your bearer token>" \
-H "X-USER-ID: <test app>" \
-H "X-INMOBI-ORG-ID: <your org id>" \
-H "Content-Type: application/json" \

Sample Response

{
  "data": {
    "cities": [
      {
        "id": 1174474,
        "name": "CARIPI",
        "stateName": "AMAPA",
        "stateId": 31301,
        "countryName": "Brazil",
        "countryId": 108
      },
      {
        "id": 73777,
        "name": "MACAPA",
        "stateName": "AMAPA",
        "stateId": 31301,
        "countryName": "Brazil",
        "countryId": 108
      }
      // ... more cities
    ],
    "pageNum": 1,
    "numItems": 5,
    "nextPage": false,
    "totalItems": 5,
    "totalPages": 1
  }
}

On This Page

Last Updated on: 18 Jul, 2025