/v1/country
All locations in a country
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/locode-api/v1/country" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/locode-api/v1/country", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/locode-api/v1/country");
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/locode-api/v1/country",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"data": {
"count": 50,
"limit": 50,
"total": 10025,
"offset": 0,
"country": "DE",
"results": [
{
"code": "DE222",
"name": "Brandscheid/Westerwald",
"country": "DE",
"latitude": 50.567,
"functions": [
"Road terminal"
],
"longitude": 7.917
},
{
"code": "DE223",
"name": "Brandshagen",
"country": "DE",
"latitude": 54.25,
"functions": [
"Road terminal"
],
"longitude": 13.183
},
{
"code": "DE225",
"name": "Braschwitz",
"country": "DE",
"latitude": 51.517,
"functions": [
"Road terminal"
],
"longitude": 12.067
},
{
"code": "DE226",
"name": "Bräsen",
"country": "DE",
"latitude": 51.967,
"functions": [
"Road terminal"
],
"longitude": 12.383
},
{
"code": "DE229",
"name": "Braunfels",
"country": "DE",
"latitude": 50.517,
"functions": [
"Road terminal"
],
"longitude": 8.4
},
{
"code": "DE22B",
"name": "Böllen",
"country": "DE",
"latitude": 47.8,
"functions": [
"Road terminal"
],
"longitude": 7.85
},
{
"code": "DE22E",
"name": "Eicklingen",
"country": "DE",
"latitude": 52.55,
"functions": [
"Road terminal"
],
"longitude": 10.183
},
{
"code": "DE232",
"name": "Braunichswalde",
"country": "DE",
"latitude": 50.8,
"functions": [
"Road terminal"
],
"longitude": 12.217
},
{
"code": "DE233",
"name": "Braunlage",
"country": "DE",
"latitude": 51.733,
"functions": [
"Road terminal"
],
"longitude": 10.617
},
{
"code": "DE234",
"name": "Bräunrode",
"country": "DE",
"latitude": 51.633,
"functions": [
"Road terminal"
]
…