How Can We Help?

Get list of countries

You are here:
← All Topics

Getting a list of all countries is a simple GET request.

api.worldholidayapi.com/v1/country?key=YOUR_API_KEY

This will return an object that will look largely like this:

{
    "requests": {
        "total": 10000,
        "used": 16,
        "remaining": 9984,
        "resets": "2019-11-29T13:02:59"
    },
    "countries": [
        {
            "id": 1,
            "name": "Afghanistan",
            "alpha_2": "AF",
            "alpha_3": "AFG",
            "country_code": 4,
            "iso_3166_2": "ISO 3166-2:AF",
            "region": "Asia",
            "sub_region": "Southern Asia",
            "intermediate_region": "",
            "region_code": "142",
            "sub_region_code": "034",
            "intermediate_region_code": "",
            "flag": "https://www.countryflags.io/AF/flat/64.png",
            "url": "/v1/countries/AF"
        },
        {
            "id": 2,
            "name": "Åland Islands",
            "alpha_2": "AX",
            "alpha_3": "ALA",
            "country_code": 248,
            "iso_3166_2": "ISO 3166-2:AX",
            "region": "Europe",
            "sub_region": "Northern Europe",
            "intermediate_region": "",
            "region_code": "150",
            "sub_region_code": "154",
            "intermediate_region_code": "",
            "flag": "https://www.countryflags.io/AX/flat/64.png",
            "url": "/v1/countries/AX"
        },
...
...
...
...

This request will return ALL countries in the world, including countries for which we don’t yet have holidays (if you can help with those, please contact us)

The id and the url are what you can use to get individual country details.

Read further: get country