Get a random country

Returns a single, randomly selected country. A different country is returned on every request.

GET
/random

Returns a single, randomly selected country. A different country is returned on every request.

Response Body

application/json

curl -X GET "https://example.com/random"
{  "name": "Israel",  "topLevelDomain": [    ".il"  ],  "alpha2Code": "IL",  "alpha3Code": "ISR",  "callingCodes": [    "972"  ],  "capital": "Jerusalem",  "altSpellings": [    "string"  ],  "subregion": "Western Asia",  "region": "Asia",  "population": 9216900,  "latlng": [    31.5,    34.75  ],  "demonym": "Israeli",  "area": 20770,  "timezones": [    "UTC+02:00"  ],  "borders": [    "EGY",    "JOR",    "LBN",    "SYR"  ],  "nativeName": "ישראל",  "numericCode": "376",  "flags": {    "svg": "http://example.com",    "png": "http://example.com"  },  "currencies": [    {      "code": "ILS",      "name": "Israeli new shekel",      "symbol": "₪"    }  ],  "languages": [    {      "iso639_1": "he",      "iso639_2": "heb",      "name": "Hebrew",      "nativeName": "עברית"    }  ],  "flag": "🇮🇱",  "maps": {    "googleMaps": "http://example.com",    "openStreetMaps": "http://example.com"  },  "populationDensity": 443.6}