Overview

GeoDB Cities provides detailed data on cities, regions, and countries worldwide, including population figures, time zones, and geographic coordinates. It supports filtering, sorting, and pagination, making it well-suited for building location pickers or geographic dashboards. You need a free RapidAPI key to access it.

Beginner Tip

Start by querying the /cities endpoint with a namePrefix filter to build a city search autocomplete — this is the most common use case and easy to implement.

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

IP address details
latitude and longitude
city and country
timezone
ISP information
country name and code

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "name": "Japan",
  "capital": "Tokyo",
  "population": 125800000,
  "region": "Asia",
  "languages": [
    "Japanese"
  ],
  "flag": "https://flagcdn.com/jp.svg",
  "currencies": [
    {
      "code": "JPY",
      "name": "Japanese yen"
    }
  ]
}

Field Reference

data List of city objects matching the query.
data[].name Official name of the city.
data[].country Full country name where the city is located.
data[].population Estimated population of the city.
data[].latitude Geographic latitude of the city center.
data[].longitude Geographic longitude of the city center.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://wft-geo-db.p.rapidapi.com/v1/geo/cities?namePrefix=Paris&limit=5";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

403 Forbidden Missing or invalid RapidAPI key in the request headers.
Subscribe to the GeoDB Cities API on RapidAPI and include the X-RapidAPI-Key header with your key.
429 Too Many Requests The free tier has a low rate limit (typically 1 request/second).
Add a delay between requests or upgrade to a paid plan for higher throughput.
Empty data array The namePrefix or filter criteria did not match any city.
Double-check the spelling and try a shorter prefix; the search is case-sensitive in some configurations.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Geocoding
Difficulty Intermediate
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →