Single airport request - parameters

The Javascript and PHP classes provided in the sample code should take care of the endpoint and the headers for you. It is helpful to know in case you need to write any custom code that we haven't provided.

Endpoint

For this API request, you will need to hit the following endpoint.

https://www.air-port-codes.com/api/v1/single

Headers

In order to be granted access to the API, all of your requests must include an APC-Auth header that includes your API Key. An APC-Auth-Secret header can also be supplied for special cases where a referrer cannot be found, however, in most cases it will not be necessary.

Name

Action

Description

APC-Auth

Required

Your unique 10 digit alphanumeric Air-Port-Codes API key. This can be located in your account settings.

APC-Auth-Secret

Optional

Your unique 15 digit alphanumeric Air-Port-Codes API secret. You should NOT need to use this from Javascript unless you are running the script outside of a server, from an app or local testing (file://...). In most cases you won't need to use this if you add a proper domain to your account. It is more secure without it!

Parameters

Available parameters include term, limit and size. Results will be ordered based on size of airport with larger airports first and smaller ones last.