FlightAware AeroAPI 4.28.0 Reference
Table of Contents
- 1. Overview
- 2. Flights
- 2.1. GET /flights/{id}/map
- 2.2. GET /flights/{id}/position
- 2.3. GET /flights/{id}/route
- 2.4. GET /flights/{id}/track
- 2.5. GET /flights/{ident}
- 2.6. GET /flights/{ident}/canonical
- 2.7. POST /flights/{ident}/intents
- 2.8. GET /flights/search
- 2.9. GET /flights/search/advanced
- 2.10. GET /flights/search/count
- 2.11. GET /flights/search/positions
- 3. Foresight (Premium)
- 4. Airports
- 4.1. GET /airports
- 4.2. GET /airports/{id}
- 4.3. GET /airports/{id}/canonical
- 4.4. GET /airports/{id}/delays
- 4.5. GET /airports/{id}/flights
- 4.6. GET /airports/{id}/flights/arrivals
- 4.7. GET /airports/{id}/flights/counts
- 4.8. GET /airports/{id}/flights/departures
- 4.9. GET /airports/{id}/flights/scheduled_arrivals
- 4.10. GET /airports/{id}/flights/scheduled_departures
- 4.11. GET /airports/{id}/flights/to/{dest_id}
- 4.12. GET /airports/{id}/nearby
- 4.13. GET /airports/{id}/routes/{dest_id}
- 4.14. GET /airports/{id}/weather/forecast
- 4.15. GET /airports/{id}/weather/observations
- 4.16. GET /airports/delays
- 4.17. GET /airports/nearby
- 5. Operators
- 6. Alerts
- 7. History
- 7.1. GET /history/aircraft/{registration}/last_flight
- 7.2. GET /history/airports/{id}/flights/arrivals
- 7.3. GET /history/airports/{id}/flights/departures
- 7.4. GET /history/airports/{id}/flights/to/{dest_id}
- 7.5. GET /history/flights/{id}/map
- 7.6. GET /history/flights/{id}/route
- 7.7. GET /history/flights/{id}/track
- 7.8. GET /history/flights/{ident}
- 7.9. GET /history/operators/{id}/flights
- 8. Miscellaneous
- 9. Account
- 10. Common Response Structures
- 11. KBOS-Specific Examples
- 12. Python Client Example
- 13. Resources
1. Overview
AeroAPI is FlightAware's RESTful API for aviation data access.
- Base URL:
https://aeroapi.flightaware.com/aeroapi - Auth: API key in
x-apikeyheader - Official OpenAPI Spec: https://static.flightaware.com/rsrc/aeroapi/aeroapi-openapi.yml
1.1. Authentication
curl -H "x-apikey: YOUR_API_KEY" \ "https://aeroapi.flightaware.com/aeroapi/airports/KBOS"
1.2. 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 |
2. Flights
2.1. GET /flights/{id}/map
Get flight track as base64-encoded image.
| Parameter | Type | Description |
|---|---|---|
| id (path) | string | fa_flight_id |
| height | integer | Image height (1-1500, default 480) |
| width | integer | Image width (1-1500, default 640) |
| layer_on | array | Map layers to enable |
| layer_off | array | Map layers to disable |
| show_data_block | boolean | Show caption (default false) |
| airports_expand_view | boolean | Zoom to show airports |
| show_airports | boolean | Show origin/destination |
| bounding_box | array | Custom bounds [top,right,bottom,left] |
2.2. 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"
2.3. GET /flights/{id}/route
Get flight's filed route with waypoints.
2.4. GET /flights/{id}/track
Get flight track as array of positions.
| Parameter | Type | Description |
|---|---|---|
| include_estimated_positions | boolean | Include estimated (default no) |
| include_surface_positions | boolean | Include taxi (default no) |
2.5. GET /flights/{ident}
Get flight info for registration, ident, or fa_flight_id.
| Parameter | Type | Description |
|---|---|---|
| ident | string | Flight ident, registration, or fa_flight_id |
| ident_type | enum | designator, registration, fa_flight_id |
| start | string | ISO8601 start date (max 10 days past) |
| end | string | ISO8601 end date (max 2 days future) |
| max_pages | 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"
2.6. GET /flights/{ident}/canonical
Get all possible codes for ambiguous ident.
2.7. POST /flights/{ident}/intents
Submit flight intent (requires FlightAware Global subscription).
2.8. 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'
2.9. 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*}'
2.10. GET /flights/search/count
Get count of flights matching search parameters.
2.11. GET /flights/search/positions
Search flight positions (all positions, not just latest).
3. Foresight (Premium)
FlightAware's ML-enhanced predictions. Requires Premium tier.
3.1. GET /foresight/flights/{id}/position
Position with Foresight predictions.
Additional response fields:
predicted_out,predicted_off,predicted_on,predicted_inpredicted_*_source(Foresight or Historical Average)predicted_taxi_out_duration
3.2. GET /foresight/flights/{ident}
Flight info with Foresight data.
3.3. GET /foresight/flights/search/advanced
Search with Foresight predictions included.
4. Airports
4.1. GET /airports
List all known airports.
4.2. 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_lidname,type,elevationcity,state,country_codelatitude,longitude,timezonewiki_url,airport_flights_urlalternatives(nearby airports)
4.3. GET /airports/{id}/canonical
Get ICAO code for IATA/LID.
4.4. GET /airports/{id}/delays
Get airport delay reasons.
Response colors: red, yellow, green
4.5. GET /airports/{id}/flights
Get all flights (arrivals, departures, scheduled).
| Parameter | Type | Description |
|---|---|---|
| airline | string | Filter by airline (e.g., UAL) |
| type | enum | General_Aviation or Airline |
| start | string | ISO8601 start |
| end | string | ISO8601 end |
4.6. GET /airports/{id}/flights/arrivals
Recent arrivals (ordered by actual_on desc).
4.7. GET /airports/{id}/flights/counts
Flight counts by status.
Response:
departed,enroute,scheduled_arrivals,scheduled_departures
4.8. GET /airports/{id}/flights/departures
Recent departures (ordered by actual_off desc).
4.9. GET /airports/{id}/flights/scheduled_arrivals
Expected arrivals (ordered by estimated_on asc).
4.10. GET /airports/{id}/flights/scheduled_departures
Scheduled departures (ordered by estimated_off asc).
4.11. GET /airports/{id}/flights/to/{dest_id}
Flights between two airports.
| Parameter | Type | Description |
|---|---|---|
| connection | enum | nonstop or onestop |
4.12. GET /airports/{id}/nearby
Airports within radius.
| Parameter | Type | Description |
|---|---|---|
| radius | integer | Search radius (statute miles) |
| only_iap | boolean | Only with instrument approaches |
4.13. GET /airports/{id}/routes/{dest_id}
IFR routings between airports.
4.14. GET /airports/{id}/weather/forecast
Decoded TAF (Terminal Area Forecast).
4.15. 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"
4.16. GET /airports/delays
All airports with delays.
4.17. 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"
5. Operators
5.1. GET /operators
List all operators.
5.2. GET /operators/{id}
Operator info (name, ICAO/IATA, location, etc.).
curl -H "x-apikey: $AEROAPI_KEY" \ "https://aeroapi.flightaware.com/aeroapi/operators/UAL"
5.3. GET /operators/{id}/canonical
Get canonical ICAO code for operator.
5.4. GET /operators/{id}/flights
All operator flights (scheduled, arrivals, enroute).
5.5. GET /operators/{id}/flights/arrivals
Operator's arrived flights.
5.6. GET /operators/{id}/flights/counts
Operator flight counts.
Response: airborne, flights_last_24_hours
5.7. GET /operators/{id}/flights/enroute
Operator's en route flights.
5.8. GET /operators/{id}/flights/scheduled
Operator's scheduled flights.
6. Alerts
6.1. Setup Workflow
- Set default endpoint:
PUT /alerts/endpoint - Create alerts:
POST /alerts - Manage:
GET/PUT/DELETE /alerts/{id}
6.2. 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 |
| hold_start | Entered holding pattern | no |
| hold_end | Exited holding pattern | no |
*Bundled with departure
6.3. GET /alerts
Get all configured alerts.
6.4. POST /alerts
Create new alert.
{
"ident": "UAL123",
"origin": "KBOS",
"destination": "KLAX",
"events": {
"departure": true,
"arrival": true
},
"target_url": "https://my-webhook.example.com/alerts"
}
6.5. GET /alerts/{id}
Get specific alert.
6.6. PUT /alerts/{id}
Modify alert.
6.7. DELETE /alerts/{id}
Delete alert.
6.8. GET /alerts/endpoint
Get default callback URL.
6.9. PUT /alerts/endpoint
Set default callback URL.
{
"url": "https://my-webhook.example.com/aeroapi"
}
6.10. DELETE /alerts/endpoint
Remove default callback URL.
7. History
Data available from 2011-01-01 to 15 days ago.
7.1. GET /history/aircraft/{registration}/last_flight
Aircraft's last known flight.
7.2. GET /history/airports/{id}/flights/arrivals
Historical arrivals (max 24hr span).
7.3. GET /history/airports/{id}/flights/departures
Historical departures (max 24hr span).
7.4. GET /history/airports/{id}/flights/to/{dest_id}
Historical flights between airports.
7.5. GET /history/flights/{id}/map
Historical flight track image.
7.6. GET /history/flights/{id}/route
Historical filed route.
7.7. GET /history/flights/{id}/track
Historical track positions.
7.8. 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"
7.9. GET /history/operators/{id}/flights
Historical operator flights (max 24hr span).
8. Miscellaneous
8.1. GET /aircraft/{ident}/blocked
Check if aircraft is blocked from tracking.
8.2. 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"
8.3. 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
8.4. GET /disruption_counts/{entity_type}
Global cancellation/delay counts.
| entity_type | Description |
|---|---|
| airline | By airline |
| origin | By origin airport |
| destination | By destination |
Time periods: yesterday, today, tomorrow, plus2days, twoDaysAgo, minus2plus12hrs, next36hrs, week
8.5. GET /disruption_counts/{entity_type}/{id}
Disruption counts for specific entity.
8.6. GET /schedules/{date_start}/{date_end}
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 |
| flight_number | int | Filter by flight number |
| include_codeshares | boolean | Include codeshares (true) |
| include_regional | boolean | Include regional (true) |
9. Account
9.1. GET /account/usage
API usage statistics.
| Parameter | Type | Description |
|---|---|---|
| start | string | Start date (max 1 year back) |
| end | string | End date |
| all_keys | boolean | All keys or just current (false) |
10. Common Response Structures
10.1. Pagination
{
"links": { "next": "/aeroapi/...?cursor=..." },
"num_pages": 1,
"flights": [...]
}
10.2. 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
}
10.3. 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 |
11. 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"
12. Python Client Example
12.1. 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()
12.2. 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))
13. Resources
- Official Docs: https://www.flightaware.com/aeroapi/portal/documentation
- OpenAPI Spec: https://static.flightaware.com/rsrc/aeroapi/aeroapi-openapi.yml
- AeroApps Examples: https://github.com/flightaware/aeroapps
- Python Backend: https://github.com/flightaware/aeroapps/tree/main/backend/python
- FIDS Example: Multi-tier flight display with caching
- Alerts Example: Dockerized Python + React for push alerts
- Push Notification Testing: https://www.flightaware.com/commercial/aeroapi/send.rvt
- Pricing: Contact integrationsales@flightaware.com (Foresight requires Premium tier)