Welcome to the World Airports API! This guide will assist you in leveraging our API to access a wealth of airport information worldwide.
The World Airports API provides developers with access to a vast repository of airport data, facilitating easy retrieval of airport details such as location, IATA and ICAO codes, elevation, and more. Whether youโre building a travel booking platform, flight tracker, or any aviation-related application, our API offers the necessary tools to enhance your user experience.
All API requests are made to:
https://airports.p.rapidapi.com
To use the World Airports API, you need to subscribe to the API on RapidAPI and obtain your API key. Include your API key in the headers of each request.
Endpoint: /v1/airports
Description: Search for airports using various criteria such as airport name, IATA, or ICAO codes.
Request Method: POST
Request Body:
{
"search": "Singapore Changi International Airport"
}
Response:
[
{
"icao": "WSSS",
"iata": "SIN",
"name": "Singapore Changi International Airport",
"city": "Singapore",
"state": "North-East",
"country": "SG",
"elevation": 22,
"lat": 1.3501900434,
"lon": 103.9940032959,
"tz": "Asia/Singapore",
"ac": "SIN",
"an": "Singapore Changi International Airport",
"cn": "Singapore",
"cc": "SG",
"ct": "Singapore"
}
]
Hereโs how to make a request to search for an airport:
curl -X POST 'https://airports.p.rapidapi.com/v1/airports' \
-H 'Content-Type: application/json' \
-H 'X-RapidAPI-Host: airports.p.rapidapi.com' \
-H 'X-RapidAPI-Key: YOUR_API_KEY' \
-d '{"search": "Singapore Changi International Airport"}'
A successful response will return an array of airports matching the search criteria, each containing detailed information:
[
{
"icao": "WSSS",
"iata": "SIN",
"name": "Singapore Changi International Airport",
"city": "Singapore",
"state": "North-East",
"country": "SG",
"elevation": 22,
"lat": 1.3501900434,
"lon": 103.9940032959,
"tz": "Asia/Singapore",
"ac": "SIN",
"an": "Singapore Changi International Airport",
"cn": "Singapore",
"cc": "SG",
"ct": "Singapore"
}
]
In case of errors, the API will return an appropriate error message in the response body. Handle these errors gracefully in your application.
For any questions or issues, please visit our support page on RapidAPI or contact our support team.
Thank you for using the World Airports API! We look forward to seeing the innovative applications you develop with our service.