v1.1.0

🌍 Country State API

Fast, reliable API for countries and states. Perfect for dropdowns, forms, and international applications.

🚀 Fast & Redis Cached 🛡️ Redis-Backed Limits 📞 Phone Codes 🌍 Regions & Flags 🔍 Search Ready

🚀 Quick Start

curl https://your-api-domain.com/v1/countries

Get started in seconds. No authentication required for public use.

📊 What You Get

  • 249 Countries with complete data
  • States & Provinces for all countries
  • 150,000+ Cities with coordinates
  • Phone codes & local names
  • 6 World regions with subregions
  • Currencies & flags included

🔗 Main Endpoints

GET
/v1/countries

All countries with phone codes and flags

→ Try it
GET
/v1/countries/US/states/California/cities

Get cities for a specific state

→ Try it
GET
/v1/search/cities?q=Tokyo

Global search for cities

→ Try it

💡 Use Cases

  • Address forms with country → state → city search
  • Phone validation with country codes
  • E-commerce shipping & regional pricing
  • Travel & Logistics city data & coordinates
  • Localized UI with name_local support

🛠️ Integration

// Get countries with flags const countries = await fetch('/v1/countries') .then(r => r.json()); // Populate dropdown countrySelect.innerHTML = countries.map(c => `<option value="${c.code}"> ${c.flag} ${c.name} (${c.phone_code}) </option>` ).join('');

📚 Documentation

Explore the full API with interactive documentation.

📖 Swagger UI 📋 ReDoc