# Airport Flight Status — Arrivals, Departures & Change Webhook (`apimy/airport-flight-status`) Actor

Get airport boards and flight status for any airport by IATA code; webhook on change. Official boards if available (KWI), else flight trackers. Typical run: a 60-flight board for 3 airports in about 10 seconds. Example input: {"airports":\["DXB","LHR","JFK"],"direction":"arrivals","maxFlights":20}

- **URL**: https://apify.com/apimy/airport-flight-status.md
- **Developed by:** [Nikita Iakovlev](https://apify.com/apimy) (community)
- **Categories:** Travel
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 flight checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Airport Flight Status — Arrivals, Departures & Change Webhook

Get the **live arrivals and departures board** of an airport and the **status of any flight by flight number** — scheduled, estimated and actual time, status, terminal and gate — for **any airport by its IATA code** (DXB, JFK, LHR, BKK, DPS, CAI…). Official airport boards where available (Kuwait International), other airports via a public flight-tracking source. Put it on a schedule and it **sends a webhook only when a flight changes**: new status, new time, new gate or terminal.

**Typical run:** a 60-flight arrivals board for 3 airports in about 10 seconds.

**Example input:** `{"airports": ["DXB", "LHR", "JFK"], "direction": "arrivals", "maxFlights": 20}`

> **Server / API mode — ask for a board or a flight and get it in the HTTP response, no run to wait for.** `https://apimy--airport-flight-status.apify.actor` (up to 5 airports and 20 flights per request, `maxFlights` 50 by default). Same price: one `flight-check` per flight row, **no start fee** in server mode, notices are free.
>
> ```bash
> curl -H "Authorization: Bearer $APIFY_TOKEN" "https://apimy--airport-flight-status.apify.actor/?airports=DXB&direction=arrivals&maxFlights=20"
> curl -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" -d '{"flights":["KU101","EK2"]}' https://apimy--airport-flight-status.apify.actor/
> ```

curl -H "Authorization: Bearer $APIFY_TOKEN" "https://apimy--airport-flight-status.apify.actor/?flights=EK221,QR731\&includePosition=true"

> ```
>
> Response: `{"count": 1, "rows": [{"type": "flight", "flightNumber": "KU101", "status": "departed", "scheduledTime": "…", "gate": "…", …}], "notices": [], "charged": {"flight-check": 1}, "durationMs": 4577}`
> ```

### What you can do with it

- **Airport board** — every arrival and/or departure of any airport within a time window around now (`airports`, `direction`, `hoursBefore`, `hoursAfter`, `maxFlights`).
- **Flight status by number and date** — `flights: ["KU101 2026-11-25", "EK2", "BA117 LHR"]`. A number alone is enough: the Actor finds where the flight departs and lands and returns both ends. One row per flight found, or a free notice that says why it is not there (wrong number, date too far ahead, board not readable right now).
- **Tracking with a webhook** — schedule the Actor every 5 minutes, set `webhookUrl`, and you get a POST only for flights that are new or changed since the previous run, each with `changes: [{field, from, to}]`. Flights that landed or departed more than `finishedAfterHours` ago, and cancelled flights, drop out of tracking by themselves and are not billed again.
- **Live aircraft position for a map** — `includePosition: true` adds `position` to each flight row: latitude, longitude, altitude, ground speed, heading and the time of the last position (usually seconds old). `includeTrack: true` adds the path flown so far. Poll it every minute (server mode below) to move planes on your map.
- **Bulk** — hundreds of flight numbers in one run: each airport board is loaded once per run, so a long list costs no extra time.

### Input

| Field | What it does |
|---|---|
| `airports` | IATA codes of the boards you want, any airport: `DXB`, `JFK`, `KWI`… (ICAO codes like `OMDB` work too). An unknown code gets a free notice. |
| `flights` | Flight numbers, one per line, with optional date and airport: `KU101 2026-11-25`, `MS 778`, `EY713 today CAI`, or objects `{"flightNumber": "KU101", "date": "2026-11-25", "airport": "KWI"}`. IATA (KU101) and ICAO (KAC101) numbers both work. The date is the **departure** date, as on the ticket; `today` / `tomorrow` are counted at the departure airport (or at the airport you name). Without a date you get the flight in the air now, else the one nearest to now. Without an airport the Actor finds the flight's own airports and returns the departure at its origin and the arrival at its destination **of the same flight** — an overnight flight (EK2 London 13:40 → Dubai 00:45) lands the next local day, and its arrival row says so. |
| `maxFlights` | Board mode: flights per airport and direction, closest to now first (default 200, 0 = all in the window). |
| `direction` | `both` (default), `arrivals` or `departures`. |
| `hoursBefore` / `hoursAfter` | Board window around now (default 2 h back, 12 h ahead). |
| `includePosition` | Add the live aircraft position (`position`) to each flight row. Off by default. |
| `includeTrack` | Also add `track`, the path flown so far (oldest point first). Heavy: a long-haul flight is 1,000–4,000 points. Turns on `includePosition`. Off by default. |
| `webhookUrl` | Where to POST changes. Optional. |
| `onlyChanges` | Remember flights between runs. Board mode: write only new or changed flights. Flight-number mode: every checked flight is written with `change` = `new` / `changed` / `unchanged`; only `new` and `changed` rows are billed, `unchanged` re-checks are free (`billed: false`). On by default when a webhook is set. |
| `finishedAfterHours` | Stop tracking a flight this many hours after it landed or departed (default 2). |
| `watchName` | Optional name that keeps one tracking memory even when your flight list changes between runs. |

### Output

One row per flight:

```json
{
  "type": "flight",
  "flightId": "KWI-D-KU543-2026-11-23",
  "airport": "KWI",
  "airportName": "Kuwait International Airport",
  "direction": "departure",
  "flightNumber": "KU543",
  "flightNumberIcao": "KAC543",
  "airline": "Kuwait Airways",
  "origin": { "iata": "KWI", "name": "Kuwait International Airport", "city": "Kuwait City", "country": "Kuwait" },
  "destination": { "iata": "CAI", "name": "Cairo International Airport", "city": "Cairo", "country": "Egypt" },
  "date": "2026-11-23",
  "departureDate": "2026-11-23",
  "scheduledTime": "2026-11-23T23:20:00+03:00",
  "estimatedTime": null,
  "actualTime": null,
  "delayMinutes": null,
  "status": "scheduled",
  "statusRaw": null,
  "terminal": "T4",
  "gate": "63",
  "source": "kuwaitairport.gov.kw",
  "change": "changed",
  "changes": [{ "field": "gate", "from": "61", "to": "63" }]
}
```

#### Live position (`includePosition`)

```json
"position": {
  "latitude": 36.4241, "longitude": -96.3668,
  "altitudeFt": 36000, "groundSpeedKts": 446, "heading": 213,
  "timestamp": "2026-11-23T14:32:01.000Z",
  "onGround": false, "verticalSpeedFpm": 0, "estimated": false
},
"positionNote": null,
"track": [{ "latitude": 25.246353, "longitude": 55.363758, "altitudeFt": 0, "groundSpeedKts": 0, "heading": 30, "timestamp": "2026-11-22T22:40:17.000Z" }, …]
```

- `timestamp` is when the aircraft reported this position (UTC); `heading` is degrees from north; `estimated: true` means the plane is outside receiver coverage and the source extrapolates it.

- A flight that is not in the air has `position: null` and a `positionNote` that says why: not departed yet, landed, cancelled, or in the air but out of coverage right now. That is not an error and costs the same as the flight row.

- The position comes from Flightradar24's live map for every airport, including Kuwait (the official board has no positions). One position lookup answers several flights, so it adds about a second to a run; `includeTrack` adds one request per airborne flight.

- **`date`** is the local date at this row's airport; **`departureDate`** is the flight's date as on the ticket (local departure date at the origin). They differ on an overnight arrival: EK2 departing London on 23 Nov has `date: "2026-11-24"`, `departureDate: "2026-11-23"` on its Dubai arrival row. Both rows of one flight also share `sourceFlightId` when the source is Flightradar24. `departureDate` is `null` on Kuwait official-board arrival rows that were not matched through the flight list (that board does not publish the departure time).

- **A number that flies several sectors** (QF1 Sydney → Singapore → London): without a date you get the sector nearest to now; with a date, every sector that departs on that date. An end of the flight that its airport does not publish yet (an arrival two days ahead) comes as a free notice that says when it lands.

- **`flightId`** is stable across runs (airport, direction, flight number, local date) — use it as your key.

- **Times** are ISO 8601 in the airport's own time zone (`+03:00` Kuwait, `+04:00` Dubai, `-05:00` New York in winter); `timeZone` names it (`Asia/Dubai`).

- **`delayMinutes`** — actual (or estimated) minus scheduled time; negative means early.

- **`status`** is normalised: `scheduled`, `on-time`, `early`, `delayed`, `boarding`, `gate-closed`, `departed`, `en-route`, `landed`, `cancelled`, `diverted`, `unknown`; `statusRaw` keeps the airport's own words.

- **`gate`** / **`terminal`** are `null` where the airport does not publish them (Cairo, Dubai arrivals and Egyptian resort airports publish almost no gates).

- **`source`** says where the row came from: `kuwaitairport.gov.kw` (official board) or `flightradar24.com`.

- Rows with `type: "notice"` or `"error"` are free explanations, not flights — filter them out with `type = flight`.

#### Webhook body

```json
{ "event": "flight-changes", "runId": "…", "watch": "w-…", "checkedAt": "2026-11-23T10:35:00.000Z", "count": 2, "flights": [ { …flight row with change and changes… } ] }
```

Only sent when at least one flight is new or changed. If your endpoint does not answer 2xx (three tries), the run writes a free notice and the same changes are sent again on the next run — nothing is lost.

### How to track flights every 5 minutes

1. Fill `flights` (or `airports`) and `webhookUrl`, click **Save**.
2. In Apify Console open **Schedules → Create**, pick this Actor and its saved input, cron `*/5 * * * *`.
3. The first run sends every flight as `new`; after that only changes arrive.

### Where the data comes from

- **Official airport boards where we have them — KWI:** the Kuwait International Airport flight-status board (kuwaitairport.gov.kw) — status, terminal, gate, baggage zone. If it does not answer, the run switches to Flightradar24.
- **Every other airport:** the Flightradar24 airport schedule, a public flight-tracking source (status, times, terminal, gate where published, aircraft). Not the airport's own website — check `source` in each row.
- **CAI:** Flightradar24 first; the official cairo-airport.com board is the backup (it published an empty table on 23.11.2026).
- Boards cover about **yesterday to tomorrow**. A flight further ahead gets a free notice and is picked up by a scheduled run once the airport publishes it.
- When a board cannot be read, the row is a free `error` explaining it — you are never billed for an empty answer.

### Pricing

Pay per event: **$0.001 per flight row** (one flight on a board, or one flight-number check), cheaper on paid Apify plans ($0.0009 Bronze, $0.0008 Silver, $0.0007 Gold and up), plus a $0.005 start fee per run (none in server mode). Notices, errors and the run summary are free. No monthly rent.

**Tracking pays only for changes.** With `onlyChanges` on (default when a webhook is set), a flight is billed the first time it is seen and each time its status, a time, the gate or the terminal changes. Unchanged re-checks are free (`billed: false`).

**With `includePosition`, a flight in the air is a changed flight on every run** — its position moved — so with `onlyChanges` it is written and billed ($0.001) each run while it flies; on the ground it is billed only for real changes as above. The webhook is not affected: it still fires only for new flights and for status, time, gate or terminal changes (`changes` stays empty for a position-only update); the position rides along in the rows that go out for those reasons. A plane still in the air also stays tracked past `finishedAfterHours` until it lands. Example: a map of 20 flights in the air polled every minute = 20 × 60 × $0.001 = $1.20 per hour of flying.

Examples: a 20-flight board = $0.02 + $0.005. Tracking 100 flights every 5 minutes = 288 runs a day × $0.005 = $1.44 a day, plus $0.001 per change (a flight typically changes 5–10 times over its day).

### Official boards

Kuwait (KWI) is read from the airport's own board today. Want the official board of your airport instead of the flight-tracking source? Open an issue on the Actor page with the IATA code.

### Related

- [Google Flights Scraper](https://apify.com/lergassy/google-flights-scraper) — prices and schedules for routes and dates.

# Changelog

This Actor's version history is a separate document: https://apify.com/apimy/airport-flight-status/changelog.md

# Actor input Schema

## `airports` (type: `array`):

IATA codes of any airports whose board you want, e.g. "DXB", "JFK", "KWI" (ICAO codes like "OMDB" work too). Official airport boards where available (Kuwait), other airports via a public flight-tracking source (Flightradar24) — see `source` in each row. Leave empty if you only track single flights below.

## `flights` (type: `array`):

One flight per line: flight number, optional date (YYYY-MM-DD — the DEPARTURE date, as on the ticket; without a date: the flight in the air now, else the one nearest to now) and optional airport, e.g. "KU101 2026-11-25", "MS 778", "EY713 today CAI", "EK2". Without an airport the flight's own origin and destination are found; both rows are the same flight (an overnight flight lands the next local day). JSON objects {"flightNumber": "KU101", "date": "2026-11-25", "airport": "KWI"} are accepted too. Each found flight is one row and one flight check.

## `maxFlights` (type: `integer`):

Board mode: how many flights to return per airport and direction (the ones closest to now). 0 = the whole window.

## `direction` (type: `string`):

Arrivals, departures or both. Also limits where flight numbers are looked up.

## `hoursBefore` (type: `integer`):

Board mode: include flights scheduled up to this many hours before now (max 36).

## `hoursAfter` (type: `integer`):

Board mode: include flights scheduled up to this many hours after now (max 48; airports publish about one day ahead).

## `includePosition` (type: `boolean`):

Add `position` to each flight row: latitude, longitude, altitude (ft), ground speed (knots), heading, time of the last position and whether the aircraft is on the ground. A flight that is not in the air gets `position: null` and a `positionNote` saying why (not departed yet, landed, cancelled, out of coverage). Same price per flight row. With "Only changes" on, a flight in the air counts as changed on every run (its position moved), so it is written and billed each run; the webhook still fires only on status, time, gate or terminal changes.

## `includeTrack` (type: `boolean`):

Also add `track`: the path the aircraft has flown, oldest point first, each with latitude, longitude, altitude, ground speed, heading and time. Heavy — a long-haul flight is about 1,000–2,000 points — so off by default. Turns on the live position too.

## `webhookUrl` (type: `string`):

Optional. Schedule this Actor (e.g. every 5 minutes) and it POSTs JSON {event, checkedAt, count, flights:\[…]} here only for flights that are new or changed since the previous run — status, scheduled/estimated/actual time, gate or terminal. Each changed flight carries `changes: [{field, from, to}]`. If the webhook refuses, the same changes are sent again on the next run.

## `onlyChanges` (type: `boolean`):

Remember flights between runs. Board mode: write only new or changed flights to the dataset. Flight-number mode: every checked flight is still written, with `change` = new / changed / unchanged; only new or changed flights are billed, unchanged re-checks are free (`billed: false`). Default: on when a webhook URL is set, off otherwise.

## `finishedAfterHours` (type: `integer`):

Landed, departed or diverted flights are dropped from tracking after this many hours, cancelled flights right after the cancellation is reported. Dropped flights are not written or charged again.

## `watchName` (type: `string`):

Optional. Runs with the same watch name share one memory of what was already sent, even if the flight list changes between runs. Without it the memory belongs to this exact list of airports and flights.

## Actor input object example

```json
{
  "airports": [
    "KWI"
  ],
  "maxFlights": 200,
  "direction": "both",
  "hoursBefore": 2,
  "hoursAfter": 12,
  "includePosition": false,
  "includeTrack": false,
  "finishedAfterHours": 2
}
```

# Actor output Schema

## `flights` (type: `string`):

One row per flight: status, times, terminal, gate and what changed.

## `allRows` (type: `string`):

Flight rows plus free notice rows (the type field tells them apart).

## `runStats` (type: `string`):

Which route served each board, counts of changes and webhook delivery.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "airports": [
        "KWI"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apimy/airport-flight-status").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "airports": ["KWI"] }

# Run the Actor and wait for it to finish
run = client.actor("apimy/airport-flight-status").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "airports": [
    "KWI"
  ]
}' |
apify call apimy/airport-flight-status --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apimy/airport-flight-status"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YnyklU9q82JA4XE3y/builds/ry9qeO0gImwFLqgyg/openapi.json
