← Back to all APIs
🗺️

State / District / City API

Cascading location data to build address dropdowns.

Endpoint

GET /api/v1/states

Related endpoints:

  • GET /api/v1/districts/{state_id}
  • GET /api/v1/cities/{district_id}

Parameters

Name In Required Description
state_id path No Used by /districts/{state_id}
district_id path No Used by /cities/{district_id}

Example request

curl https://apibharat.com/api/v1/states

Example response

{
  "success": true,
  "data": {
    "count": 4,
    "states": [
      { "id": 4, "name": "Delhi", "abbr": "DL" },
      { "id": 2, "name": "Karnataka", "abbr": "KA" },
      { "id": 1, "name": "Maharashtra", "abbr": "MH" },
      { "id": 3, "name": "Tamil Nadu", "abbr": "TN" }
    ]
  },
  "message": "States found"
}

Try it live

Open the example in your browser:

/api/v1/states ↗