Skip to content
Scrappa Get API key
FlightAware API 2-10 credits / request

FlightAware Flight API Documentation

GET https://scrappa.co/api/flightaware/flight

FlightAware Flight API Documentation Get one leg of a flight number (LH400) or of an aircraft registration on a UTC departure date. The leg has the gate departure, takeoff, landing and gate arrival, each scheduled, estimated and actual in UTC, with delay, status, aircraft type, airline, both airports with gate and terminal, the filed route and the distance. Add track=1 for the track points with time, position, altitude and speed. The date is the UTC date of the scheduled departure. The answer also has the local date of each airport. Dates reach back 1500 days (a measured depth, not a limit of FlightAware). Legs of the last 14 days are read from the history list. For an older date the API searches the scheduled departure time around the times of the same flight today. The answer shows found_by (list, cache, scan or exact) and lookups. Pass origin, destination and time (HHMM, UTC) when you know them: this costs one lookup and no search. About 75 to 85 percent of old legs of a flight number are found by the search. Flights that moved their departure by more than 30 minutes between seasons (for example CX250 in summer 30 minutes before its time of today), charters and flight numbers with several legs a day are found less often. A registration flies different flights each day, so the search rarely finds its leg: pass origin, destination and time for a registration. A leg that is not found answers 404 and costs no credit. Pass origin, destination and time (HHMM, UTC) to look up one exact leg. An IATA flight number of a major airline (JL5, NH10, CX250) is named by its ICAO airline code; for another airline use the ICAO flight number (DLH400). The tail of an old leg looked up by flight number is hidden by FlightAware: aircraft.tail is null, never a guess. Look up by registration to get the tail. Cost: 2 credits for a leg of the last 14 days, 10 credits for an older leg. A leg that is not found and every failure cost nothing.

FlightAware Flight API Documentation 2-10 credits / request

Endpoint

Request preview
GET
https://scrappa.co/api/flightaware/flight
Auth header
x-api-key
Cost
2-10 credits / request
ident = example date = 2026-06-15
Response preview
200 OK
{
    "data": {
        "leg": {
            "delay": {
                "arrival_minutes": 15,
                "departure_minutes": 13
            },
            "ident": "DLH400",
            "times": {
                "landing": {
                    "actual": "2026-03-15T18:47:00Z",
                    "estimated": "2026-03-15T18:47:00Z",
                    "scheduled": "2026-03-15T18:05:00Z"
                },
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

2 required parameters needed before sending a request.

5 optional filters available.

ident string Required

Flight number or registration, e.g. LH400, DLH400 or D-AIXO.

Example value example
date string Required

UTC date of the scheduled departure, YYYY-MM-DD. Up to 1500 days back.

Example value 2026-06-15
fetch_by string Optional

flight (default) or reg.

Example value example
origin string Optional

ICAO code of the departure airport, e.g. EDDF. Narrows the search.

Example value example
destination string Optional

ICAO code of the arrival airport, e.g. KJFK. Narrows the search.

Example value example
time string Optional

Scheduled departure as HHMM in UTC, e.g. 1010. With origin and destination it skips the search.

Example value example
track boolean Optional

Set to 1 to add the track points. Default: 0.

Example value true

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "leg": {
            "delay": {
                "arrival_minutes": 15,
                "departure_minutes": 13
            },
            "ident": "DLH400",
            "times": {
                "landing": {
                    "actual": "2026-03-15T18:47:00Z",
                    "estimated": "2026-03-15T18:47:00Z",
                    "scheduled": "2026-03-15T18:05:00Z"
                },
                "takeoff": {
                    "actual": "2026-03-15T10:33:00Z",
                    "estimated": "2026-03-15T10:33:00Z",
                    "scheduled": "2026-03-15T10:10:00Z"
                },
                "gate_arrival": {
                    "actual": "2026-03-15T19:05:00Z",
                    "estimated": "2026-03-15T18:45:00Z",
                    "scheduled": "2026-03-15T18:50:00Z"
                },
                "gate_departure": {
                    "actual": "2026-03-15T10:13:00Z",
                    "estimated": "2026-03-15T10:10:00Z",
                    "scheduled": "2026-03-15T10:00:00Z"
                }
            },
            "track": [
                {
                    "lat": 60.596,
                    "lon": -24.6082,
                    "time": "2026-03-15T13:32:28Z",
                    "speed_kt": 459,
                    "altitude_ft": 36000
                },
                {
                    "lat": 53.108,
                    "lon": -60.9128,
                    "time": "2026-03-15T16:21:54Z",
                    "speed_kt": 449,
                    "altitude_ft": 38000
                }
            ],
            "origin": {
                "lat": 50.0333,
                "lon": 8.5705,
                "city": "Frankfurt, Germany",
                "gate": "Z69",
                "iata": "FRA",
                "icao": "EDDF",
                "name": "Frankfurt/Main",
                "terminal": "1",
                "timezone": "Europe/Berlin",
                "scheduled_local_date": "2026-03-15"
            },
            "status": {
                "raw": "arrived",
                "live": false,
                "text": "Landed",
                "state": "landed",
                "diverted": false,
                "cancelled": false
            },
            "airline": {
                "iata": "LH",
                "icao": "DLH",
                "name": "Deutsche Lufthansa, A.G.",
                "callsign": "Lufthansa"
            },
            "aircraft": {
                "hex": null,
                "tail": null,
                "type": "A346",
                "model": "A340-600",
                "owner": null,
                "type_name": "Airbus A340-600 (quad-jet)",
                "engine_type": "jet",
                "tail_hidden": true,
                "engine_count": 4,
                "manufacturer": "Airbus"
            },
            "flight_id": "DLH400-1773388371-airline-1103p:0",
            "permalink": "/live/flight/DLH400/history/20260315/1010Z/EDDF/KJFK",
            "taxi_in_s": null,
            "iata_ident": "LH400",
            "taxi_out_s": null,
            "destination": {
                "lat": 40.6399,
                "lon": -73.7787,
                "city": "New York, NY",
                "gate": "5",
                "iata": "JFK",
                "icao": "KJFK",
                "name": "John F Kennedy Intl",
                "terminal": "1",
                "timezone": "America/New_York",
                "scheduled_local_date": "2026-03-15"
            },
            "distance_nm": {
                "flown": 3539,
                "direct": 3346,
                "planned": 3764
            },
            "flight_plan": {
                "route": "ULKIG4L ULKIG Y180 DIK CAMRN5",
                "speed_kt": 428,
                "cruise_altitude_ft": 38000,
                "estimated_time_enroute_s": 28500
            },
            "track_points": 6
        },
        "date": "2026-03-15",
        "ident": "DLH400",
        "query": "LH400",
        "lookups": 3,
        "fetch_by": "flight",
        "found_by": "scan",
        "date_basis": "UTC date of the scheduled departure",
        "source_url": "https://www.flightaware.com/live/flight/DLH400/history/20260315/1010Z/EDDF/KJFK"
    },
    "meta": {
        "billable": true,
        "credits_charged": 10,
        "endpoint_family": "flight"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "date": [
            "The UTC departure date is required, e.g. 2026-03-15."
        ]
    },
    "message": "The request validation failed"
}
404

Not Found

FlightAware has no leg of this flight on that date, or its departure time was not found. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "flight"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "FlightAware has no leg of this flight on that date. The flight may not have operated, or its departure time or route was not found. Add origin, destination and time (HHMM, UTC) if you know them."
    },
    "success": false
}
503

Service Unavailable

FlightAware could not be reached or changed its answer. This response is not billable. Retry later.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "flight"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "FlightAware is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.