🚀 VaultsPay API v1 is live. See what's new →
UsersLocation Data — List Cities by State

Location Data — List Cities by State

Returns a list of all cities within a specific state or province. You must provide the stateId as a path parameter. This API is typically used to populate city dropdowns when selecting an address or location.

Limitations: The list is static and may not include newly formed administrative regions.

GET{gateway}/us/api/v1/cities/{stateId}

Payload

AttributeTypeDescriptionRequired
stateIdIntegerID of the state for which the list of cities is to be fetched. Passed as a path parameter.Yes

Response

AttributeTypeDescription
dataArray<Object>List of city objects.
data[].idIntegerCity ID.
data[].nameStringCity name.
data[].latitudeStringLatitude of the city.
data[].longitudeStringLongitude of the city.
data[].countryObjectParent country details for the city.
data[].country.idIntegerCountry ID.
data[].country.nameStringCountry name.
data[].country.iso2StringISO 3166-1 alpha-2 code.
data[].country.phoneCodeStringCountry calling code.
data[].country.capitalStringCountry capital city.
data[].country.currencyStringCurrency code (e.g., PKR).
data[].country.currencySymbolStringCurrency symbol (e.g., ₨).
data[].country.regionStringGeographic region.
data[].country.latitudeStringLatitude of the country center.
data[].country.longitudeStringLongitude of the country center.
data[].country.nationalityStringDemonym/nationality.
data[].stateObjectState or province information of the city.
data[].state.idIntegerState ID.
data[].state.nameStringState or province name.
data[].state.latitudeStringLatitude of the state.
data[].state.longitudeStringLongitude of the state.
data[].state.countryObjectNested country details (same as data[].country).
200 — SUCCESS
{
  "data": [
    {
      "id": 85475,
      "name": "Islamabad",
      "country": {
        "createdAt": "2025-01-21T14:13:39.716+00:00",
        "id": 167,
        "name": "Pakistan",
        "iso2": "PK",
        "phoneCode": "92",
        "capital": "Islamabad",
        "currency": "PKR",
        "currencySymbol": "₨",
        "region": "Asia",
        "latitude": "70.00000000",
        "longitude": "30.00000000",
        "nationality": "Pakistani"
      },
      "state": {
        "createdAt": "2025-01-21T14:13:40.402+00:00",
        "id": 3169,
        "country": {
          "createdAt": "2025-01-21T14:13:39.716+00:00",
          "id": 167,
          "name": "Pakistan",
          "iso2": "PK",
          "phoneCode": "92",
          "capital": "Islamabad",
          "currency": "PKR",
          "currencySymbol": "₨",
          "region": "Asia",
          "latitude": "70.00000000",
          "longitude": "30.00000000",
          "nationality": "Pakistani"
        },
        "latitude": "33.72049970",
        "longitude": "73.04052770",
        "name": "Islamabad Capital Territory"
      },
      "latitude": "33.72148000",
      "longitude": "73.04329000"
    }
  ]
}
400 — FAILED
{
  "code": 1000,
  "message": "Invalid payload. Please check your request.",
  "type": "INVALID_PAYLOAD",
  "errors": [
    {
      "key": "stateId",
      "reason": "Invalid value provided."
    }
  ]
}