What is Location Search Web Service

What is Location Search Web Service in details with sample codes

A Web Service is a software service used to communicate between two electronic devices over a network.

GeoDataSource Location Search Web Service is a REST API that allows the user to lookup for city information by providing the location coordinate in the latitude and longitude form. It will return the result in either JSON or XML format which contains the 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 plan of this Web Service consists of different packages depends on the number of credits. Paid plan of this Web Service will be auto-renewed and auto-recharged monthly. Below are the details of the Web Service package.

Location Search Web Service (500 credits)FREE
Location Search Web Service (10,000 credits)$50.00 USD/month
Location Search Web Service (50,000 credits)$125.00 USD/month
Location Search Web Service (250,000 credits)$300.00 USD/month

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 whereas the Nearest Cities API will return the list of cities within 20km. The benefit of using a Web Service is that no database is required to be downloaded, to be installed or to be upgraded on the server side. In order to get the city information, the Web Service can be called by the following syntax.

The syntax for Nearest City API:

GET https://api.geodatasource.com/v2/city

The syntax for Nearest Cities API:

GET https://api.geodatasource.com/v2/cities

Both API requests accept the following parameters:

keystring(required) API key.
latdouble(required) Latitude of a location.
lngdouble(required) Longitude of a location.
formatstring(optional) Return the result in json (default) or xml format.
Valid values: json | xml

The example of response message:

	"city":"Mountain View",
	"currency_name":"United States Dollar",

For more details about the GeoDataSource Location Search Web Service, please check it out at:

Was this article helpful?

Related Articles