A Web Service is a software service used to communicate between two electronic devices over a network.
GeoDataSource Neighboring Countries Web Service is a REST API that enables the user to lookup the associated land border countries which are also known as the neighboring countries based on the input of the country code in ISO3166-2 format. The Web Service will return the result in either the JSON or XML format which contains the information of the neighboring countries code and name that follow the ISO3166 Alpha-2 code and full name standard.
The plan of GeoDataSource Neighboring Countries Web Service comprises different packages which consumes different amount 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.
Package | Price |
Neighboring Countries Web Service (500 credits) | FREE |
Neighboring Countries Web Service (50,000 credits) | $50.00 USD/month |
Neighboring Countries Web Service (250,000 credits) | $125.00 USD/month |
Neighboring Countries Web Service (1,000,000 credits) | $300.00 USD/month |
The benefit of using the Web Service is that no database is required to be downloaded, to be installed or to be upgraded on the server side. It also supports HTTPS queries up to 500 times per month for free. In order to get the neighboring country information, the Web Service can be called by the following syntax.
The syntax for Neighboring Countries API:
GET https://api.geodatasource.com/v2/neighboring-countries
The API accepts the following parameters:
Parameter | Type | Description |
key | string | (required) API key. |
country_code | char | (required) ISO3166 Alpha-2 Country code. |
format | string | (optional) Return the result in json (default) or xml format. Valid values: json | xml |
The API response fields:
Parameter | Type | Description |
country_code | string | Neighboring two-character country code based on ISO-3166. |
country_name | string | Neighboring country name. |
An example response message:
[
{
"country_code":"CA",
"country_name":"Canada"
},
{
"country_code":"MX",
"country_name":"Mexico"
}
]
For more details about the GeoDataSource Neighboring Countries Web Service, please check it out at:
https://www.geodatasource.com/web-service/neighboring-countries