Menu

GeoDB City API - Find Cities For Your Criteria | Wirefree Thought

header photo

Comments

There are currently no blog comments.

Merry Christmas & Happy Hanukkah: Time-Zones Are Here!

All cities now include time-zone data. The following functionality is now available:

Get Available Time-Zones

Gets all available time-zones in the system. You should use these time-zone IDs as input to the other methods below, as GeoDB has its own way of encoding the '/' separator.

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/locale/timezones?offset=0&limit=500' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Find Cities by Time-Zones

Finds all cities in the given comma-delimited set of time-zones.

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/geo/cities?timeZoneIds={commaDelimitedZoneIds}&offset=0&limit=10' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Get City Date-Time

Returns the given city's date-time in ISO-8601 format, taking into account daylight savings.

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/geo/cities/{cityId}/dateTime' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Get City Time

Returns the given city's time in ISO-8601 format, taking into account daylight savings.

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/geo/cities/{cityId}/time' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Get Time-Zone Date-Time

Returns the given time-zone's date-time in ISO-8601 format, taking into account daylight savings.

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/locale/timezones/{zoneId}/dateTime' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Get Time-Zone Time

Returns the given time-zone's time in ISO-8601 format, taking into account daylight savings.

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/locale/timezones/{zoneId}/time' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Go Back

Comment