/borders/[name]

This endpoint provides a list of countries that share a border with the specified country, including detailed information such as names, codes, capital cities, population, regions, languages, currencies, flags, and more.

Usage - Searching for countries bordering Israel

GET

/borders/Israel

curl -X GET "https://www.apicountries.com/borders/Israel"

This endpoint returns a list of countries.

Response

[
    {
    "name": "Egypt",
    "topLevelDomain": [
        ".eg"
    ],
    "alpha2Code": "EG",
    "alpha3Code": "EGY",
    "callingCodes": [
        "20"
    ],
    "capital": "Cairo",
    "altSpellings": [
        "EG",
        "Arab Republic of Egypt"
    ],
    "subregion": "Northern Africa",
    "region": "Africa",
    "population": 102334403,
    "latlng": [
        27,
        30
    ],
    "demonym": "Egyptian",
    "area": 1002450,
    "gini": 31.5,
    "timezones": [
        "UTC+02:00"
    ],
    "borders": [
        "ISR",
        "LBY",
        "SDN"
    ],
    "nativeName": "مصر‎",
    "numericCode": "818",
    "flags": {
        "svg": "https://flagcdn.com/eg.svg",
        "png": "https://flagcdn.com/w320/eg.png"
    },
    "currencies": [
        {
            "code": "EGP",
            "name": "Egyptian pound",
            "symbol": "£"
        }
    ],
    "languages": [
        {
            "iso639_1": "ar",
            "iso639_2": "ara",
            "name": "Arabic",
            "nativeName": "العربية"
        }
    ],
    "translations": {
        "br": "Egipt",
        "pt": "Egipto",
        "nl": "Egypte",
        "hr": "Egipat",
        "fa": "مصر",
        "de": "Ägypten",
        "es": "Egipto",
        "fr": "Égypte",
        "ja": "エジプト",
        "it": "Egitto",
        "hu": "Egyiptom"
    },
    "flag": "https://flagcdn.com/eg.svg",
    "regionalBlocs": [
        {
            "acronym": "AU",
            "name": "African Union",
            "otherNames": [
                "الاتحاد الأفريقي",
                "Union africaine",
                "União Africana",
                "Unión Africana",
                "Umoja wa Afrika"
            ]
        },
        {
            "acronym": "AL",
            "name": "Arab League",
            "otherNames": [
                "جامعة الدول العربية",
                "Jāmiʻat ad-Duwal al-ʻArabīyah",
                "League of Arab States"
            ]
        }
    ],
    "cioc": "EGY",
    "independent": true
}
    ...
]

Types

/**
 * Information about a country.
 */
export interface Country {
  /**
   * Name of the country.
   */
  name: string;
  /**
   * Top level domain(s) of the country.
   */
  topLevelDomain: string[];
  /**
   * Alpha-2 code of the country.
   */
  alpha2Code: string;
  /**
   * Alpha-3 code of the country.
   */
  alpha3Code: string;
  /**
   * Calling code(s) of the country.
   */
  callingCodes: string[];
  /**
   * Capital city of the country.
   */
  capital: string;
  /**
   * Alternative spellings of the country name.
   */
  altSpellings: string[];
  /**
   * Subregion of the country.
   */
  subregion: string;
  /**
   * Region of the country.
   */
  region: string;
  /**
   * Population of the country.
   */
  population: number;
  /**
   * Latitude and longitude of the country.
   */
  latlng: number[];
  /**
   * Demonym for the country's people.
   */
  demonym: string;
  /**
   * Area of the country in square kilometers.
   */
  area: number;
  /**
   * Timezone(s) of the country.
   */
  timezones: string[];
  /**
   * Bordering countries.
   */
  borders: string[];
  /**
   * Native name of the country.
   */
  nativeName: string;
  /**
   * Numeric code of the country.
   */
  numericCode: string;
  /**
   * Flags of the country.
   */
  flags: {
    /**
     * SVG format flag URL.
     */
    svg: string;
    /**
     * PNG format flag URL.
     */
    png: string;
  };
  /**
   * Currencies used in the country.
   */
  currencies: {
    /**
     * Currency code.
     */
    code: string;
    /**
     * Currency name.
     */
    name: string;
    /**
     * Currency symbol.
     */
    symbol: string;
  }[];
  /**
   * Languages spoken in the country.
   */
  languages: {
    /**
     * ISO 639-1 language code.
     */
    iso639_1: string;
    /**
     * ISO 639-2 language code.
     */
    iso639_2: string;
    /**
     * Language name.
     */
    name: string;
    /**
     * Native name of the language.
     */
    nativeName: string;
  }[];
  /**
   * Translations of the country name.
   */
  translations: {
    [key: string]: string;
  };
  /**
   * URL of the country's flag.
   */
  flag: string;
  /**
   * Regional blocs the country is part of.
   */
  regionalBlocs: {
    /**
     * Acronym of the regional bloc.
     */
    acronym: string;
    /**
     * Name of the regional bloc.
     */
    name: string;
  }[];
  /**
   * Country code for the International Olympic Committee.
   */
  cioc: string;
  /**
   * Whether the country is independent.
   */
  independent: boolean;
}

Status Code

Status codeDescription
200Success
400Bad request
404Not found
429Rate limit exceeded

On this page

Star us on Github