World Information

Documentation and examples for world geography API endpoints

Note: currently only English (en) and Latvian (lv) locales are supported for data localized fields.

Try it Out

Select region

API Documentation

Country Details

/api/v1/world/country/{code}

Get the country details by its 2-letter ISO code.

Method: GETResponse Format: JSONHeaders: Accept-Language
GET https://api.prompt.lv/api/v1/world/country/LV
Accept-Language: en
{
    "success": true,
    "code": 200,
    "result": {
        "code": "LV",
        "currency": "EUR",
        "domain": ".lv",
        "caption": "Latvija",
        "title": "Latvijas Republika",
        "languages": [
            "lv"
        ],
        "phones": [
            {
                "extension": "371",
                "length": 8
            }
        ],
        "regions": [
            {
                "code": "Baltics",
                "caption": "Baltic countries"
            },
            {
                "code": "EEU",
                "caption": "European Economic Area"
            },
            {
                "code": "EU",
                "caption": "Europe Union"
            },
            {
                "code": "Europe",
                "caption": "Europe"
            },
            {
                "code": "Eurozone",
                "caption": "Eurozone"
            },
            {
                "code": "Schengen",
                "caption": "Schengen area"
            }
        ]
    }
}
200Successful request
404Resource not found
422Validation error

Currency Details

/api/v1/world/currency/{code}

Get the currency details by its 3-letter ISO code.

Method: GETResponse Format: JSONHeaders: Accept-Language
GET https://api.prompt.lv/api/v1/world/currency/USD
Accept-Language: en
{
    "success": true,
    "code": 200,
    "result": {
        "code": "USD",
        "caption": "US dollar",
        "countries": [
            "AF",
            "AS",
            "BQ",
            "CW",
            "EC",
            "FM",
            "GU",
            "KM",
            "MH",
            "MP",
            "PR",
            "PW",
            "SV",
            "SX",
            "TC",
            "TL",
            "US",
            "VG",
            "VI"
        ]
    }
}
200Successful request
404Resource not found
422Validation error

Find Countries

/api/v1/world/find/countries/{name}

Get the countries by a phrase (name or code).

Method: GETResponse Format: JSONHeaders: Accept-Language
GET https://api.prompt.lv/api/v1/world/find/countries/Latv
Accept-Language: en
{
    "success": true,
    "code": 200,
    "result": [
        {
            "code": "LV",
            "currency": "EUR",
            "domain": ".lv",
            "caption": "Latvia",
            "title": null,
            "languages": [
                "lv"
            ],
            "phones": [
                {
                    "extension": "371",
                    "length": 8
                }
            ],
            "regions": [
                {
                    "code": "Baltics",
                    "caption": "Baltic countries"
                },
                {
                    "code": "EEU",
                    "caption": "European Economic Area"
                },
                {
                    "code": "EU",
                    "caption": "Europe Union"
                },
                {
                    "code": "Europe",
                    "caption": "Europe"
                },
                {
                    "code": "Eurozone",
                    "caption": "Eurozone"
                },
                {
                    "code": "Schengen",
                    "caption": "Schengen area"
                }
            ]
        }
    ]
}
200Successful request
404Resource not found
422Validation error

Guess Country

/api/v1/world/guess/country/{name}

Get the country details by its name or 2-letter code.

Method: GETResponse Format: JSONHeaders: Accept-Language
GET https://api.prompt.lv/api/v1/world/guess/country/igau
Accept-Language: en
{
    "success": true,
    "code": 200,
    "result": {
        "code": "EE",
        "currency": "EUR",
        "domain": ".ee",
        "caption": "Igaunija",
        "title": "Igaunijas Republika",
        "languages": [
            "et"
        ],
        "phones": [
            {
                "extension": "372",
                "length": 8
            }
        ],
        "regions": [
            {
                "code": "Baltics",
                "caption": "Baltic countries"
            },
            {
                "code": "EEU",
                "caption": "European Economic Area"
            },
            {
                "code": "EU",
                "caption": "Europe Union"
            },
            {
                "code": "Europe",
                "caption": "Europe"
            },
            {
                "code": "Eurozone",
                "caption": "Eurozone"
            },
            {
                "code": "Schengen",
                "caption": "Schengen area"
            }
        ]
    }
}
200Successful request
404Resource not found
422Validation error

Language Details

/api/v1/world/language/{code}

Get the language details by its 2-letter ISO code.

Method: GETResponse Format: JSONHeaders: Accept-Language
GET https://api.prompt.lv/api/v1/world/language/lv
Accept-Language: en
{
    "success": true,
    "code": 200,
    "result": {
        "code": "lv",
        "caption": "Latvian",
        "synonyms": "",
        "countries": [
            "LV"
        ]
    }
}
200Successful request
404Resource not found
422Validation error

Region Details

/api/v1/world/region/{code}

Get the world region details by its code.

Method: GETResponse Format: JSONHeaders: Accept-Language
GET https://api.prompt.lv/api/v1/world/region/eeu
Accept-Language: en
{
    "success": true,
    "code": 200,
    "result": {
        "code": "EEU",
        "caption": "European Economic Area",
        "countries": [
            {
                "code": "AT",
                "caption": "Austria"
            },
            {
                "code": "BE",
                "caption": "Belgium"
            },
            {
                "code": "BG",
                "caption": "Bulgaria"
            },
            {
                "code": "CY",
                "caption": "Cyprus"
            },
            {
                "code": "CZ",
                "caption": "Czechia"
            },
            {
                "code": "DE",
                "caption": "Germany"
            },
            {
                "code": "DK",
                "caption": "Denmark"
            },
            {
                "code": "EE",
                "caption": "Estonia"
            },
            {
                "code": "ES",
                "caption": "Spain"
            },
            {
                "code": "FI",
                "caption": "Finland"
            },
            {
                "code": "FR",
                "caption": "France"
            },
            {
                "code": "GR",
                "caption": "Greece"
            },
            {
                "code": "HR",
                "caption": "Croatia"
            },
            {
                "code": "HU",
                "caption": "Hungary"
            },
            {
                "code": "IE",
                "caption": "Ireland"
            },
            {
                "code": "IS",
                "caption": "Iceland"
            },
            {
                "code": "IT",
                "caption": "Italy"
            },
            {
                "code": "LI",
                "caption": "Liechtenstein"
            },
            {
                "code": "LT",
                "caption": "Lithuania"
            },
            {
                "code": "LU",
                "caption": "Luxembourg"
            },
            {
                "code": "LV",
                "caption": "Latvia"
            },
            {
                "code": "MT",
                "caption": "Malta"
            },
            {
                "code": "NL",
                "caption": "Netherlands"
            },
            {
                "code": "NO",
                "caption": "Norway"
            },
            {
                "code": "PL",
                "caption": "Poland"
            },
            {
                "code": "PT",
                "caption": "Portugal"
            },
            {
                "code": "RO",
                "caption": "Romania"
            },
            {
                "code": "SE",
                "caption": "Sweden"
            },
            {
                "code": "SI",
                "caption": "Slovenia"
            },
            {
                "code": "SK",
                "caption": "Slovakia"
            }
        ]
    }
}
200Successful request
404Resource not found
422Validation error

List Regions

/api/v1/world/regions

List all public regions of the world.

Method: GETResponse Format: JSONHeaders: Accept-Language
GET https://api.prompt.lv/api/v1/world/regions
Accept-Language: en
{
    "success": true,
    "code": 200,
    "result": [
        {
            "code": "Africa",
            "caption": "Africa"
        },
        {
            "code": "Antarctica",
            "caption": "Antarctica"
        },
        {
            "code": "Asia",
            "caption": "Asia"
        },
        {
            "code": "Baltics",
            "caption": "Baltic countries"
        },
        {
            "code": "EEU",
            "caption": "European Economic Area"
        },
        {
            "code": "EFTA",
            "caption": "European Free Trade Association"
        },
        {
            "code": "EU",
            "caption": "Europe Union"
        },
        {
            "code": "Europe",
            "caption": "Europe"
        },
        {
            "code": "Eurozone",
            "caption": "Eurozone"
        },
        {
            "code": "North America",
            "caption": "North America"
        },
        {
            "code": "Oceania",
            "caption": "Australia and Oceania"
        },
        {
            "code": "Scandinavia",
            "caption": "Scandinavia"
        },
        {
            "code": "Schengen",
            "caption": "Schengen area"
        },
        {
            "code": "South America",
            "caption": "South America"
        }
    ]
}
200Successful request
404Resource not found
422Validation error