API console
Try it
Send a real request to the sandbox API and inspect the response.
Credentials
Log in to pick from your saved API keys instead of pasting them.
Query parameters
4 fieldsSearch text
Free-text query to match against airport names, cities, or IATA codes.
Latitude
Latitude of the center point for a radius-based airport search.
Longitude
Longitude of the center point for a radius-based airport search.
Radius (km)
Search radius in kilometers around the provided coordinates.
cURL request
curl -X GET 'https://api.sandbox.travelandz.com/v1/flights/airports?queryString=Madrid' \
-H 'Authorization: Bearer YOUR_SECRET_KEY' \
-H 'X-Travelandz-Id: YOUR_PUBLIC_KEY:YOUR_PROFILE_CODE'Add your credentials to send a request.
Response
Click "Try it!" to send a request and see the response here.
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
latqueryString is not providedlngqueryString is not providedradiusqueryString is not providedqueryStringRequest Body
No request body is required.
Success Response
Returns matching airports and location metadata.
Response Body Schema
airportsairports[]nameairports[]city_nameairports[]time_zoneairports[]longitudeairports[]latitudeairports[]iata_country_codeairports[]iata_codeairports[]iata_city_codeairports[]typeairports[]airportNameairports[]distanceFromPointliveModeOperational Notes
queryString can be used for text search. When using geographic search, send lat, lng and optional radius; radius defaults to 30 kilometers.
Query examples
Text search: ?queryString=Barcelona
Coordinate search: ?lng=2.080877&lat=41.297273&radius=50
Example
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"Responses
| Code | Description |
|---|---|
200 | Airports retrieved successfully. |
400 | Bad request – invalid payload. |
401 | Unauthorized – invalid or missing credentials. |
403 | Forbidden – invalid credentials. |
500 | Internal server error |
200 Response Body
Media type: application/json
{
"airports": [
{
"name": "Barcelona",
"city_name": "Barcelona",
"time_zone": "Europe/Madrid",
"longitude": 2.080877,
"latitude": 41.297273,
"iata_country_code": "ES",
"iata_code": "BCN",
"iata_city_code": "BCN",
"type": "airport",
"airportName": "Barcelona-El Prat Josep Tarradellas Airport"
},
{
"name": "Barcelona",
"city_name": "Barcelona",
"time_zone": "America/Caracas",
"longitude": -64.684271,
"latitude": 10.103767,
"iata_country_code": "VE",
"iata_code": "BLA",
"iata_city_code": "BLA",
"type": "airport",
"airportName": "General Jose Antonio Anzoategui International Airport"
}
],
"liveMode": false
}