Countries & Cities APIFree REST Service
Provides population and geographical data for countries and cities. Use it to get detailed information on populations, locations, flags, currencies, capitals, and more.
Countries & Cities API API Key Required
An external API key is required to authenticate requests with Countries & Cities API. Allowance: Free (Quota-limited). Obtain your free key from the official developer portal and replace YOUR_API_KEY in the code snippets below.
Live Test Console & 3D Assistant
Launch 3D studio to inspect query parameters, authentication headers, or test with your personal developer key.
Quickstart Code Snippets
Copy-paste ready boilerplate for your tech stack.
// Call via FreeAPI Smart Edge Gateway (In-Memory Cache + CORS Guard)
// Endpoint: https://findfreeapi.com/api/v1/gateway/countries-cities-api
async function callCountriesCitiesAPI() {
try {
const response = await fetch("https://findfreeapi.com/api/v1/gateway/countries-cities-api", {
headers: {
"Accept": "application/json",
// "x-freeapi-key": "fapi_live_your_api_key" // FreeAPI Gateway Key
}
});
if (!response.ok) {
throw new Error(`Gateway HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log("FreeAPI Live Data:", data);
} catch (error) {
console.error("FreeAPI Gateway Error:", error);
}
}
callCountriesCitiesAPI();Share with Devs & GitHub Badge
Share this public endpoint with your team or embed verified status badge in your README.md.
Key Advantages (Pros)
- Free Tier Available: Developers can test and build without entering credit card details.
- Documented Rate Limit: Free (Quota-limited).
- HTTPS & CORS Enabled: Can be queried directly from client browsers or server backends.
Considerations & Limits (Cons)
- External Key Required: Requires creating an account with the provider.
- Rate Limited: Excessive rapid requests may receive HTTP 429 status.
- Third-party SLA: Service uptime depends on the upstream provider.
Frequently Asked Questions (FAQ)
Technical and integration answers for Countries & Cities API.
GitHub README Verified Badge
Embed this live verified badge in your project or repository.
[](https://findfreeapi.com/en/service/countries-cities-api?utm_source=github_badge&utm_medium=readme&utm_campaign=readme_badge)All data feeds, trademarks, and documentation belong directly to the original API provider. FreeAPI serves purely as a discovery index and documentation reference for developers.
Top Alternatives in Maps & Geolocation
Nominatim (OpenStreetMap)
OpenStreetMap geocoding, reverse search, and global location lookup
Google Maps
Industry-standard mapping, place search, directions, and satellite imagery
Mapbox
Customizable vector maps, navigation turn-by-turn, and geocoding SDKs