# Flight Tracker — Live Aircraft Data for AI Agents (`haketa/flight-tracker`) Actor

Real-time flight tracking tool for AI agents & LLMs. Look up live aircraft position, altitude, speed, heading & on-ground status by flight/callsign, region or airport — plus airport departures/arrivals. MCP-callable real-time grounding for travel assistants & RAG.

- **URL**: https://apify.com/haketa/flight-tracker.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** AI, Travel
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Flight Tracker — Live Aircraft Position & Status for AI Agents

A **real-time flight tracking tool built for AI agents, LLMs and RAG pipelines.** Look up **live aircraft position, altitude, speed, heading and on-ground status** by flight number / callsign, region or airport — data that no LLM knows from its training set. Perfect as a **tool-call / MCP grounding source** for travel assistants, chatbots and agents.

Clean, small, structured output — ideal for feeding straight into an LLM context or an agent's tool response. Works from the Apify Console, on a schedule, or via API. Callable by **Claude, ChatGPT, LangChain, CrewAI, LlamaIndex and any MCP client** (every Apify actor is MCP-callable via `mcp.apify.com`).

> **✈️ Real-time grounding, not stale training data.** "Where is flight DLH717 right now? How high, how fast, which direction?" — the actor answers with live telemetry an LLM can't produce on its own.

***

### 🤖 Why this is an AI-agent tool

LLMs have a knowledge cutoff and no live data. AI agents close that gap with **tool calls** to real-time sources. Flight data is a textbook grounding case:

- ✅ **Live, not memorised** — current position, altitude and speed update every few seconds
- ✅ **Small, structured payload** — token-efficient, one clean record per aircraft
- ✅ **Tool-shaped input** — a flight number in, a structured answer out
- ✅ **MCP-ready** — call it from any agent framework or MCP client

***

### 📋 What this actor does

Give it a flight, a region or an airport, and it returns:

- ✅ **Live position** — latitude / longitude (WGS84)
- ✅ **Altitude** — barometric and geometric (metres)
- ✅ **Speed** — ground speed in m/s and km/h
- ✅ **Heading** — true track in degrees
- ✅ **Vertical rate** — climb / descent
- ✅ **On-ground status** and transponder **squawk**
- ✅ **Country of registration** and **ICAO24** address
- ✅ **Airport departures / arrivals** (with free OpenSky credentials)

Data comes from the **OpenSky Network** — a community-driven, real-time air-traffic data source.

***

### 🚀 Quick start

1. Enter a **flight number / callsign** (e.g. `DLH717`, `BA123`, `UAL456`).
2. Or leave flights empty and pick a **region** for all live traffic.
3. Click **Start** and read the structured result from **Storage → Dataset**.

> **Note:** aircraft only appear while **airborne**. If a flight isn't currently flying, it won't be in the live snapshot — use the region or airport modes to explore what's in the air now.

***

### ⚙️ Input

| Field | Type | Description |
| --- | --- | --- |
| **Flights / callsigns** | array | Flight numbers or callsigns, e.g. `DLH717`, `BA123`. IATA (`LH717`) is auto-mapped to ICAO callsigns (`DLH717`). |
| **Region** | select | When flights is empty: all live aircraft in a region (Europe, North America, Asia, ... or Worldwide). |
| **Airports** | array | ICAO codes for departures/arrivals, e.g. `EDDF`, `KJFK`, `EGLL`. Requires OpenSky credentials. |
| **Airport direction** | select | Arrivals or departures. |
| **OpenSky client ID / secret** | string | Optional free OAuth2 credentials (opensky-network.org) — enables airport flights + higher rate limit. |
| **Max results** | integer | Cap on records. `0` = no limit. |

#### Example 1 — Locate a specific flight

```json
{ "flights": ["DLH717", "BA123"] }
```

#### Example 2 — All live aircraft over Europe

```json
{ "flights": [], "region": "europe", "maxItems": 500 }
```

#### Example 3 — Arrivals at Frankfurt (with credentials)

```json
{
  "airports": ["EDDF"],
  "airportDirection": "arrival",
  "openSkyClientId": "your-id",
  "openSkyClientSecret": "your-secret"
}
```

***

### 📦 Output

```json
{
  "callsign": "DLH717",
  "icao24": "3c5ef8",
  "matchedQuery": "DLH717",
  "originCountry": "Germany",
  "latitude": 47.3575,
  "longitude": 6.4513,
  "baroAltitudeM": 11277.6,
  "geoAltitudeM": 11582.4,
  "velocityMs": 251.5,
  "velocityKmh": 905,
  "headingDeg": 117.4,
  "verticalRateMs": 0,
  "onGround": false,
  "squawk": "1000",
  "lastContact": "2026-07-03T15:30:25.000Z",
  "source": "live-position",
  "scrapedAt": "2026-07-03T15:30:26.000Z"
}
```

#### Output fields

| Field | Description |
| --- | --- |
| `callsign` / `icao24` | Aircraft callsign and unique ICAO24 address. |
| `matchedQuery` | The flight query this record matched. |
| `originCountry` | Country of registration. |
| `latitude` / `longitude` | Live position (WGS84). |
| `baroAltitudeM` / `geoAltitudeM` | Barometric / geometric altitude (m). |
| `velocityMs` / `velocityKmh` | Ground speed. |
| `headingDeg` | True track / heading (degrees). |
| `verticalRateMs` | Climb / descent rate (m/s). |
| `onGround` | True if on the ground. |
| `squawk` | Transponder code. |
| `lastContact` | Last position-update time. |
| `departureAirport` / `arrivalAirport` / `firstSeen` / `lastSeen` | Airport-mode fields. |
| `source` | `live-position` or `airport-arrival/departure`. |

***

### 💡 Use cases

| Use case | How it helps |
| --- | --- |
| **AI travel assistant** | Ground answers about live flight position and status. |
| **Agent tool / MCP** | A callable real-time data source for any LLM agent. |
| **RAG / chatbot** | Inject live flight telemetry into an LLM context. |
| **Dashboards & maps** | Feed live positions into a map or ops dashboard. |
| **Research & analytics** | Sample live air traffic by region. |

***

### 🔌 AI & integrations

- **MCP:** every Apify actor is callable from `mcp.apify.com` — add this actor as a tool in Claude Desktop, VS Code, or any MCP client.
- **Frameworks:** LangChain (`ApifyActorsTool`), LlamaIndex, CrewAI, Vercel AI SDK, n8n.
- **API:** run and fetch results with the Apify API or JS / Python clients.
- **Formats:** JSON, CSV, Excel, HTML, XML.

***

### ❓ FAQ

**Do I need an API key?**
No — live positions (flights & region modes) work without any credentials. Airport departures/arrivals need free OpenSky OAuth2 credentials.

**Why is my flight not found?**
Aircraft only appear while airborne. A flight that hasn't taken off (or has landed) won't be in the live snapshot.

**How fresh is the data?**
Real-time — positions are updated every few seconds by the OpenSky Network.

**Can an AI agent call this directly?**
Yes. It's designed as a tool-call source and is MCP-callable via Apify.

***

### ⚖️ Legal & responsible use

This actor uses the **OpenSky Network** community air-traffic data via its public API. Respect OpenSky's terms and rate limits, and use the data for lawful purposes. For heavier use, add free OpenSky OAuth2 credentials.

***

### 🛟 Support

Need an extra field or hit an issue? Open a ticket from the actor's **Issues** tab.

Happy tracking! ✈️

# Actor input Schema

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

Type one or more flight numbers or callsigns to locate live, e.g. "DLH717", "BA123", "UAL456". Airline IATA numbers such as "LH717" are matched to their ICAO callsign automatically. Leave empty to get a live worldwide snapshot instead.

## `region` (type: `string`):

Return every live aircraft currently flying over the chosen region. Pick "Worldwide" for a global mixed sample. Used whenever no specific flight numbers are entered above.

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

Choose airports to list their recent departures or arrivals. Requires OpenSky credentials below. Need an airport that is not listed? Add its ICAO code under "Other airports".

## `airportsCustom` (type: `array`):

Optional. Add any extra airports by ICAO code, e.g. "EDDF", "KSEA", "OMAA". These are combined with the airports selected above.

## `airportDirection` (type: `string`):

For the airports above: list departures or arrivals from the last couple of hours.

## `openSkyClientId` (type: `string`):

Optional OpenSky Network OAuth2 client ID. Enables airport departures/arrivals and a higher rate limit. Get one free at opensky-network.org (Account → API Client).

## `openSkyClientSecret` (type: `string`):

OpenSky OAuth2 client secret (paired with the client ID).

## `maxItems` (type: `integer`):

Maximum number of aircraft / flights to return. Set 0 for no limit.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. Recommended and on by default so lookups stay fast and reliable.

## Actor input object example

```json
{
  "flights": [
    "DLH717",
    "BA123"
  ],
  "region": "worldwide",
  "airports": [],
  "airportsCustom": [],
  "airportDirection": "arrival",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `callsign` (type: `string`):

Aircraft callsign (e.g. DLH717)

## `icao24` (type: `string`):

Unique ICAO 24-bit aircraft address

## `matchedQuery` (type: `string`):

The flight/callsign query this record matched

## `originCountry` (type: `string`):

Country of registration

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

Current latitude (WGS84)

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

Current longitude (WGS84)

## `baroAltitudeM` (type: `string`):

Barometric altitude in metres

## `geoAltitudeM` (type: `string`):

Geometric altitude in metres

## `velocityMs` (type: `string`):

Ground speed in m/s

## `velocityKmh` (type: `string`):

Ground speed in km/h

## `headingDeg` (type: `string`):

True track / heading in degrees

## `verticalRateMs` (type: `string`):

Climb/descent rate in m/s

## `onGround` (type: `string`):

True if the aircraft is on the ground

## `squawk` (type: `string`):

Transponder squawk code

## `lastContact` (type: `string`):

Timestamp of last position update

## `departureAirport` (type: `string`):

Estimated departure airport (airport mode)

## `arrivalAirport` (type: `string`):

Estimated arrival airport (airport mode)

## `firstSeen` (type: `string`):

First seen time (airport mode)

## `lastSeen` (type: `string`):

Last seen time (airport mode)

## `source` (type: `string`):

live-position or airport-departure/arrival

## `scrapedAt` (type: `string`):

Extraction timestamp

# 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 = {
    "flights": [
        "DLH717",
        "BA123"
    ],
    "airportsCustom": [],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/flight-tracker").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 = {
    "flights": [
        "DLH717",
        "BA123",
    ],
    "airportsCustom": [],
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/flight-tracker").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 '{
  "flights": [
    "DLH717",
    "BA123"
  ],
  "airportsCustom": [],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/flight-tracker --silent --output-dataset

```

## MCP server setup

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

```

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/zBoHFux6bG7h6w5ow/builds/d5vC5qcyunbC9ZpW1/openapi.json
