Introduction
CSC API provides a high-performance REST API for global geographic data — 240+ countries, 5,000+ states, and 150,000+ cities.
Base URL
https://countrystatecityapi.cloudtechsolution.coAuthentication
Send your API key in the X-API-KEY header on every request to /v1/*.
cURL
curl --request GET "https://countrystatecityapi.cloudtechsolution.co/v1/countries" \
-H 'X-API-KEY: YOUR_KEY'Rate limits
Every response includes:
X-RateLimit-Limit— your tier's daily quotaX-RateLimit-Remaining— calls left todayX-RateLimit-Reset— unix timestamp when the counter resets (midnight UTC)
Countries
GET
/v1/countriesList all countries with ISO codes, currency, and dial code.
GET
/v1/countries/:iso2Get a single country by ISO-2 code.
States
GET
/v1/countries/:iso2/statesList states for a country.
GET
/v1/countries/:iso2/states/:stateCodeGet a state by ISO sub-division code.
Cities
GET
/v1/countries/:iso2/citiesList cities for a country.
GET
/v1/countries/:iso2/states/:stateCode/citiesList cities 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
Geographic data is sourced from the open dr5hn/countries-states-cities-database project, licensed under ODbL. The Free tier requires attribution; paid tiers do not.
Ready to integrate?
Create an account and grab your first API key.