API Features
Autocomplete
As outlined for some API endpoints, the Aviationstack API is capable of providing result suggestions based on a search term that can be used for autocomplete features in your application. To get autocomplete suggestions, simply attach the search
parameter to the API request URL of any supported API endpoint and set it to a search term of your choice.
Supported API Endpoints
Airports Endpoint:
/airports
Airlines Endpoint:
/airlines
Airplanes Endpoint:
/airplanes
Aircraft Types Endpoint:
/aircraft_types
Aviation Tax Endpoint:
/taxes
Cities Endpoint:
/cities
Countries Endpoint:
/countries
Example API Request: In the following example we search for suggestions for airlines based on the term "american".
Run API Request
Example API Response
Please note: The API response above has been shortened to show only one country result for readability purposes. To learn more about API response objects of this particular API endpoint, please jump to the Airlines API endpoint.
JSONP Callbacks
The aviationstack API supports JSONP Callbacks. To use the JSONP functionality, simply append the callback
parameter to your API endpoint URL and set it to a function name of your choice. If a function name is provided, the API will return your API response wrapped inside the tags of the function you specified.
Example API Request
Run API Request
Example API Response
Please note: The API also supports Access-Control (CORS) headers.
lang
Using the translations function in the API with &lang=
will slow down the API calls they involve a lot of translations of airports, cities, and countries. Therefore, it is recommended to use it in combination with other filters to reduce the amount of data you receive in the response
Available languages
Code | Language |
---|---|
fr | French |
ar | Arabic |
fa | Persian |
ru | Russian |
zh_hans | Chinese Simplified |
zh_hant | Chinese Traditional |
es | Spanish |
hi | Hindi |
pt | Portuguese |
ja | Japanese |
de | German |
jv | Javanese |
ko | Korean |
tr | Turkish |
vi | Vietnamese |
it | Italian |
ur | Urdu |
pl | Polish |
uk | Ukrainian |
ro | Romanian |
az | Azerbaijani |
ha | Hausa |
my | Burmese |
th | Thai |
nl | Dutch |
yo | Yoruba |
id | Indonesian |
sv | Swedish |
no | Norwegian |
he | Hebrew |
da | Danish |
ms | Malay |
fl | Filipino |
fi | Finnish |
cs | Czech |
sk | Slovak |
hy | Armenian |
bg | Bulgarian |
ka | Georgian |
el | Greek |
hr | Croatian |
hu | Hungarian |
lt | Lithuanian |
lv | Latvian |
mk | Macedonian |