FlightAware AeroAPI 4.28.0 Reference

Table of Contents

Overview

AeroAPI is FlightAware's RESTful API for aviation data access.

Authentication

curl -H "x-apikey: YOUR_API_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS"

Categories

Category Description
flights Flight info, positions, tracks, routes
foresight ML-enhanced predictions (Premium)
airports Airport info, FIDS, weather
operators Airline info and fleet activity
alerts Flight alert configuration
history Historical flight data (back to 2011)
miscellaneous Aircraft owner, type, disruptions, schedules
account API usage statistics

Flights

GET /flights/{id}/map

Get flight track as base64-encoded image.

Parameter Type Description
id (path) string faflightid
height integer Image height (1-1500, default 480)
width integer Image width (1-1500, default 640)
layeron array Map layers to enable
layeroff array Map layers to disable
showdatablock boolean Show caption (default false)
airportsexpandview boolean Zoom to show airports
showairports boolean Show origin/destination
boundingbox array Custom bounds [top,right,bottom,left]

GET /flights/{id}/position

Get flight's current position.

curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/flights/UAL123-1234567890-airline-0123/position"

GET /flights/{id}/route

Get flight's filed route with waypoints.

GET /flights/{id}/track

Get flight track as array of positions.

Parameter Type Description
includeestimatedpositions boolean Include estimated (default no)
includesurfacepositions boolean Include taxi (default no)

GET /flights/{ident}

Get flight info for registration, ident, or faflightid.

Parameter Type Description
ident string Flight ident, registration, or faflightid
identtype enum designator, registration, faflightid
start string ISO8601 start date (max 10 days past)
end string ISO8601 end date (max 2 days future)
maxpages int Max pages to fetch (default 1)
cursor string Pagination cursor
# Get recent flights for UAL123
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/flights/UAL123"

# Get flights for registration N12345
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/flights/N12345?ident_type=registration"

GET /flights/{ident}/canonical

Get all possible codes for ambiguous ident.

POST /flights/{ident}/intents

Submit flight intent (requires FlightAware Global subscription).

GET /flights/search

Search airborne flights with simplified syntax.

Query keys:

  • -prefix STRING
  • -type STRING
  • -idents STRING
  • -identOrReg STRING
  • -airline STRING
  • -destination STRING
  • -origin STRING
  • -originOrDestination STRING
  • -aboveAltitude INTEGER
  • -belowAltitude INTEGER
  • -aboveGroundspeed INTEGER
  • -belowGroundspeed INTEGER
  • -latlong "MINLAT MINLON MAXLAT MAXLON"
  • -filter {ga|airline}
# Flights in Boston area below 10000ft
curl -H "x-apikey: $AEROAPI_KEY" \
  'https://aeroapi.flightaware.com/aeroapi/flights/search?query=-latlong "41.5 -72.5 43.5 -69.5" -belowAltitude 100'

GET /flights/search/advanced

Advanced search with full query syntax.

Operators:

  • {false key} - boolean false
  • {true key} - boolean true
  • {null key} - null value
  • {notnull key} - not null
  • { key value}= - exact match
  • {! key value}= - not equal
  • {< key value} - less than
  • {> key value} - greater than
  • {< key value}= - less than or equal
  • {> key value}= - greater than or equal
  • {match key pattern} - wildcard match
  • {notmatch key pattern} - not match
  • {range key min max} - numeric range
  • {in key {val1 val2}} - in list
  • {orig_or_dest {airports}} - origin or destination
  • {airline 0|1} - GA or airline
  • {aircraftType {patterns}} - aircraft type match
  • {ident {patterns}} - ident match
  • {ident_or_reg {patterns}} - ident or registration
# AAL flights to/from Boston area airports below 8000ft
curl -H "x-apikey: $AEROAPI_KEY" \
  'https://aeroapi.flightaware.com/aeroapi/flights/search/advanced?query={orig_or_dest {KBOS KBED KOWD}} {<= alt 80} {match ident AAL*}'

GET /flights/search/count

Get count of flights matching search parameters.

GET /flights/search/positions

Search flight positions (all positions, not just latest).

Foresight (Premium)

FlightAware's ML-enhanced predictions. Requires Premium tier.

GET /foresight/flights/{id}/position

Position with Foresight predictions.

Additional response fields:

  • predicted_out, predicted_off, predicted_on, predicted_in
  • predicted_*_source (Foresight or Historical Average)
  • predicted_taxi_out_duration

GET /foresight/flights/{ident}

Flight info with Foresight data.

GET /foresight/flights/search/advanced

Search with Foresight predictions included.

Airports

GET /airports

List all known airports.

GET /airports/{id}

Get airport static info.

curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS"

Response includes:

  • airport_code, code_icao, code_iata, code_lid
  • name, type, elevation
  • city, state, country_code
  • latitude, longitude, timezone
  • wiki_url, airport_flights_url
  • alternatives (nearby airports)

GET /airports/{id}/canonical

Get ICAO code for IATA/LID.

GET /airports/{id}/delays

Get airport delay reasons.

Response colors: red, yellow, green

GET /airports/{id}/flights

Get all flights (arrivals, departures, scheduled).

Parameter Type Description
airline string Filter by airline (e.g., UAL)
type enum GeneralAviation or Airline
start string ISO8601 start
end string ISO8601 end

GET /airports/{id}/flights/arrivals

Recent arrivals (ordered by actualon desc).

GET /airports/{id}/flights/counts

Flight counts by status.

Response:

  • departed, enroute, scheduled_arrivals, scheduled_departures

GET /airports/{id}/flights/departures

Recent departures (ordered by actualoff desc).

GET /airports/{id}/flights/scheduledarrivals

Expected arrivals (ordered by estimatedon asc).

GET /airports/{id}/flights/scheduleddepartures

Scheduled departures (ordered by estimatedoff asc).

GET /airports/{id}/flights/to/{destid}

Flights between two airports.

Parameter Type Description
connection enum nonstop or onestop

GET /airports/{id}/nearby

Airports within radius.

Parameter Type Description
radius integer Search radius (statute miles)
onlyiap boolean Only with instrument approaches

GET /airports/{id}/routes/{destid}

IFR routings between airports.

GET /airports/{id}/weather/forecast

Decoded TAF (Terminal Area Forecast).

GET /airports/{id}/weather/observations

Decoded METAR history.

# Get Boston weather
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS/weather/observations"

GET /airports/delays

All airports with delays.

GET /airports/nearby

Airports near coordinates.

Parameter Type Required Description
latitude number yes Latitude
longitude number yes Longitude
radius int yes Radius (stat miles)
# Airports within 25 miles of East Boston
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/nearby?latitude=42.369&longitude=-71.041&radius=25"

Operators

GET /operators

List all operators.

GET /operators/{id}

Operator info (name, ICAO/IATA, location, etc.).

curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/operators/UAL"

GET /operators/{id}/canonical

Get canonical ICAO code for operator.

GET /operators/{id}/flights

All operator flights (scheduled, arrivals, enroute).

GET /operators/{id}/flights/arrivals

Operator's arrived flights.

GET /operators/{id}/flights/counts

Operator flight counts.

Response: airborne, flights_last_24_hours

GET /operators/{id}/flights/enroute

Operator's en route flights.

GET /operators/{id}/flights/scheduled

Operator's scheduled flights.

Alerts

Setup Workflow

  1. Set default endpoint: PUT /alerts/endpoint
  2. Create alerts: POST /alerts
  3. Manage: GET/PUT/DELETE /alerts/{id}

Alert Events

Event Description Bundled
filed Flight plan filed yes*
departure Departure (actual off + changes) yes
arrival Arrival (actual on + changes) yes
cancelled Flight cancelled no
diverted Flight diverted no
out Pushed back from gate no
off Wheels off no
on Wheels on no
in Arrived at gate no
holdstart Entered holding pattern no
holdend Exited holding pattern no

*Bundled with departure

GET /alerts

Get all configured alerts.

POST /alerts

Create new alert.

{
  "ident": "UAL123",
  "origin": "KBOS",
  "destination": "KLAX",
  "events": {
    "departure": true,
    "arrival": true
  },
  "target_url": "https://my-webhook.example.com/alerts"
}

GET /alerts/{id}

Get specific alert.

PUT /alerts/{id}

Modify alert.

DELETE /alerts/{id}

Delete alert.

GET /alerts/endpoint

Get default callback URL.

PUT /alerts/endpoint

Set default callback URL.

{
  "url": "https://my-webhook.example.com/aeroapi"
}

DELETE /alerts/endpoint

Remove default callback URL.

History

Data available from 2011-01-01 to 15 days ago.

GET /history/aircraft/{registration}/lastflight

Aircraft's last known flight.

GET /history/airports/{id}/flights/arrivals

Historical arrivals (max 24hr span).

GET /history/airports/{id}/flights/departures

Historical departures (max 24hr span).

GET /history/airports/{id}/flights/to/{destid}

Historical flights between airports.

GET /history/flights/{id}/map

Historical flight track image.

GET /history/flights/{id}/route

Historical filed route.

GET /history/flights/{id}/track

Historical track positions.

GET /history/flights/{ident}

Historical flight info (max 7 day span).

# Get UAL123 flights from October 2024
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/history/flights/UAL123?start=2024-10-01&end=2024-10-07"

GET /history/operators/{id}/flights

Historical operator flights (max 24hr span).

Miscellaneous

GET /aircraft/{ident}/blocked

Check if aircraft is blocked from tracking.

GET /aircraft/{ident}/owner

Get aircraft owner info (US, AU, NZ).

curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/aircraft/N12345/owner"

GET /aircraft/types/{type}

Aircraft type info.

curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/aircraft/types/B738"

Response: manufacturer, type, description, engine_count, engine_type

GET /disruptioncounts/{entitytype}

Global cancellation/delay counts.

entitytype Description
airline By airline
origin By origin airport
destination By destination

Time periods: yesterday, today, tomorrow, plus2days, twoDaysAgo, minus2plus12hrs, next36hrs, week

GET /disruptioncounts/{entitytype}/{id}

Disruption counts for specific entity.

GET /schedules/{datestart}/{dateend}

Published airline schedules (3 months past to 1 year future).

Parameter Type Description
origin string Filter by origin
destination string Filter by destination
airline string Filter by airline
flightnumber int Filter by flight number
includecodeshares boolean Include codeshares (true)
includeregional boolean Include regional (true)

Account

GET /account/usage

API usage statistics.

Parameter Type Description
start string Start date (max 1 year back)
end string End date
allkeys boolean All keys or just current (false)

Common Response Structures

Pagination

{
  "links": { "next": "/aeroapi/...?cursor=..." },
  "num_pages": 1,
  "flights": [...]
}

Flight Object

{
  "ident": "UAL123",
  "ident_icao": "UAL123",
  "ident_iata": "UA123",
  "fa_flight_id": "UAL123-1234567890-airline-0123",
  "registration": "N12345",
  "operator": "UAL",
  "aircraft_type": "B738",
  "origin": {
    "code": "KBOS",
    "code_icao": "KBOS",
    "code_iata": "BOS",
    "timezone": "America/New_York",
    "name": "Boston Logan Intl",
    "city": "Boston"
  },
  "destination": {...},
  "scheduled_out": "2025-01-01T12:00:00Z",
  "estimated_out": "2025-01-01T12:05:00Z",
  "actual_out": "2025-01-01T12:07:00Z",
  "scheduled_off": "2025-01-01T12:15:00Z",
  "estimated_off": "2025-01-01T12:20:00Z",
  "actual_off": "2025-01-01T12:22:00Z",
  "scheduled_on": "2025-01-01T15:30:00Z",
  "estimated_on": "2025-01-01T15:25:00Z",
  "scheduled_in": "2025-01-01T15:40:00Z",
  "estimated_in": "2025-01-01T15:35:00Z",
  "status": "En Route",
  "progress_percent": 45,
  "route": "BOSRP5 DRUNK WITCH ACK J174 MERIT",
  "route_distance": 2586,
  "filed_altitude": 350,
  "filed_airspeed": 450,
  "departure_delay": 420,
  "arrival_delay": -300
}

Position Object

{
  "fa_flight_id": "UAL123-1234567890-airline-0123",
  "altitude": 350,
  "altitude_change": "C",
  "groundspeed": 485,
  "heading": 270,
  "latitude": 42.3656,
  "longitude": -71.0096,
  "timestamp": "2025-01-01T13:45:00Z",
  "update_type": "A"
}

Update types:

Code Source
P Projected
O Oceanic
Z Radar
A ADS-B
M Multilateration
D Datalink
X Surface (ADS-B/ASDE-X)
S Space-based
V Virtual event

KBOS-Specific Examples

# Boston airport info
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS"

# Current arrivals at Boston
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS/flights/arrivals"

# Scheduled departures
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS/flights/scheduled_departures"

# Boston weather
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS/weather/observations"

# Flights in Boston area below 10000ft
curl -H "x-apikey: $AEROAPI_KEY" \
  'https://aeroapi.flightaware.com/aeroapi/flights/search?query=-latlong "41.5 -72.5 43.5 -69.5" -belowAltitude 100'

# JetBlue flights at Boston
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS/flights?airline=JBU"

# Routes BOS to LAX
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS/routes/KLAX"

# Boston delays
curl -H "x-apikey: $AEROAPI_KEY" \
  "https://aeroapi.flightaware.com/aeroapi/airports/KBOS/delays"

Python Client Example

Official FlightAware Pattern (from aeroapps)

import os
import requests
from flask import Flask, abort
from flask_caching import Cache

AEROAPI_BASE_URL = "https://aeroapi.flightaware.com/aeroapi"
AEROAPI_KEY = os.environ["AEROAPI_KEY"]

# Create session with auth header
AEROAPI = requests.Session()
AEROAPI.headers.update({"x-apikey": AEROAPI_KEY})

# Make request
result = AEROAPI.get(f"{AEROAPI_BASE_URL}/airports/KBOS")
if result.status_code != 200:
    abort(result.status_code)
data = result.json()

Simple CLI Client

#!/usr/bin/env python3
"""Simple AeroAPI client example."""

import os
import requests
from typing import Optional

AEROAPI_BASE = "https://aeroapi.flightaware.com/aeroapi"

def aeroapi_request(endpoint: str, params: Optional[dict] = None) -> dict:
    """Make authenticated request to AeroAPI."""
    api_key = os.environ.get("AEROAPI_KEY")
    if not api_key:
        raise ValueError("AEROAPI_KEY environment variable not set")

    headers = {"x-apikey": api_key}
    url = f"{AEROAPI_BASE}{endpoint}"

    response = requests.get(url, headers=headers, params=params)
    response.raise_for_status()
    return response.json()

def get_airport_info(icao: str) -> dict:
    """Get airport information."""
    return aeroapi_request(f"/airports/{icao}")

def get_airport_arrivals(icao: str, airline: Optional[str] = None) -> dict:
    """Get recent arrivals at airport."""
    params = {"airline": airline} if airline else None
    return aeroapi_request(f"/airports/{icao}/flights/arrivals", params)

def get_flight_position(fa_flight_id: str) -> dict:
    """Get current position for flight."""
    return aeroapi_request(f"/flights/{fa_flight_id}/position")

def search_flights(query: str) -> dict:
    """Search for flights."""
    return aeroapi_request("/flights/search", {"query": query})

def get_weather(icao: str) -> dict:
    """Get current weather at airport."""
    return aeroapi_request(f"/airports/{icao}/weather/observations")

if __name__ == "__main__":
    import json
    import sys

    if len(sys.argv) < 2:
        print("Usage: aeroapi-client.py <command> [args]")
        print("Commands: airport, arrivals, weather, search")
        sys.exit(1)

    cmd = sys.argv[1]

    if cmd == "airport" and len(sys.argv) > 2:
        result = get_airport_info(sys.argv[2])
    elif cmd == "arrivals" and len(sys.argv) > 2:
        result = get_airport_arrivals(sys.argv[2])
    elif cmd == "weather" and len(sys.argv) > 2:
        result = get_weather(sys.argv[2])
    elif cmd == "search" and len(sys.argv) > 2:
        result = search_flights(" ".join(sys.argv[2:]))
    else:
        print(f"Unknown command or missing args: {cmd}")
        sys.exit(1)

    print(json.dumps(result, indent=2))

Resources

Author: hydra-setup

jwalsh@nexus

Last Updated: 2025-12-29 17:08:19

build: 2026-04-17 18:35 | sha: 792b203