Endpoint: places/airports

The places/airports endpoint provides place information on airports, heliports, sea bases, and balloonports.

https://api.aerisapi.com/places/airports/

Supported Actions

The following actions are supported with the places/airports endpoint:

:id Requesting data by using the :id action is used for returning data for a particular item that has an ID associated with it. This is the primary method for requesting general weather information for a single location (observations, forecasts, advisories, etc.) as the location's name or a zip code serves as the id. Other endpoints may expect a certain value for the ID, such as storm cells whose ID value is a combination of the radar site identifier and unique identifier assigned to every storm cell. Refer to an enpoint's detailed documentation for specific information regarding how to use the :id action.
closest The closest action will query the API for data that is closest to the requested place and return the results, if any, in order from closest to farthest. If no limit is provided in the request, then only the closest single result will be returned.

If your request does not return results, you may try setting or increasing the radius being used.
within The within action allows for returning data within a variety of different geometrical regions. Currently supported geometries include a circle (requires a center point and radius), square (requires two coordinate points defining the top-left and bottom-right corners) and polygon (requires at least three coordinate points). Unlike the closest action, the results will not be returned in any particular order based on distance.
search The search action is used as a more general query method and expects the query to be defined with the custom query for the request. Unlike the closest action, results will not be returned in any particular order.

Supported Parameters

The following parameters are optional unless otherwise noted:

p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
limit limit=:total The total number of results to return as an integer. Each endpoint may have a set maximum for this value depending on usage.

The default limit is 1 if not specified.
radius radius=:distance:unit When requesting the closest results within a circle, the radius determines how far from the specified location to search. A valid unit value must be included in your radius value, e.g., "5mi", "10km", "25miles". If no unit is provided, your value is assumed to be in meters by default.

Most endpoints utilize a default radius of 50 miles, though some endpoints, such as lightning, may have tighter restrictions specified.
filter filter=:string Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names.
query query=:string Used to filter results based on certain fields in the data set. See Advanced Queries for more details.
sort sort=:string Used to sort results based on certain fields in the data set. See Sorting for more details.
skip skip=:number Used to skip over a specific number of results in the data set.
callback callback=:functionName Used with JSONP implementation.

Defines the callback function to use for the response. The response will be enclosed as C(response), where C is the callback function provided.
fields fields=:string Provides a comma separated list of values for the API to return. This parameter is often used to limit the amount of data returned. See Reducing Output.
format format=:string Defines the API output format. The available options include:
format=json - Standard JSON output. This is the default.
format=geojson - API will output GeoJSON.

If obtaining GeoJSON and using the fields parameter, be sure to include loc to ensure geographical references are available in the response.

Supported Filters

The following filters can be passed to the filter parameter to reduce the results that are returned:

airport (default) Returns all airports.
smallairport Returns small airports.
medairport Returns medium-sized airports.
largeairport Returns large airports.
heliport Returns heliports.
balloonport Returns balloon ports (public use balloon airports).
sea Returns sea bases.
all Returns all types.
closed Returns airports marked as closed.

Supported Query Properties

Use the following supported property keys when creating custom queries for your requests:

id Query by the global recognized ID for the airport.
name Query by the airport name.
city Query by the airport's city name.
state Query by the airport's 2-letter state or province abbreviation (US and Canada only).
country Query by the airport's 2-letter country abbreviation.
type Query by the airport type code. Refer to the profile.type property for possible values.
iata Query based on the airport's 3-letter IATA code.

Sortable Fields

You can use the following fields to sort the data returned in your response:

id Sort based on the global recognized ID for the airport.
name Sort based on the airport name.
city Sort based on the airport's city name.
state Sort based on the airport's 2-letter state/province abbreviation.
country Sort based on the airport's 2-letter country abbreviation.
type Sort based on the airport type code. Refer to the profile.type property for possible values.
iata Sort based on the airport's 3-letter IATA code.

Examples

The /[:endpoint]/[:action]? portion within the query template below can be exchanged with any of the examples. Also, please note you will need to input your client credentials in the [ID] and [SECRET] fields which can be found under the Apps section of the members area.

https://api.aerisapi.com/[:endpoint]/[:action]?client_id=[ID]&client_secret=[SECRET]

Returns the airport information for Minneapolis - St Paul International Airport by using the 3 character IATA ID.
/places/airports/MSP?

Returns the airport information for Roanoke Regional Airport by using the 4 character ICAO ID.
/places/airports/KROA?

Returns the 5 closest airports of any size to downtown Minneapolis, MN.
/places/airports/closest/?p=minneapolis,mn&limit=5&

Returns up to 5 of the closest larger airports within a 200 mile radius of Minneapolis, MN.
/places/airports/closest/?p=minneapolis,mn&limit=5&radius=200miles&filter=largeairport&

Response

The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.

Default
GeoJSON

{
    "success": true,
    "error": null,
    "response": [{
        "id": "egll",
        "loc": {
            "lat": 51.4706001282,
            "long": -0.461941003799
        },
        "place": {
            "name": "London Heathrow Airport",
            "city": "London",
            "state": "ENG",
            "stateFull": "",
            "country": "GB",
            "countryFull": "United Kingdom",
            "region": "",
            "regionFull": "",
            "continent": "eu",
            "continentFull": "Europe"
        },
        "profile": {
            "id": "egll",
            "iata": "lhr",
            "local": "",
            "type": "la",
            "typeENG": "large airport",
            "elevFT": 83,
            "elevM": 25.3,
            "pop": null,
            "tz": "Europe\/London",
            "tzname": "BST",
            "tzoffset": 3600,
            "isDST": true,
            "wxzone": null,
            "firezone": null,
            "fips": null,
            "countyid": null
        },
        "relativeTo": {
            "lat": 51.50853,
            "long": -0.12574,
            "bearing": 260,
            "bearingENG": "W",
            "distanceKM": 23.656,
            "distanceMI": 14.699
        }
    }]
}
								

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "id": "egll",
        "geometry": {
            "type": "Point",
            "coordinates": [-0.461941003799, 51.4706001282]
        },
        "properties": {
            "id": "egll",
            "loc": {
                "lat": 51.4706001282,
                "long": -0.461941003799
            },
            "place": {
                "name": "London Heathrow Airport",
                "city": "London",
                "state": "ENG",
                "stateFull": "",
                "country": "GB",
                "countryFull": "United Kingdom",
                "region": "",
                "regionFull": "",
                "continent": "eu",
                "continentFull": "Europe"
            },
            "profile": {
                "id": "egll",
                "iata": "lhr",
                "local": "",
                "type": "la",
                "typeENG": "large airport",
                "elevFT": 83,
                "elevM": 25.3,
                "pop": null,
                "tz": "Europe\/London",
                "tzname": "BST",
                "tzoffset": 3600,
                "isDST": true,
                "wxzone": null,
                "firezone": null,
                "fips": null,
                "countyid": null
            },
            "relativeTo": {
                "lat": 51.50853,
                "long": -0.12574,
                "bearing": 260,
                "bearingENG": "W",
                "distanceKM": 23.656,
                "distanceMI": 14.699
            }
        }
    }]
}
								

Response Properties

The following properties will be provided in every response object:

id (string) The globally recognized airport ID.
place.city (string) The name of the airport's city.
profile.id (string) The globally recognized airport ID.
profile.iata (string) The 3 character IATA code for the location. (Empty string if not available)
profile.local (string) The local ID/code for the location. (Empty string if not available)
profile.type (string) The facility type code:
- sa = small airport
- ma = medium airport
- la = large ariport
- h = heliport
- b = balloonport
- sea = sea base
- c = closed
profile.typeENG (string) The English name of the facility type.
profile.wxzone (array) Array of public weather zones (US) or Canadian Location Codes (CLCs for Canada) that the location is within. Null if not available
profile.firezone (array) Array of public fire zones (US only) that the location is within. Null if not available
profile.fips (array) Array of county FIPs codes (US only) that the location is within. Null if not available
profile.countyid (array) Array of county codes (US only) that the location is within. NULL if not available
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.
relativeTo.lat (number) Latitude coordinate of the location used for the request. This may be different than the record's loc.lat value if there was no record exactly at the request location.
relativeTo.long (number) Longitude coordinate of the location used for the request. This may be different than the record's loc.long value if there was no record exactly at the request location.
relativeTo.bearing (number) Bearing in degrees of the record's location relative to the location used for the request.
relativeTo.bearingEng (string) Cardinal direction of the record relative to the location used for the request.
relativeTo.distanceKM (number) Distance, in kilometers, from the requested location to the record's actual location.
relativeTo.distanceMI (number) Distance, in miles, from the requested location to the record's actual location.
place.name (string) The primary name of the location.
place.state (string) The abbreviated state or province for the location.
place.stateFull (string) The full state or province name for the location.
place.country (string) The abbreviated country for the location.
place.countryFull (string) The full country name for the location.
place.region (string) The region for the location (primarily for US-based locations).
place.regionFull (string) The full region name for the location (primarily for US-based locations).
place.continent (string) The continent abbreviation the location belongs to.
place.continentFull (string) The full name of the continent the location belongs to.
profile.elevM (number) The elevation of the location in meters.
profile.elevFT (number) The elevation of the location in feet.
profile.tz (string) Timezone name of the location.
profile.tzname (string) The timezone abbreviation for the location.
profile.tzoffset (number) The timezone offset for the location in seconds.
profile.isDST (boolean) True if the location is currently observing Daylight Savings Time (DST), otherwise false.