GET/v1/flights/airports

Buscar aeropuertos

Busca metadata de aeropuertos por texto libre o coordenadas cercanas para autocompletados y flujos de búsqueda por ubicación.

Busca metadata de aeropuertos por texto libre o coordenadas cercanas para autocompletados y flujos de búsqueda por ubicación.

Endpoint

MétodoRutaAuth
GET/v1/flights/airportsAPI key requerida
Headers obligatorios:
HeaderDescripción
AuthorizationBearer <secret_key>. The secret is shown only once when the credential is created.
X-Travelandz-Id<public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential.
Content-TypeUse application/json for requests with a body.

Esquema de parámetros de la petición

PropiedadTipoDetallesRequeridoNotas
latnumberNoRequired when queryString is not provided
lngnumberNoRequired when queryString is not provided
radiusnumberNoRequired when queryString is not provided
queryStringstringNoAlternative to coordinates

Respuesta exitosa

Devuelve matching airports and location metadata.

Esquema del cuerpo de la respuesta

PropiedadTipoDetallesRequeridoNotas
array-
namestring-
city_namestring-
time_zonestring-
longitudenumber-
latitudenumber-
iata_country_codestring-
iata_codestring-
iata_city_codestring-
typestring-
airportNamestring-
distanceFromPointnumberNo-

Notas operativas

queryString can be used for text search. When using geographic search, send lat, lng and optional radius; radius defaults to 30 kilometers.

Ejemplo

bash
bash
curl "https://api.sandbox.travelandz.com/v1/flights/airports?queryString=Madrid" \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"