Location and Time
A comprehensive geo location and time API covering city & country lookup, IP geolocation, timezone resolution, local time and time difference calculation, distance between coordinates, geohash encoding/decoding, public holidays, and sunrise/sunset times. All in one simple, fast REST API.
Location and Time endpoints
| Method | Endpoint | Description |
|---|---|---|
| Location | ||
| GET |
Search Country by Name /country |
Get details of the country specified by name, fuzzy search is supported. Up to 10 records for countries with similar name may be returned. Information includes country name,… |
| GET |
Search City by Name /city/byname |
Get details of the city specified by name, fuzzy search is supported. Up to 10 records for cities with similar name may be returned. Information includes city name, alternative… |
| GET |
Search City by Location /city/bylocation |
Get details of the city near specified geolocation (latitude/longitude). Up to 10 records for cities close to the specified location may be returned. Information includes city… |
| GET |
Encode Geohash /geohash/encode |
Encode a geolocation into [geohash](https://en.wikipedia.org/wiki/Geohash) string which can then used for applications such as proximity search. |
| GET |
Decode Geohash /geohash/decode |
Decode a [geohash](https://en.wikipedia.org/wiki/Geohash) string into a geolocation with a bounding box. |
| GET |
Calculate Distance Between Locations /distance/bylocation |
Calculate distance between two geolocations. We return the [Geodesic distance](https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid) and [Great-circle… |
| GET |
Get Geolocation by IP /geoip |
Get geographic location information about the specific IP address. Information includes the city, country, continent, geolocation with accuracy, postal code, and more. |
| Time | ||
| GET |
Get Supported Timezones /timezone |
Get all supported timezones. |
| GET |
Get Date and Time by Timezone /datetime/bytimezone |
Get date and time for specified timezone. |
| GET |
Get Date and Time by Location /datetime/bylocation |
Get date and time for specified location. |
| GET |
Get Time at Other Timezone /timeat/bytimezone |
Find out time at `to_timezone` for given `from_time` and `from_timezone`. Daylight saving time are taken care of. |
| GET |
Get Time at Other Location /timeat/bylocation |
Find out time at `[to_lat, to_lon]` given `from_time` and `[from_lat, from_lon]`. Daylight saving time are taken care of. |
| GET |
Get Time Diff by Timezone /timediff/bytimezone |
Find out time difference from `from_time` to `to_time` for specified timezone. Daylight saving time are taken care of. |
| GET |
Get Time Diff by Location /timediff/bylocation |
Find out time difference from `from_time` to `to_time` for specified location. Daylight saving time are taken care of. |
| GET |
Get Astral Data by Location /astral/bylocation |
Get times of various aspects of the sun for specified date and location, including dawn, sunrise, noon, sunset, dusk times. |
| GET |
Get Holidays /holiday |
List holidays for the specified country and year. |
Location and Time pricing
| Plan | Price | Rate limit | Quotas |
|---|---|---|---|
| BASIC | Free | 1 / second |
|
| PRO | $1.99 / month | 10 / second |
|
| ULTRA Recommended | $9.99 / month | — |
|
| MEGA | $29.99 / month | — |
|