CountryStateCity API Alternative
CountryStateCity (countrystatecity.in) is a clean, free countries/states/cities reference API. If you also need IP geolocation and live exchange rates without managing a second API, ApogeoAPI bundles all five data layers — countries, states, cities, IP geo, and FX rates — under one key.
IP Geolocation included
Detect visitor country, city, timezone, and ISP automatically. CountryStateCity has no IP lookup endpoint.
Live exchange rates
161 currencies updated every 4 hours. CountryStateCity provides currency codes but no live rates.
CountryStateCity vs ApogeoAPI
| Feature | CountryStateCity | ApogeoAPI |
|---|---|---|
| Countries database | ✅ Yes | ✅ 250 countries with full details |
| States / provinces | ✅ Yes | ✅ 5,000+ states |
| Cities database | ✅ Yes | ✅ 150k+ cities with search |
| IP Geolocation | ❌ No | ✅ IPv4 + IPv6 |
| Live exchange rates | ❌ No | ✅ 161 currencies, refreshed 4 h |
| Phone dial codes | ✅ Yes | ✅ Yes |
| Country flags | ✅ Emoji | ✅ SVG URL + emoji |
| Currency code per country | ✅ Yes | ✅ Yes + live rate |
| Free tier | ✅ Free with key | ✅ 1,000 req / month + 14-day trial |
| HTTPS on free plan | ✅ Yes | ✅ Always HTTPS |
| Uptime SLA | ❌ Best-effort | 99% (Basic+) |
Migrate from CountryStateCity
// Before (CountryStateCity)
const res = await fetch(
'https://api.countrystatecity.in/v1/countries',
{ headers: { 'X-CSCAPI-KEY': 'YOUR_KEY' } }
);
const countries = await res.json();
// [{ id, name, iso2, iso3, phone_code, currency, ... }]
// After (ApogeoAPI — same data + flags + timezone + enrichment)
const res = await fetch('https://api.apogeoapi.com/v1/countries', {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
const { data: countries } = await res.json();
// [{ iso2, iso3, name, flag_url, phone_code, currency, timezone, ... }]
// States for a country:
const statesRes = await fetch('https://api.apogeoapi.com/v1/countries/US/states', {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
// Cities filtered by country:
const citiesRes = await fetch('https://api.apogeoapi.com/v1/cities?country=US', {
headers: { 'X-API-Key': 'YOUR_KEY' }
});Frequently Asked Questions
Is CountryStateCity API free?
CountryStateCity (countrystatecity.in) offers a free tier with API key authentication and reasonable rate limits. It provides country, state, and city data in JSON format. The free tier has enough quota for most development needs.
What is CountryStateCity API missing compared to ApogeoAPI?
CountryStateCity is a geographic reference database without IP geolocation or exchange rate capabilities. ApogeoAPI adds IP-based country/city detection and live exchange rates for 161 currencies — useful when you need to detect a visitor's location automatically or localise prices.
Does ApogeoAPI have a countries/states/cities hierarchy like CountryStateCity?
Yes. ApogeoAPI provides /v1/countries (250 countries), /v1/countries/:code/states (all states/provinces for a country), and /v1/cities?country=XX (cities filtered by country). The data is enriched with flags, phone codes, timezone, currency, and more — beyond the basic geographic hierarchy.
Countries + cities + IP geo + exchange rates
1,000 requests/month free. Full-access 14-day trial. No credit card needed.
Get your free API key