Open documentation ↗Overview
The GeoDB API focuses on getting global city and region data. Easily obtain country, region, and city data for use in your apps! <ul> <li>Filter cities by name prefix, country, location, time-zone, and even minimum population.</li> <li>Sort cities by name, country code, elevation, and population - or any combination of these.</li> <li>Get all country regions.</li> <li>Get all cities in a given region.</li> <li> Display results in multiple languages.</li> <li>RESTful API adheres to industry best-practices, including HATEOAS-style links to facilitate paging results. </li> <li>Backed by cloud-based load-balanced infrastructure for resiliency and performance!</li> <li>Data is periodically refreshed from GeoNames and WikiData.</li> </ul> <p>Notes: <ul> <li> Since the database is periodically updated, this may <strong>very rarely</strong> result in certain cities being marked deleted (e.g., duplicates removed). By default, endpoints returning city data will exclude cities marked deleted. However, in the unlikely event that this occurs while your app is paging through a set of affected results - and you care about the paged results suddenly changing underneath - specify <tt>includeDeleted=SINCE_YESTERDAY</tt> (or <tt>SINCE_LAST_WEEK</tt> if you're really paranoid!). </li> </ul> <hr/> <h3>Useful Resources</h3> <ul> <li> SDKs <ul> <li> <a href='https://www.npmjs.com/package/wft-geodb-angular-client'>Angular</a>, <a href='https://github.com/wirefreethought/geodb-sample-angular-app'>Sample App</a> </li> <li><a href='https://github.com/wirefreethought/geodb-java-client'>Java</a></li> <li><a href='https://www.npmjs.com/package/wft-geodb-js-client'>JavaScript</a></li> </ul> <li><a href='swagger.json'>Swagger Docs</a></li> <li><a href='http://creativecommons.org/licenses/by/3.0/'>Usage License</a></li> </li> </ul>
GeoDB Cities API is a development API from mashape.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 26 endpoints.
At a glance
- Authentication
- API key
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Development
- Base URL
https://wft-geo-db.p.rapidapi.com/v1- Version
- 1.0.0
- Endpoints
- 26
- OpenAPI
- Specification ↗
- Spec updated
- 2023-03-06
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://wft-geo-db.p.rapidapi.com/v1/geo/adminDivisions" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"const response = await fetch("https://wft-geo-db.p.rapidapi.com/v1/geo/adminDivisions", {
method: "GET",
headers: {
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://wft-geo-db.p.rapidapi.com/v1/geo/adminDivisions",
headers={
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /geo/adminDivisions | Find administrative divisions |
| GET | /geo/adminDivisions/{divisionId} | Get administrative division details |
| GET | /geo/adminDivisions/{divisionId}/nearbyCities | Find cities near division |
| GET | /geo/adminDivisions/{divisionId}/nearbyDivisions | Find divisions near division |
| GET | /geo/cities | Find cities |
| GET | /geo/cities/{cityId} | Get city details |
| GET | /geo/cities/{cityId}/dateTime | Get city date-time |
| GET | /geo/cities/{cityId}/distance | Get city distance |
| GET | /geo/cities/{cityId}/locatedIn | Get city admin region |
| GET | /geo/cities/{cityId}/nearbyCities | Find cities near city |
| GET | /geo/cities/{cityId}/time | Get city time |
| GET | /geo/countries | Find countries |
| GET | /geo/countries/{countryId} | Get country details |
| GET | /geo/countries/{countryId}/regions | Find country regions |
| GET | /geo/countries/{countryId}/regions/{regionCode} | Get region details |
| GET | /geo/countries/{countryId}/regions/{regionCode}/adminDivisions | Find country region administrative divisions |
| GET | /geo/countries/{countryId}/regions/{regionCode}/cities | Find country region cities |
| GET | /geo/locations/{locationId}/nearbyCities | Find cities near location |
| GET | /geo/locations/{locationId}/nearbyDivisions | Find divisions near location |
| GET | /locale/currencies | Find currencies |
| GET | /locale/languages | Get languages |
| GET | /locale/locales | Get locales |
| GET | /locale/timezones | Get time-zones |
| GET | /locale/timezones/{zoneId} | Get time-zone |
| GET | /locale/timezones/{zoneId}/dateTime | Get time-zone date-time |
| GET | /locale/timezones/{zoneId}/time | Get time-zone time |
Questions
Does the GeoDB Cities API API need an API key?
Yes. The GeoDB Cities API API uses API key authentication; the documentation explains how to get credentials.
Does the GeoDB Cities API API support HTTPS?
Yes, the GeoDB Cities API API is served over HTTPS.
How many endpoints does the GeoDB Cities API API have?
Its OpenAPI description lists 26 endpoints in version 1.0.0. All of them are shown on this page.
What are alternatives to the GeoDB Cities API API?
Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.
Similar development APIs
Compare alternatives →Cloudflare
DevelopmentManage DNS, CDN, Workers and other services; documented with an official OpenAPI 3.0 spec
Azure DevOps
DevelopmentThe Azure DevOps basic components of a REST API request/response pair
IPify
DevelopmentA simple IP Address API
App Store Connect API
DevelopmentThe data structure that represents an app store connect api resource.
StackExchange
DevelopmentQ&A forum for developers
IPinfo
DevelopmentAnother simple IP Address API
Listed from APIs.guru (CC0).