API Access Key & Authentication


API Access Key 

After creating an Aviationstack account, you will be able to retrieve your unique API access key using your account dashboard. Each Aviationstack account can only be assigned one API access key.

To connect to the API, simply attach the access_key parameter to any valid API endpoint URL and set it to your access key. Find an example below, you can click the button on the right side of the code to execute the shown API request.

Run API Request

Keep your key safe: To prevent unauthorized access to your aviationstack account, please make sure to keep your API access key safe at all times. You can always generate a new key using your account dashboard.

256-bit HTTPS Encryption

Customers registered for the Aviationstack with any plans may connect to the API using industry-standard 256-bit HTTPS  (SSL) encryption. You don’t need a paid plan to access the HTTPS protocol anymore.

Example API Request                                                                         Available on: All Plans

API Error Codes

If your request to the aviationstack API does not succeed, the API will return a JSON error response that contains an error code and message objects indicating the type of error that occurred. The API also supports HTTP status codes, returning a code of 200 for successful requests, and an error status code (e.g. 404) for failed requests.

If a validation error occurs, hence, an API parameter is used in an invalid way, there will be an additional context object containing multiple sub-objects with the associated API parameter as the key and details about the given validation error(s), further sub-objects. Each instance of a validation error contains key and message objects.

Example Error

Common API Errors

CodeTypeDescription
401invalid_access_keyAn invalid API access key was supplied.
401missing_access_keyNo API access key was supplied.
401inactive_userThe given user account is inactive.
403function_access_restrictedThe given API endpoint is not supported on the current subscription plan.
404invalid_api_functionThe given API endpoint does not exist.
404404_not_foundResource not found.
429usage_limit_reachedThe given user account has reached its monthly allowed request volume.
429rate_limit_reachedThe given user account has reached the rate limit.
500internal_errorAn internal error occurred.

 

 

Was this page helpful?
Questions? Contact Sales .
Need help? Contact Support .
Check out our Changelog .
© 2025 APILayer. All rights reserved.