GET/v1/flights/airports
Rechercher des aéroports
Searches airport metadata by free text or nearby coordinates for autocomplete and location-based flight search flows.
Searches airport metadata by free text or nearby coordinates for autocomplete and location-based flight search flows.
Endpoint
| Method | Path | Auth |
|---|---|---|
GET | /v1/flights/airports | Required API key |
| Header | Description |
|---|---|
Authorization | Bearer <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-Type | Use application/json for requests with a body. |
Request Params Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
lat | number | No | Required when queryString is not provided | |
lng | number | No | Required when queryString is not provided | |
radius | number | No | Required when queryString is not provided | |
queryString | string | No | Alternative to coordinates |
Success Response
Returns matching airports and location metadata.
Response Body Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
array | Yes | - | ||
name | string | Yes | - | |
city_name | string | Yes | - | |
time_zone | string | Yes | - | |
longitude | number | Yes | - | |
latitude | number | Yes | - | |
iata_country_code | string | Yes | - | |
iata_code | string | Yes | - | |
iata_city_code | string | Yes | - | |
type | string | Yes | - | |
airportName | string | Yes | - | |
distanceFromPoint | number | No | - | |
Operational Notes
queryString can be used for text search. When using geographic search, send lat, lng and optional radius; radius defaults to 30 kilometers.
Example
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"