# Live Flights API - Planes Near Any Airport, Routes, ETA (`martin10291/live-flights-near-airport`) Actor

Live aircraft arriving at, leaving or flying over any airport: one row per plane with callsign, airline, aircraft type, altitude, speed, distance and ETA. No API key, no login, no proxy: ADSB.lol open data (ODbL) + OpenFlights airlines.

- **URL**: https://apify.com/martin10291/live-flights-near-airport.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Travel, Automation, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 results

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

## Live Flights API - Planes Near Any Airport, Routes, ETA

**Which planes are landing at or leaving this airport right now, and when will they arrive?** This API answers it for any airport in the world in one call: every live aircraft within your radius, with callsign, airline, aircraft type, registration, altitude, speed, and whether it is an **arrival, departure or overflight**, plus distance and an **ETA in minutes**. No API key, no login, no proxy: ADSB.lol open ADS-B data (ODbL) + OpenFlights airline table (ODbL). Route lookup (origin/destination) is off since 2026-11-20: the route database does not allow redistribution.

What makes it different: raw ADS-B scrapers give you a list of positions. This API does the joining for you. **Measured 2026-11-09:** JFK + LHR + FRA (30 nm) returned 151 aircraft in 2.9 seconds, 112 of them with route and airline; Istanbul (120 nm) returned 13 inbound flights sorted by ETA, every one checked against its route ("on route").

### What you get

| Mode | Returns |
|---|---|
| `airport` (default) | Live aircraft within `radiusNm` of each airport (IATA or ICAO, any country). Arrivals first (sorted by ETA), then departures, then the rest by distance |
| `area` | Live aircraft around any latitude/longitude |
| `flight` | Find specific aircraft by callsign (`BAW117`), registration (`N123AB`, `TC-JVK`) or ICAO hex (`4baacb`) |

Every row: `callsign`, `flightIata`, `airline`, `origin` / `destination` (IATA, ICAO, name, city, country), `direction` (arrival, departure, overflight, likely arrival, likely departure, on ground, unknown), `distanceNm`, `etaMinutes`, `altitudeFt`, `groundSpeedKt`, `trackDeg`, `verticalRateFpm`, `aircraftType`, `registration`, `hex`, `squawk`, `emergency`, `military`, `positionAt`, `routeCheck`, `airlineSource`.

**Airline even without a route (2026-11-10):** about 1 in 4 airline callsigns has no public route. The first 3 letters of an ATC callsign are the airline's ICAO code, so we still fill `airline`, `airlineIata` and `airlineIcao` from the bundled OpenFlights table (`airlineSource` = `callsign prefix`). Measured on JFK + LHR + FRA: rows with a callsign and an airline 75% -> 88% (151 of 172); Sofia + Varna 6 of 11 -> 9 of 10. Private flights with a registration as callsign (N123AB) stay without airline.

- **Route check:** the aircraft's position is compared with the great-circle path of its route. `on route` / `near route` / `off route (callsign route may be outdated)` tells you when a reused callsign has a stale route.
- **Only new** mode with `monitorId`: schedule it every 5-15 minutes and get each new arrival or departure once (state kept 6 hours). Good for airport dashboards, ground handling, pickup apps, Slack/Telegram alerts.
- **Privacy:** aircraft whose owners joined the FAA LADD or PIA privacy programs are left out (`privacyFiltered` in `RUN_SUMMARY`).
- Unknown airport codes return a row with `status: "unknown airport code"`; flights that are not airborne return `status: "not airborne or not seen in the last minute"`. The run never fails for that.

### Example output

```json
{
  "query": "JFK", "direction": "arrival", "distanceNm": 1.0, "etaMinutes": 0.5,
  "callsign": "JBU1536", "flightIata": "B61536", "airline": "JetBlue Airways",
  "origin": {"iata": "STI", "icao": "MDST", "name": "Cibao International Airport", "city": "Santiago", "country": "DO"},
  "destination": {"iata": "JFK", "icao": "KJFK", "name": "John F Kennedy International Airport", "city": "New York", "country": "US"},
  "routeCheck": "on route", "aircraftType": "A320", "registration": "N637JB", "hex": "a85887",
  "altitudeFt": 325, "groundSpeedKt": 132.7, "trackDeg": 300.8, "verticalRateFpm": -640, "onGround": false,
  "positionAt": "2026-11-09T08:06:54Z"
}
```

### Use it from code or an AI agent

```bash
curl -X POST "https://api.apify.com/v2/acts/martin10291~live-flights-near-airport/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "airport", "airports": ["JFK", "LHR"], "directions": ["arrival"], "radiusNm": 60}'
```

Only flights arriving at Frankfurt below 15,000 ft, new ones only (schedule every 10 minutes):

```json
{"airports": ["FRA"], "directions": ["arrival", "likely arrival"], "maxAltitudeFt": 15000, "onlyNew": true, "monitorId": "fra-arrivals"}
```

AI agents (Claude, ChatGPT, Cursor, n8n) can call it as a tool through the Apify MCP server: `https://mcp.apify.com/?actors=martin10291/live-flights-near-airport`.

### Schedule and chain it

- Schedule `onlyNew` runs every 5-15 minutes for an arrivals feed; each aircraft is returned once.
- Combine with [US Airport Delays & Weather API](https://apify.com/martin10291/airport-delays-weather) (FAA ground stops, METAR/TAF, delay history) and [Airport Database API](https://apify.com/martin10291/airports-flight-distance) (airport lookup, flight distance and time).

### Sources and limits

- Positions: [ADSB.lol](https://adsb.lol) open data API, ODbL 1.0 (attribution in every row). Coverage depends on volunteer receivers: excellent in Europe, North America and much of Asia, thinner over oceans and parts of Africa.
- Routes: off since 2026-11-20 (adsbdb.com terms do not allow redistribution). `direction` uses track, altitude and climb rate (`likely arrival` / `likely departure`).
- `etaMinutes` is a straight-line estimate (distance / ground speed), not an airline schedule. `likely arrival` / `likely departure` are heuristics for flights without a route (low, heading to/away from the airport, descending/climbing).
- Airports: OurAirports open data.
- Pricing: $1.00 per 1,000 aircraft rows. No row is charged when the run fails.

### FAQ

**How fresh is the data?** Positions are read at run time; `positionAt` / `positionAgeSeconds` show the age (usually under 5 seconds).

**Does it give schedules or gates?** No. It shows what is in the air or on the ground right now, with the callsign's route. For schedules use an airline schedule API.

**What happens on errors?** Bad options end the run with a clear message; if the live data source is busy for one airport the others are still returned and `RUN_SUMMARY.airportErrors` names it; if it is down completely the run stops cleanly and nothing is charged. `RUN_SUMMARY` always has `lastError`.

# Actor input Schema

## `mode` (type: `string`):

airport = live aircraft within the radius of each airport, with arrival/departure/overflight and ETA; area = live aircraft around any latitude/longitude; flight = find specific aircraft by callsign, registration or ICAO hex code.

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

Airport mode: IATA (JFK, LHR, SOF) or ICAO (KJFK, EGLL, LBSF) codes, any country, up to 50. Empty = the example airports JFK, LHR and FRA.

## `radiusNm` (type: `integer`):

Airport and area modes: how far around the airport or point to look (1-250 nm). 30 nm covers final approach and initial climb.

## `directions` (type: `array`):

Airport mode filter. Any of: arrival, departure, overflight, likely arrival, likely departure, on ground, unknown. Empty = all aircraft.

## `includeOnGround` (type: `boolean`):

Include aircraft that are taxiing or parked at the airport (they report 'ground' instead of an altitude).

## `maxAltitudeFt` (type: `integer`):

Optional: skip airborne aircraft above this altitude, e.g. 15000 to drop high overflights. Empty = no limit.

## `maxPerAirport` (type: `integer`):

Upper limit of rows per airport or point (1-1000). Rows are sorted: arrivals by ETA first, then departures, then the rest by distance.

## `latitude` (type: `string`):

Area mode: center latitude in decimal degrees, e.g. 50.03.

## `longitude` (type: `string`):

Area mode: center longitude in decimal degrees, e.g. 8.57.

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

Flight mode: ATC callsigns (BAW123, THY3UG), registrations (N123AB, TC-JVK) or ICAO 24-bit hex codes (4baacb). Up to 100.

## `includeRoutes` (type: `boolean`):

Reserved: route lookup is off since 2026-11-20 (the route source does not allow redistribution). Direction comes from track, altitude and climb rate; airline from the callsign prefix.

## `maxRouteLookups` (type: `integer`):

Upper limit of new callsign route lookups per run (0-1000). Routes are cached for 12 hours, so repeated runs are fast.

## `onlyNew` (type: `boolean`):

Return only aircraft not returned in the last 6 hours by a run with the same Monitor ID. Schedule it every 5-15 minutes to get each new arrival or departure once.

## `monitorId` (type: `string`):

Name of the saved state for Only new mode. Use a different ID for each watchlist.

## Actor input object example

```json
{
  "mode": "airport",
  "airports": [
    "JFK",
    "LHR",
    "FRA"
  ],
  "radiusNm": 30,
  "includeOnGround": true,
  "maxPerAirport": 100,
  "flights": [
    "BAW117",
    "DLH400",
    "UAL901"
  ],
  "includeRoutes": true,
  "maxRouteLookups": 300,
  "onlyNew": false,
  "monitorId": "default"
}
```

# Actor output Schema

## `results` (type: `string`):

One row per live aircraft: callsign, registration, type, position, altitude, speed, route (origin, destination, airline), direction relative to the airport, distance and ETA.

# 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": [
        "JFK",
        "LHR",
        "FRA"
    ],
    "flights": [
        "BAW117",
        "DLH400",
        "UAL901"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/live-flights-near-airport").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": [
        "JFK",
        "LHR",
        "FRA",
    ],
    "flights": [
        "BAW117",
        "DLH400",
        "UAL901",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("martin10291/live-flights-near-airport").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": [
    "JFK",
    "LHR",
    "FRA"
  ],
  "flights": [
    "BAW117",
    "DLH400",
    "UAL901"
  ]
}' |
apify call martin10291/live-flights-near-airport --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,martin10291/live-flights-near-airport"
        }
    }
}
```

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/3W2EqW5A4zKvVGRnW/builds/QDQ3CdgGIyLTYXa1k/openapi.json
