FlightAware airports API

The airports API from FlightAware — 17 operation(s) for airports.

OpenAPI Specification

flightaware-airports-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Aero airports API
  version: 4.17.1
  description: '# Introduction

    AeroAPI is a simple, query-based API that gives software developers access

    to a variety of FlightAware''s flight data. Users can obtain current or

    historical data. AeroAPI is a RESTful API delivering accurate and

    actionable aviation data. With the introduction of Foresight™, customers

    have access to the data that powers over half of the predictive airline

    ETAs in the US.


    ## Categories

    AeroAPI is divided into several categories to make things easier to

    discover.

    - Flights: Summary information, planned routes, positions and more

    - Foresight: Flight positions enhanced with FlightAware Foresight™

    - Airports: Airport information and FIDS style resources

    - Operators: Operator information and fleet activity resources

    - Alerts: Configure flight alerts and delivery destinations

    - History: Historical flight access for various endpoints

    - Miscellaneous: Flight disruption, future schedule information, and aircraft owner information


    ## Development Tools

    AeroAPI is defined using the OpenAPI Spec 3.0, which means it can be easily

    imported into tools like Postman. To get started try importing the API

    specification using

    [Postman''s instructions](https://learning.postman.com/docs/integrations/available-integrations/working-with-openAPI/).

    Once imported as a collection only the "Value" field under the collection''s

    Authorization tab needs to be populated and saved before making calls.


    The AeroAPI OpenAPI specification is located at:\

    https://flightaware.com/commercial/aeroapi/resources/aeroapi-openapi.yml


    Our [open source AeroApps project](/aeroapi/portal/resources)

    provides a small collection of services and sample applications to help

    you get started.


    The Flight Information Display System (FIDS) AeroApp is an example of a

    multi-tier application using multiple languages and Docker containers.

    It demonstrates connectivity, data caching, flight presentation, and leveraging flight maps.


    The Alerts AeroApp demonstrates the use of AeroAPI to set, edit, and

    receive alerts in a sample application with a Dockerized Python backend

    and a React frontend.


    Our AeroAPI push notification [testing interface](/commercial/aeroapi/send.rvt)

    provides a quick and easy way to test the delivery of customized alerts via AeroAPI push.

    '
servers:
- url: https://{env}.flightaware.com/aeroapi
  variables:
    env:
      default: aeroapi
      enum:
      - aeroapi
security:
- ApiKeyAuth: []
tags:
- name: airports
paths:
  /airports:
    parameters:
    - in: query
      name: max_pages
      description: Maximum number of pages to fetch. This is an upper limit and not a guarantee of how many pages will be returned.
      schema:
        type: integer
        default: 1
        minimum: 1
    - in: query
      name: cursor
      description: 'Opaque value used to get the next batch of data from a paged collection.

        '
      schema:
        type: string
    get:
      operationId: get_all_airports
      summary: Get all airports
      description: 'Returns the ICAO identifiers of all known airports. For airports that

        do not have an ICAO identifier, the FAA LID identifier will be used.

        Links for further information about each airport are included.

        '
      tags:
      - airports
      responses:
        '200':
          description: Returns a list of airports
          content:
            application/json; charset=UTF-8:
              schema:
                type: object
                properties:
                  links:
                    type: object
                    nullable: true
                    description: 'Object containing links to related resources.

                      '
                    properties:
                      next:
                        type: string
                        format: uri-reference
                        description: 'A link to the next set of records in a collection.

                          '
                    required:
                    - next
                  num_pages:
                    description: Number of pages returned
                    type: integer
                    minimum: 1
                  airports:
                    type: array
                    items:
                      title: AirportRef
                      type: object
                      nullable: true
                      properties:
                        code:
                          type: string
                          description: 'ICAO identifier if known, otherwise IATA or LID. For position-only

                            flights, this may also be a string indicating the location where tracking

                            of the flight began/ended.

                            '
                        airport_info_url:
                          type: string
                          nullable: true
                          format: uri-reference
                          description: The URL to more information about the airport.
                      required:
                      - code
                      - airport_info_url
                required:
                - links
                - num_pages
                - airports
  /airports/nearby:
    get:
      operationId: get_nearby_airports
      summary: Get airports near a location
      description: 'Returns a list of airports located within a given distance from the

        given location.

        '
      tags:
      - airports
      parameters:
      - name: latitude
        in: query
        description: 'The latitude of the point used to search for nearby airports

          '
        required: true
        schema:
          type: number
      - name: longitude
        in: query
        description: 'The longitude of the point used to search for nearby airports

          '
        required: true
        schema:
          type: number
      - name: radius
        in: query
        description: 'The search radius to use for finding nearby airports (statue miles)

          '
        required: true
        schema:
          type: integer
      - name: only_iap
        in: query
        description: 'Return only nearby airports with Instrument Approaches (also limits

          results to North American airports)

          '
        schema:
          type: boolean
          default: false
      - in: query
        name: max_pages
        description: Maximum number of pages to fetch. This is an upper limit and not a guarantee of how many pages will be returned.
        schema:
          type: integer
          default: 1
          minimum: 1
      - in: query
        name: cursor
        description: 'Opaque value used to get the next batch of data from a paged collection.

          '
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json; charset=UTF-8:
              schema:
                properties:
                  links:
                    type: object
                    nullable: true
                    description: 'Object containing links to related resources.

                      '
                    properties:
                      next:
                        type: string
                        format: uri-reference
                        description: 'A link to the next set of records in a collection.

                          '
                    required:
                    - next
                  num_pages:
                    description: Number of pages returned
                    type: integer
                    minimum: 1
                  airports:
                    type: array
                    items:
                      title: NearbyAirport
                      allOf:
                      - type: object
                        properties:
                          airport_code:
                            type: string
                            description: Default airport identifier, generally ICAO but may be IATA or LID if the airport lacks an ICAO code
                            example: KHOU
                          code_icao:
                            type: string
                            nullable: true
                            description: ICAO identifier for the airport if known
                            example: KHOU
                          code_iata:
                            type: string
                            nullable: true
                            description: IATA identifier for the airport if known
                            example: HOU
                          code_lid:
                            type: string
                            nullable: true
                            description: LID identifier for the airport if known
                            example: HOU
                          alternate_ident:
                            deprecated: true
                            type: string
                            nullable: true
                            description: IATA or LID identifier for the airport. (Deprecated, use code_iata for the IATA identifier or code_lid for the LID identifier instead.)
                          name:
                            type: string
                            description: Common name for the airport
                            example: London Heathrow
                          type:
                            type: string
                            nullable: true
                            description: Type of airport
                            enum:
                            - Airport
                            - Heliport
                            - Seaplane Base
                            - Ultralight
                            - Stolport
                            - Gliderport
                            - Balloonport
                            - null
                          elevation:
                            type: number
                            description: Height above Mean Sea Level (MSL)
                          city:
                            type: string
                            description: Closest city to the airport
                          state:
                            type: string
                            description: 'State/province where the airport resides if applicable. For US states

                              this will be their 2-letter code; for provinces or other entities, it

                              will be the full name.

                              '
                          longitude:
                            type: number
                            description: Airport's longitude, generally the center point of the airport
                          latitude:
                            type: number
                            description: Airport's latitude, generally the center point of the airport
                          timezone:
                            type: string
                            description: Applicable timezone for the airport, in the TZ database format
                            example: America/Chicago
                          country_code:
                            type: string
                            description: 2-letter code of country where the airport resides (ISO 3166-1 alpha-2)
                          wiki_url:
                            type: string
                            nullable: true
                            description: Link to the wikipedia page for the airport
                            format: uri
                          airport_flights_url:
                            type: string
                            format: uri-reference
                            description: The URL to flights for this airport
                        required:
                        - airport_code
                        - alternate_ident
                        - name
                        - elevation
                        - city
                        - state
                        - longitude
                        - latitude
                        - timezone
                        - country_code
                        - wiki_url
                        - airport_flights_url
                      - type: object
                        properties:
                          distance:
                            type: integer
                            description: 'Distance of airport from the specified location (statute miles)

                              '
                          heading:
                            type: integer
                            description: 'Direction from specified location to airport (degrees)

                              '
                            minimum: 1
                            maximum: 360
                          direction:
                            type: string
                            description: 'Cardinal direction from specified location to airport

                              '
                            enum:
                            - N
                            - E
                            - S
                            - W
                            - NE
                            - SE
                            - SW
                            - NW
                        required:
                        - distance
                        - heading
                        - direction
                required:
                - links
                - num_pages
                - airports
        '400':
          description: 'Incorrect parameter(s). Expected: numerical latitude and longitude, radius > 0.

            '
          content:
            application/json; charset=UTF-8:
              schema:
                title: Error
                type: object
                properties:
                  title:
                    type: string
                    description: Short summary of the type of error encountered.
                  reason:
                    type: string
                    description: Error type name directly from the backend.
                  detail:
                    type: string
                    description: 'More detailed description of the error, possibly including information

                      about specific invalid fields or remediation steps.

                      '
                  status:
                    type: integer
                    description: The HTTP response code returned as part of the error.
                required:
                - title
                - reason
                - detail
                - status
  /airports/delays:
    parameters:
    - in: query
      name: max_pages
      description: Maximum number of pages to fetch. This is an upper limit and not a guarantee of how many pages will be returned.
      schema:
        type: integer
        default: 1
        minimum: 1
    - in: query
      name: cursor
      description: 'Opaque value used to get the next batch of data from a paged collection.

        '
      schema:
        type: string
    get:
      operationId: get_delays_for_all_airports
      summary: Get delay information for all airports with delays
      description: 'Returns a list of airports with delays. There may be multiple reasons

        returned per airport if there are multiple types of delays reported at

        an airport. Note that individual flights can be delayed without there

        being an airport-wide delay returned by this endpoint.

        '
      tags:
      - airports
      responses:
        '200':
          description: OK
          content:
            application/json; charset=UTF-8:
              schema:
                properties:
                  links:
                    type: object
                    nullable: true
                    description: 'Object containing links to related resources.

                      '
                    properties:
                      next:
                        type: string
                        format: uri-reference
                        description: 'A link to the next set of records in a collection.

                          '
                    required:
                    - next
                  num_pages:
                    description: Number of pages returned
                    type: integer
                    minimum: 1
                  delays:
                    type: array
                    items:
                      title: Airport Delay
                      type: object
                      properties:
                        airport:
                          type: string
                          description: ICAO/IATA code of airport
                        category:
                          type: string
                          description: 'Category of the largest delay. Some possible values are "weather", "traffic",

                            "equipment", etc.

                            '
                        color:
                          type: string
                          description: Color of largest delay
                          enum:
                          - red
                          - yellow
                          - green
                        delay_secs:
                          type: integer
                          description: 'Duration of largest delay (seconds). This value is not intended to be

                            presented to users and should only be used for sorting results.

                            '
                        reasons:
                          type: array
                          description: Reasons for the delay
                          items:
                            type: object
                            properties:
                              category:
                                type: string
                                description: 'Category for the delay. Some possible values are "weather", "traffic",

                                  "equipment", etc.

                                  '
                              color:
                                type: string
                                description: Color indicating severity of delay
                                enum:
                                - red
                                - yellow
                                - green
                              delay_secs:
                                type: integer
                                description: 'Duration of delay (seconds). This value is not intended to be

                                  presented to users and should only be used for sorting results.

                                  '
                              reason:
                                type: string
                                description: Textual description of the cause of the delay
                            required:
                            - category
                            - color
                            - delay_secs
                            - reason
                      required:
                      - airport
                      - category
                      - color
                      - delay_secs
                      - reasons
                required:
                - links
                - num_pages
                - delays
  /airports/{id}:
    get:
      operationId: get_airport
      summary: Get static information about an airport
      description: 'Returns information about an airport given an ICAO or LID airport code

        such as KLAX, KIAH, O07, etc. Data returned includes airport name,

        city, state (when known), latitude, longitude, and timezone.

        '
      tags:
      - airports
      parameters:
      - name: id
        in: path
        description: 'ICAO, IATA or LID ID of destination airport to fetch. [ICAO is highly preferred](/aeroapi/portal/resources#icaoCode) to prevent ambiguity.

          '
        required: true
        schema:
          type: string
        examples:
          ICAO:
            value: KIAH
          IATA:
            value: IAH
      responses:
        '200':
          description: Information about the requested airport.
          content:
            application/json; charset=UTF-8:
              schema:
                allOf:
                - type: object
                  properties:
                    airport_code:
                      type: string
                      description: Default airport identifier, generally ICAO but may be IATA or LID if the airport lacks an ICAO code
                      example: KHOU
                    code_icao:
                      type: string
                      nullable: true
                      description: ICAO identifier for the airport if known
                      example: KHOU
                    code_iata:
                      type: string
                      nullable: true
                      description: IATA identifier for the airport if known
                      example: HOU
                    code_lid:
                      type: string
                      nullable: true
                      description: LID identifier for the airport if known
                      example: HOU
                    alternate_ident:
                      deprecated: true
                      type: string
                      nullable: true
                      description: IATA or LID identifier for the airport. (Deprecated, use code_iata for the IATA identifier or code_lid for the LID identifier instead.)
                    name:
                      type: string
                      description: Common name for the airport
                      example: London Heathrow
                    type:
                      type: string
                      nullable: true
                      description: Type of airport
                      enum:
                      - Airport
                      - Heliport
                      - Seaplane Base
                      - Ultralight
                      - Stolport
                      - Gliderport
                      - Balloonport
                      - null
                    elevation:
                      type: number
                      description: Height above Mean Sea Level (MSL)
                    city:
                      type: string
                      description: Closest city to the airport
                    state:
                      type: string
                      description: 'State/province where the airport resides if applicable. For US states

                        this will be their 2-letter code; for provinces or other entities, it

                        will be the full name.

                        '
                    longitude:
                      type: number
                      description: Airport's longitude, generally the center point of the airport
                    latitude:
                      type: number
                      description: Airport's latitude, generally the center point of the airport
                    timezone:
                      type: string
                      description: Applicable timezone for the airport, in the TZ database format
                      example: America/Chicago
                    country_code:
                      type: string
                      description: 2-letter code of country where the airport resides (ISO 3166-1 alpha-2)
                    wiki_url:
                      type: string
                      nullable: true
                      description: Link to the wikipedia page for the airport
                      format: uri
                    airport_flights_url:
                      type: string
                      format: uri-reference
                      description: The URL to flights for this airport
                  required:
                  - airport_code
                  - alternate_ident
                  - name
                  - elevation
                  - city
                  - state
                  - longitude
                  - latitude
                  - timezone
                  - country_code
                  - wiki_url
                  - airport_flights_url
                - type: object
                  properties:
                    alternatives:
                      type: array
                      description: 'An array of other possible airport matches

                        '
                      items:
                        type: object
                        properties:
                          airport_code:
                            type: string
                            description: Default airport identifier, generally ICAO but may be IATA or LID if the airport lacks an ICAO code
                            example: KHOU
                          code_icao:
                            type: string
                            nullable: true
                            description: ICAO identifier for the airport if known
                            example: KHOU
                          code_iata:
                            type: string
                            nullable: true
                            description: IATA identifier for the airport if known
                            example: HOU
                          code_lid:
                            type: string
                            nullable: true
                            description: LID identifier for the airport if known
                            example: HOU
                          alternate_ident:
                            deprecated: true
                            type: string
                            nullable: true
                            description: IATA or LID identifier for the airport. (Deprecated, use code_iata for the IATA identifier or code_lid for the LID identifier instead.)
                          name:
                            type: string
                            description: Common name for the airport
                            example: London Heathrow
                          type:
                            type: string
                            nullable: true
                            description: Type of airport
                            enum:
                            - Airport
                            - Heliport
                            - Seaplane Base
                            - Ultralight
                            - Stolport
                            - Gliderport
                            - Balloonport
                            - null
                          elevation:
                            type: number
                            description: Height above Mean Sea Level (MSL)
                          city:
                            type: string
                            description: Closest city to the airport
                          state:
                            type: string
                            description: 'State/province where the airport resides if applicable. For US states

                              this will be their 2-letter code; for provinces or other entities, it

                              will be the full name.

                              '
                          longitude:
                            type: number
                            description: Airport's longitude, generally the center point of the airport
                          latitude:
                            type: number
                            description: Airport's latitude, generally the center point of the airport
                          timezone:
                            type: string
                            description: Applicable timezone for the airport, in the TZ database format
                            example: America/Chicago
                          country_code:
                            type: string
                            description: 2-letter code of country where the airport resides (ISO 3166-1 alpha-2)
                          wiki_url:
                            type: string
                            nullable: true
                            description: Link to the wikipedia page for the airport
                            format: uri
                          airport_flights_url:
                            type: string
                            format: uri-reference
                            description: The URL to flights for this airport
                        required:
                        - airport_code
                        - alternate_ident
                        - name
                        - elevation
                        - city
                        - state
                        - longitude
                        - latitude
                        - timezone
                        - country_code
                        - wiki_url
                        - airport_flights_url
        '400':
          description: 'Incorrect parameter (id). Id must be a valid airport code and cannot be empty.

            '
          content:
            application/json; charset=UTF-8:
              schema:
                title: Error
                type: object
                properties:
                  title:
                    type: string
                    description: Short summary of the type of error encountered.
                  reason:
                    type: string
                    description: Error type name directly from the backend.
                  detail:
                    type: string
                    description: 'More detailed description of the error, possibly including information

                      about specific invalid fields or remediation steps.

                      '
                  status:
                    type: integer
                    description: The HTTP response code returned as part of the error.
                required:
                - title
                - reason
                - detail
                - status
  /airports/{id}/canonical:
    get:
      operationId: get_airports_canonical
      summary: Get the canonical code of an airport
      description: 'Returns a list of ICAO airport codes corresponding to the given IATA or LID airport code.

        IATA codes can be identical to some LID codes, so if id_type is specified, only 1 ICAO

        code will be returned. If no id_type is specified and there are two possible ICAO codes,

        both will be returned.

        '
      tags:
      - airports
      parameters:
      - name: id
        in: path
        description: 'ICAO, IATA or LID ID of destination airport to fetch. [ICAO is highly preferred](/aeroapi/portal/resources#icaoCode) to prevent ambiguity.

          '
        required: true
        schema:
          type: string
        examples:
          ICAO:
            value: KIAH
          IATA:
            value: IAH
      - name: id_type
        in: query
        description: 'Type of airport code provided in the id parameter

          '
        schema:
          type: string
          enum:
          - iata
          - lid
          - icao
      responses:
        '200':
          description: OK
          content:
            application/json; charset=UTF-8:
              schema:
                type: object
                properties:
                  airports:
                    type: array
                    items:
                      title: CanonicalAirport
                      type: object
                      properties:
                        id:
                          type: string
                          description: 'Canonical airport code. This is the code by which a given airport (and

                            its flights) can be accessed in AeroAPI.

                            '
                        id_type:
                          type: string
                          description: 'Type of airport code given in id

                            '
                          enum:
                          - icao
                          - i

# --- truncated at 32 KB (304 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/flightaware/refs/heads/main/openapi/flightaware-airports-api-openapi.yml