# Airportia Flight History API Documentation

<p><strong>Airportia Flight History API Documentation</strong> Read the table of the last 10 days of a flight number (LH1392). Pass the flight number. The route is found automatically for any flight that flew in the last 7 days. Pass origin and destination (IATA codes, e.g. FRA and PRG) to look up a flight that did not fly in the last 7 days, or to pick one route when a flight number has several: the newest route is used and all routes are listed in routes. Each leg has the date, route, airline, status and the time Airportia shows (the actual time when known, otherwise the scheduled time), in local time and UTC. Scheduled and actual times, delay, terminal, gate, aircraft type and registration are not part of this table: those fields are null. If no route can be found, the answer is 404: send origin and destination. Older history is not available. An empty answer and every failed request cost no credit. Cost: 1 credit per successful request. Scrappa is an independent service and is not affiliated with Airportia.</p>

- **Documentation:** [https://scrappa.co/docs/airportia-api/airportia_flight_history](https://scrappa.co/docs/airportia-api/airportia_flight_history)
- **API group:** Airportia API
- **Endpoint:** `GET https://scrappa.co/api/airportia/flight-history`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Flight number, e.g. LH1392 or DLH1392. |
| `origin` | string | No | IATA code of the departure airport, e.g. FRA. Optional: the route is found from the flight number. Use it with destination to look up a route yourself, or to pick one route. |
| `destination` | string | No | IATA code of the arrival airport, e.g. PRG. Optional. Picks one route of a flight number. |

## Example response

```json
{
    "data": {
        "count": 10,
        "query": "LH1392",
        "routes": [
            {
                "origin": "FRA",
                "destination": "PRG"
            }
        ],
        "flights": [
            {
                "date": "2026-11-13",
                "origin": {
                    "iata": "FRA",
                    "icao": "EDDF",
                    "name": "Frankfurt Airport",
                    "timezone": "Europe/Berlin"
                },
                "source": "airportia",
                "status": "Landed",
                "airline": {
                    "iata": "LH",
                    "name": "Lufthansa"
                },
                "arrival": {
                    "gate": null,
                    "baggage": null,
                    "terminal": null,
                    "actual_utc": null,
                    "actual_local": null,
                    "delay_minutes": null,
                    "scheduled_utc": null,
                    "shown_time_utc": "2026-11-13T08:39:00Z",
                    "scheduled_local": null,
                    "shown_time_local": "2026-11-13T09:39:00+01:00"
                },
                "aircraft": {
                    "model": null,
                    "registration": null
                },
                "departure": {
                    "gate": null,
                    "baggage": null,
                    "terminal": null,
                    "actual_utc": null,
                    "actual_local": null,
                    "delay_minutes": null,
                    "scheduled_utc": null,
                    "shown_time_utc": "2026-11-13T07:50:00Z",
                    "scheduled_local": null,
                    "shown_time_local": "2026-11-13T08:50:00+01:00"
                },
                "destination": {
                    "iata": "PRG",
                    "icao": "LKPR",
                    "name": "Prague Vaclav Havel Airport",
                    "timezone": "Europe/Prague"
                },
                "status_state": "landed",
                "flight_number": "LH1392"
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "oldest_date": "2026-11-05",
        "window_days": 10,
        "endpoint_family": "flight_history"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. This response is not billable. |
| 404 | Not Found | No route was found for the flight number, or the flight page does not exist. Send origin and destination (IATA codes). This response is not billable. |
| 503 | Service Unavailable | Airportia could not be reached or changed its page. This response is not billable. Retry later. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
