Multi airport request - variables

Root variables

Name Type Description
status Boolean Determines if result has any valid airports. False means no airports will be in the response.
airports Array An array of all the matching airports.
term String The search term used in the look up.
limit Integer The limit parameter used in the look up.
size Integer The size of airports returned in the response.
cached Boolean If the retrieval from the database was cached.
statusCode Integer This will be a number corresponding to the response code type.
message String Will only be provided for error responses. It will display a text message explaining the current error.

Airport object variable

The airports array consists of individual airport objects with many airport variables for each

Name Type Description
name String The name of the airport.
city String The city the airport resides in.
state Object The state the airport resides in. An object with the name, abbreviation and type of the region. Every country varies on what a state/province is called. The type of region is provided for this purpose (eg. State, Province, Municipality, County, District, etc).
country Object The country the airport resides in. An object with the name and iso of the country.
iata String The iata airport code.
latitude String The latitude for the airport.
longitude String The longitude for the airport.

Example response

The response will be in typical json fashion. The following response is from a search request for the term "new yo".

{
    "airports":[
    {
        "name":"New York City - All Airports",
        "city":"New York City",
        "state":{
            "name":"New York",
            "abbr":"NY"
            "type":"State"
        },
        "country":{
            "name":"United States",
            "iso":"US"
        },
        "iata":"NYC",
        "latitude":"40.714167",
        "longitude":"-74.005833"
    },
    {
        "name":"John F. Kennedy International Airport",
        "city":"New York City",
        "state":{
            "name":"New York",
            "abbr":"NY"
            "type":"State"
        },
        "country":{
            "name":"United States",
            "iso":"US"
        },
        "iata":"JFK",
        "latitude":"40.642334",
        "longitude":"-73.788170"
    },{
        "name":"La Guardia Airport",
        "city":"New York City",
        "state":{
            "name":"New York",
            "abbr":"NY"
            "type":"State"
        },
        "country":{
            "name":"United States",
            "iso":"US"
        },
        "iata":"LGA",
        "latitude":"40.774254",
        "longitude":"-73.871620"
    }],
    "status":true
    "statusCode":200,
    "term":"new yo",
    "limit":"7",
    "size":0,
    "cached":false,
}

An error response will look like this.

{
    "status":false,
    "statusCode":404,
    "message":"No results found for search term.",
    "term":"new oky"
}