APIHub
Back to Explore

CountryStateCity

The CountryStateCity API offers RESTful endpoints that return structured geographic data—countries, their states/regions, and cities—in JSON format, covering over 250 countries, 5,300+ states, and 150,000+ cities.

Geocoding
apiKeyHeader
HTTPS
CORS: Yes
Description enriched
Visit official documentation

Latency

1305ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
GET

/v1/countries/{countryIso2}/states

Retrieve the list of states (or regions) for a specific country.

  • countryIso2 (path, required) — ISO‑3166‑1 alpha‑2 code of the country (e.g., IN for India).
  • X-CSCAPI-KEY (header, required) — API key required for authentication.

1 endpoint auto-detected

Authentication

This API uses an API key, passed in the "X-CSCAPI-KEY" header. No OAuth required.

curl -X GET \
  "https://countrystatecity.in//v1/countries/{countryIso2}/states" \
  -H "X-CSCAPI-KEY: YOUR_API_KEY"

countrystatecity.in · HTTPS only