Introduction
CSC API provides a high-performance REST API for global geographic data — 240+ countries, 5,000+ states, 150,000+ cities, and postcodes.
Base URL
https://countrystatecityapi.cloudtechsolution.coAuthentication
Send your API key in the X-API-KEY header on every request to /v1/*.
curl --request GET "https://countrystatecityapi.cloudtechsolution.co/v1/countries" \
-H 'X-API-KEY: YOUR_KEY'Try it
Each endpoint below has a Try it panel. Paste your API key once here — it is reused for every request on this page.
API key for Try it
Stored in this browser tab only (sessionStorage). Requests use your quota.
No key yet? Sign up or create a key.
Rate limits
Every response includes:
X-RateLimit-Limit— your tier's daily quotaX-RateLimit-Remaining— calls left todayX-RateLimit-Reset— when the counter resets (UTC midnight)
Countries
/v1/countriesList all countries with ISO codes, currency, and dial code.
/v1/countries/:iso2Get a single country by ISO-2 code.
States
/v1/countries/:iso2/statesList states for a country.
/v1/countries/:iso2/states/:stateCodeGet a state by ISO sub-division code.
Cities
/v1/countries/:iso2/citiesList cities for a country.
/v1/countries/:iso2/states/:stateCode/citiesList cities in a state.
Postcodes
/v1/countries/:iso2/postcodesList postcodes for a country. Optional query: state_code, q, limit, offset.
/v1/countries/:iso2/postcodes/:codeLookup postcode(s) by code within a country (always scope by country — codes repeat globally).
/v1/countries/:iso2/states/:stateCode/postcodesList postcodes in a state.
Errors
| Code | Description |
|---|---|
| 200 | Success. |
| 401 | API key missing or invalid. |
| 403 | API key revoked or subscription inactive. |
| 404 | Resource not found. |
| 429 | Rate limit exceeded for the day. Check X-RateLimit-Reset. |
Data attribution
Countries, states, cities, and postcodes are sourced from the open dr5hn/countries-states-cities-database project (ODbL). India PIN rows use the india-post pipeline documented upstream. The Free tier requires attribution; paid tiers do not.
Ready to integrate?
Create an account and grab your first API key.