/v1/countries
List / filter countries
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
curl "https://api.oanor.com/worldbank-api/v1/countries" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/worldbank-api/v1/countries", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/worldbank-api/v1/countries");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/worldbank-api/v1/countries",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"data": {
"total": 296,
"returned": 58,
"countries": [
{
"id": "ALB",
"iso2": "AL",
"name": "Albania",
"region": "Europe & Central Asia",
"capital": "Tirane",
"latitude": 41.3317,
"longitude": 19.8172,
"income_level": "Upper middle income",
"lending_type": "IBRD"
},
{
"id": "AND",
"iso2": "AD",
"name": "Andorra",
"region": "Europe & Central Asia",
"capital": "Andorra la Vella",
"latitude": 42.5075,
"longitude": 1.5218,
"income_level": "High income",
"lending_type": "Not classified"
},
{
"id": "ARM",
"iso2": "AM",
"name": "Armenia",
"region": "Europe & Central Asia",
"capital": "Yerevan",
"latitude": 40.1596,
"longitude": 44.509,
"income_level": "Upper middle income",
"lending_type": "IBRD"
},
{
"id": "AUT",
"iso2": "AT",
"name": "Austria",
"region": "Europe & Central Asia",
"capital": "Vienna",
"latitude": 48.2201,
"longitude": 16.3798,
"income_level": "High income",
"lending_type": "Not classified"
},
{
"id": "AZE",
"iso2": "AZ",
"name": "Azerbaijan",
"region": "Europe & Central Asia",
"capital": "Baku",
"latitude": 40.3834,
"longitude": 49.8932,
"income_level": "Upper middle income",
"lending_type": "IBRD"
},
{
"id": "BEL",
"iso2": "BE",
"name": "Belgium",
"region": "Europe & Central Asia",
"capital": "Brussels",
"latitude": 50.8371,
"longitude": 4.36761,
"income_level": "High income",
"lending_type": "Not classified"
},
{
"id": "BGR",
"iso2": "BG",
"name": "Bulgaria",
"region": "Europe & Central Asia",
"capital": "Sofia",
"latitude": 42.7105,
"longitude": 23.3238,
"income_level": "High income",
"lending_type": "IBRD"
},
{
"id": "BIH",
"iso2": "BA",
"name": "Bosnia and Herzegovina",
"region": "Europe & Central Asia",
"capital": "Sarajevo",
"latitude": 43.8
…