Mashape

GeoDB Cities API

The GeoDB API focuses on getting global city and region data. Easily obtain country, region, and city data for use in your apps! Filter cities by name prefix,…

Maps & location#openapi#developer-tools#location

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

The GeoDB API focuses on getting global city and region data. Easily obtain country, region, and city data for use
in your apps!

Filter cities by name prefix, country, location, time-zone, and even minimum population.
Sort cities by name, country code, elevation, and population - or any combination of these.
Get all country regions. Get all cities in a given region.

Display results in multiple languages. RESTful API adheres to industry best-practices, including
HATEOAS-style links to facilitate paging results.

Backed by cloud-based load-balanced infrastructure for resiliency and performance!
Data is periodically refreshed from GeoNames and WikiData.

Notes:

Since the database is periodically updated, this may very rarely 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
includeDeleted=SINCE_YESTERDAY (or SINCE_LAST_WEEK if you're really paranoid!).

Useful Resources

SDKs

Angular ,
Sample App

Java
JavaScript

Swagger Docs
Usage License

Endpoints 26

Geo

  • GETFind administrative divisions/geo/adminDivisions?location=string&radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEFind administrative divisions, filtering by optional criteria. If no criteria are set, you will get back all known divisions.
  • GETGet administrative division details/geo/adminDivisions/:divisionId?asciiMode=false&languageCode=stringGet the details for a specific administrative division, including location coordinates, population, and elevation above sea-level (if available).
  • GETFind cities near division/geo/adminDivisions/:divisionId/nearbyCities?radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&types=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEFind cities near the given administrative division, filtering by optional criteria. If no criteria are set, you will get back all known cities.
  • GETFind divisions near division/geo/adminDivisions/:divisionId/nearbyDivisions?radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEFind administrative divisions near the given origin division, filtering by optional criteria. If no criteria are set, you will get back all known divisions.
  • GETFind cities/geo/cities?location=string&radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&types=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEFind cities, filtering by optional criteria. If no criteria are set, you will get back all known cities.
  • GETGet city details/geo/cities/:cityId?asciiMode=false&languageCode=stringGet the details for a specific city, including location coordinates, population, and elevation above sea-level (if available).
  • GETGet city date-time/geo/cities/:cityId/dateTimeGet city date-time
  • GETGet city distance/geo/cities/:cityId/distance?toCityId=string&distanceUnit=MIGet distance from the given city
  • GETGet city admin region/geo/cities/:cityId/locatedIn?asciiMode=false&languageCode=stringGet the details for the containing populated place (e.g., its county or other administrative division), including location coordinates, population, and…
  • GETFind cities near city/geo/cities/:cityId/nearbyCities?radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&types=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEFind cities near the given origin city, filtering by optional criteria. If no criteria are set, you will get back all known cities.
  • GETGet city time/geo/cities/:cityId/timeGet city time
  • GETFind countries/geo/countries?currencyCode=string&namePrefix=string&namePrefixDefaultLangResults=true&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=stringFind countries, filtering by optional criteria. If no criteria are set, you will get back all known countries.
  • GETGet country details/geo/countries/:countryId?asciiMode=false&languageCode=stringGet the details for a specific country, including number of regions.
  • GETFind country regions/geo/countries/:countryId/regions?namePrefix=string&namePrefixDefaultLangResults=true&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=stringGet all regions in a specific country. These could be states, provinces, districts, or otherwise major political divisions.
  • GETGet region details/geo/countries/:countryId/regions/:regionCode?asciiMode=false&languageCode=stringGet the details of a specific country region, including number of cities.
  • GETFind country region administrative divisions/geo/countries/:countryId/regions/:regionCode/adminDivisions?minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEGet the administrative divisions in a specific country region. The country and region info is omitted in the response.
  • GETFind country region cities/geo/countries/:countryId/regions/:regionCode/cities?minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&types=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEGet the cities in a specific country region. The country and region info is omitted in the response.
  • GETFind cities near location/geo/locations/:locationId/nearbyCities?radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&types=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEFind cities near the given location, filtering by optional criteria. If no criteria are set, you will get back all known cities.
  • GETFind divisions near location/geo/locations/:locationId/nearbyDivisions?radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONEFind administrative divisions near the given location, filtering by optional criteria. If no criteria are set, you will get back all known divisions.

Locale

  • GETFind currencies/locale/currencies?countryId=string&hateoasMode=true&limit=10&offset=0Find currencies, filtering by optional criteria. If no criteria are set, you will get back all known currencies.
  • GETGet languages/locale/languages?hateoasMode=true&limit=10&offset=0Get all supported languages
  • GETGet locales/locale/locales?hateoasMode=true&limit=10&offset=0Get all known locales
  • GETGet time-zones/locale/timezones?hateoasMode=true&limit=10&offset=0Get all known time-zones
  • GETGet time-zone/locale/timezones/:zoneIdGet time-zone
  • GETGet time-zone date-time/locale/timezones/:zoneId/dateTimeGet time-zone date-time
  • GETGet time-zone time/locale/timezones/:zoneId/timeGet time-zone time

API details

Base URL
https://wft-geo-db.p.rapidapi.com/v1
Authentication
An API key in the x-rapidapi-key header
Operations
26 operations on 26 pathsGET 26
Main resources
Geo 19Locale 7
Response formats
application/json
Description format
Swagger 2.0, API version 1.0.0
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the GeoDB Cities API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the GeoDB Cities API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the x-rapidapi-key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Find administrative divisions” (GET /geo/adminDivisions?location=string&radius=0&distanceUnit=MI&countryIds=string&excludedCountryIds=string&minPopulation=0&maxPopulation=0&namePrefix=string&namePrefixDefaultLangResults=true&timeZoneIds=string&asciiMode=false&hateoasMode=true&languageCode=string&limit=10&offset=0&sort=string&includeDeleted=NONE), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the GeoDB Cities API?

The GeoDB API focuses on getting global city and region data. Easily obtain country, region, and city data for use in your apps! Filter cities by name prefix,… It is listed under Maps & location and has 26 endpoints.

Who publishes the GeoDB Cities API?

It is listed from Mashape's public API description (an OpenAPI document), not published by Mashape on Swastik Codes. Anyone who controls mashape.com can claim the profile by adding a DNS TXT record.

What is the base URL of the GeoDB Cities API?

Requests go to https://wft-geo-db.p.rapidapi.com/v1. Endpoint paths are added to this base URL.

How do I authenticate with the GeoDB Cities API?

With an API key in the x-rapidapi-key header.

How many endpoints does the GeoDB Cities API have?

26 operations on 26 paths (26 GET). The largest groups are Geo, Locale.

Is forking the GeoDB Cities API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.