Skip to main content
GET
Resolve an ISO 3166-2 subdivision code (e.g. US-CA, IN-MH, DE-BY) to the state/province record. The match prefers the canonical iso3166_2 column. When that column is NULL for a row (common in older imports), the endpoint falls back to matching the legacy iso2 column scoped to the same country — so the lookup works even for partially-coded rows without risking cross-country false matches.
Availability: Starter plan and above. Returns 403 on Community plan.
Responses are cached server-side for 1 hour. The lookup key is the full ISO 3166-2 code, so US-CA and us-ca collapse to the same cache slot (input is auto-uppercased).

Authorizations

X-CSCAPI-KEY
string
header
required

API key for authentication. Get your free key at app.countrystatecity.in.

Query Parameters

iso
string
required

ISO 3166-2 subdivision code (e.g., US-CA or IN-MH). Case-insensitive.

Example:

"US-CA"

Response

State record with ISO identifiers and country reference

State record returned by the ISO 3166-2 lookup endpoint.

id
integer
required

Internal CSC state ID

Example:

1416

name
string
required

State name in English

Example:

"California"

country_id
integer
required

Parent country ID

Example:

233

country_code
string
required

Parent country ISO2 code

Example:

"US"

iso2
string | null

Legacy state ISO2 code

Example:

"CA"

iso3166_2
string | null

ISO 3166-2 subdivision code

Example:

"US-CA"