Airport codes api countries - demo

All demos can be found in our download file. Please download the examples to see the API in action.

Download our example jQuery code, it comes with JavaScript and PHP libraries that make connecting to our API a breeze. Your API key can be found in your air-port-codes.com account and is necessary to be granted access privileges.

Demo 1: Select field selected with your country

The parameters set for this request are:

var params = {
    key: apiKey,
    is_select_options: true, // set this to false if you just want a json array back, otherwise, we will build your select options for you
    highlight: 'US,CA,AU,GB', // puts these countries at the top
    autoselect_visitor_location: true,
    // selected: 'AU'
};

var apccs = new apc('countries', params);

Demo 2: Retrieve countries object

This shows you what the json response from the endpoint will be.

Response Object.