GeoDataSource Location Search Web Service is a REST API enable user to lookup for nearest country, region, city, latitude, longitude, currency code, currency name, currency symbol, time of sunrise, time of sunset, time zone and distance of input coordinate with the city.

API Architecture
REST
Pricing model
Free
Protocol
HTTP, HTTPS
Response format
JSON, XML
Security scheme
API key
Service
General

GeoDataSource logo

GeoDataSource Location Search Web Service is a REST API enable user to lookup for city name by using latitude and longitude coordinate. It will return the location information of the nearest country, region, city, latitude, longitude, currency code, currency name, currency symbol, time of sunrise, time of sunset, time zone and distance of input coordinate with the city. The GeoDataSource Location Search Web Service consists of two APIs, Nearest City API and Nearest Cities API. Nearest City API will only return one result whareas the Nearest Cities API will return the list of cities within 20km.

Features

  • No database to download, to install or to upgrade in the server side
  • Support HTTP or HTTPS queries up to 500 times per month absolutely FREE!

Response

ParameterTypeDescription
countrystringTwo-character country code based on ISO 3166.
regionstringRegion or state name.
citystringCity name.
latitudedoubleLatitude of a location.
longitudedoubleLongitude of a location.
currency_codestringCurrency code based on ISO 4217.
currency_namestringCurrency name.
currency_symbolstringCurrency symbol.
sunrisestringTime of sunrise. (hh:mm format in local time, i.e, 07:47).
sunsetstringTime of sunset. (hh:mm format in local time, i.e 19:50).
time_zonestringUTC time zone (with DST supported).
distance_kmstringDistance between the input coordinate and city coordinate in kilometers (km).

 

Example of response message


{
"country":"US",
"region":"California",
"city":"Mountain View",
"latitude":"37.3861",
"longitude":"-122.084",
"currency_code":"USD",
"currency_name":"United States Dollar",
"currency_symbol":"$",
"sunrise":"06:21",
"sunset":"19:51",
"time_zone":"-08:00",
"distance_km":"0.0001"
}

Please visit GeoDataSource.com for further information!

Updated on Apr 30, 2020
Claim this API or report abuse