Data
Bordering countries (expanded) API
Expand a country's land borders into a ranked list of neighbor countries with name, ISO codes, capital, population, region, and great-circle distance between capitals (sorted nearest-first). Answers 'which countries border X', 'how many neighbors does X have', 'nearest neighboring capital'.
Price$0.01per request
MethodPOST
Route/v1/data/places-country-neighbors
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache86400s public
dataplacescountrybordersneighborsgeographyrest-countries
API URL
Integration docshttps://x402.hexl.dev/v1/data/places-country-neighborsExample request
{
"country": "france"
}Example response
{
"country": "France",
"code": "FR",
"region": "Europe",
"subregion": "Western Europe",
"hasLandBorders": true,
"neighborCount": 8,
"borders": [
"AND",
"BEL",
"DEU",
"ITA",
"LUX",
"MCO",
"ESP",
"CHE"
],
"neighbors": [
{
"name": "Andorra",
"code": "AD",
"code3": "AND",
"capital": "Andorra la Vella",
"population": 88406,
"region": "Europe",
"capitalDistanceKm": 391
},
{
"name": "Switzerland",
"code": "CH",
"code3": "CHE",
"capital": "Bern",
"population": 9082848,
"region": "Europe",
"capitalDistanceKm": 472
},
{
"name": "Monaco",
"code": "MC",
"code3": "MCO",
"capital": "Monaco",
"population": 38423,
"region": "Europe",
"capitalDistanceKm": 494
},
{
"name": "Luxembourg",
"code": "LU",
"code3": "LUX",
"capital": "Luxembourg",
"population": 681973,
"region": "Europe",
"capitalDistanceKm": 520
},
{
"name": "Belgium",
"code": "BE",
"code3": "BEL",
"capital": "Brussels",
"population": 11825551,
"region": "Europe",
"capitalDistanceKm": 557
},
{
"name": "Germany",
"code": "DE",
"code3": "DEU",
"capital": "Berlin",
"population": 83491249,
"region": "Europe",
"capitalDistanceKm": 758
},
{
"name": "Spain",
"code": "ES",
"code3": "ESP",
"capital": "Madrid",
"population": 49315949,
"region": "Europe",
"capitalDistanceKm": 826
},
{
"name": "Italy",
"code": "IT",
"code3": "ITA",
"capital": "Rome",
"population": 58927633,
"region": "Europe",
"capitalDistanceKm": 929
}
]
}Input schema
{
"type": "object",
"required": [
"country"
],
"properties": {
"country": {
"type": "string"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}