Countries sharing a land border

Returns the countries sharing a land border with the given country.

Request

GEThttps://countries-info.p.apihiver.com/v1/countries/IN/neighbours
*
String. ISO alpha-2 (IN) or alpha-3 (IND) country code.
Language
Client
1curl --request GET \
2  --url https://countries-info.p.apihiver.com/v1/countries/IN/neighbours \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

Countries sharing a land border: Countries Info API reference

Returns the countries sharing a land border with the given country. This endpoint is part of the Countries Info API: Every country's capital, population, area, currency, calling code, languages, continent and neighbours — by code, name or currency.

Example response (200, application/json)

Success.

1{
2  "country": "India",
3  "neighbours": [
4    {
5      "code": "BD",
6      "name": "Bangladesh",
7      "capital": "Dhaka"
8    },
9    {
10      "code": "BT",
11      "name": "Bhutan",
12      "capital": "Thimphu"
13    },
14    {
15      "code": "CN",
16      "name": "China",
17      "capital": "Beijing"
18    }
19  ]
20}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "A parameter has the wrong format — the message names it."
    5  }
    6}
  • 404 — Nothing matches the value you sent.
    1{
    2  "error": {
    3    "code": "NOT_FOUND",
    4    "message": "No country with code ZZ."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.