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.co

Authentication

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 quota
  • X-RateLimit-Remaining — calls left today
  • X-RateLimit-Reset — unix timestamp when the counter resets (midnight UTC)

Countries

GET/v1/countries

List all countries with ISO codes, currency, and dial code.

GET/v1/countries/:iso2

Get a single country by ISO-2 code.

States

GET/v1/countries/:iso2/states

List states for a country.

GET/v1/countries/:iso2/states/:stateCode

Get a state by ISO sub-division code.

Cities

GET/v1/countries/:iso2/cities

List cities for a country.

GET/v1/countries/:iso2/states/:stateCode/cities

List cities in a state.

Errors

CodeDescription
200Success.
401API key missing or invalid.
403API key revoked or subscription inactive.
404Resource not found.
429Rate 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.

Get an API key