# Aviation Hub — Airports, Airlines, Routes & Live Flights (`darknezz/aviation-hub`) Actor

Full aviation database: 85k+ airports, the airline registry, a route mapper with geocoded endpoints & distances, live ADS-B aircraft and live METAR airport weather. Open data, no key.

- **URL**: https://apify.com/darknezz/aviation-hub.md
- **Developed by:** [Oaida Adrian](https://apify.com/darknezz) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Aviation Hub ✈️🌍

**A complete aviation database in one Actor: 85,000+ airports, the world airline registry, a full route mapper with geocoded endpoints and great-circle distances, live aircraft in the sky, and live airport weather. All from public open data — no API key.**

Most aviation APIs are locked behind keys, quotas and paywalls. This Actor fuses the best **keyless open datasets** — OurAirports, OpenFlights, ADS-B and NOAA aviation weather — into one clean, structured feed you can query six ways.

***

### Six modes

| Mode | What you get |
| --- | --- |
| **airports** | Search/filter **85,000+ airports** — IATA/ICAO codes, coordinates, elevation, country, city, type, scheduled service, and (optionally) full runway lists. |
| **airlines** | The **airline registry** — ~6,000 airlines with IATA/ICAO codes, callsign, country and active status. |
| **routes** | A real **route mapper** — every airline route with **both endpoints geocoded** (lat/lon), **great-circle distance in km**, the operating airlines and aircraft types. Perfect for drawing route maps. |
| **live** | **Live aircraft** in the sky around any airport or coordinate (ADS-B): callsign, hex, registration, type, altitude, speed, heading, position, distance. |
| **weather** | **Live METAR** airport weather: temperature, wind, visibility, ceiling, altimeter and flight category (VFR/MVFR/IFR). |
| **digest** | One **aviation-market summary** row: busiest airports by routes, biggest airlines, airport counts by type and country, most common aircraft. |

***

### Example inputs

**Every large airport in a country, with runways**

```json
{ "mode": "airports", "country": "GB", "airportType": "large_airport", "includeRunways": true }
```

**Route mapper — all routes out of Heathrow, longest first**

```json
{ "mode": "routes", "from": "LHR" }
```

Each row carries `source_latitude/longitude` and `destination_latitude/longitude` plus `distance_km`, so you can plot great-circle lines directly.

**Does anyone fly JFK → Dubai, and on what aircraft?**

```json
{ "mode": "routes", "from": "JFK", "to": "DXB" }
```

**Live aircraft within 60 nm of Heathrow**

```json
{ "mode": "live", "near": "EGLL", "radiusNm": 60 }
```

`near` also accepts a `"lat,lon"` coordinate pair.

**Live weather at five hub airports**

```json
{ "mode": "weather", "near": "KJFK,EGLL,OMDB,VCBI,YSSY" }
```

**One market-digest row**

```json
{ "mode": "digest" }
```

***

### What each airport row looks like

`ident` · `type` · `name` · `iata` · `icao` · `gps_code` · `local_code` · `latitude` · `longitude` · `elevation_ft` · `continent` · `country_code` · `region_code` · `municipality` · `scheduled_service` · `wikipedia_link` · `home_link` · `keywords` · `country` · `runways[]`

### What each route row looks like

`airline_code` · `airline` · `airline_country` · `source` · `source_airport` · `source_city` · `source_country` · `source_latitude` · `source_longitude` · `destination` · `destination_airport` · `destination_city` · `destination_country` · `destination_latitude` · `destination_longitude` · `distance_km` · `stops` · `codeshare` · `equipment[]`

### What each live aircraft row looks like

`hex` · `callsign` · `registration` · `type` · `origin_country` · `latitude` · `longitude` · `altitude_ft` · `on_ground` · `speed_kt` · `heading` · `vertical_rate_fpm` · `squawk` · `distance_km` · `source`

### What each weather row looks like

`icao` · `name` · `observed_at` · `temp_c` · `dewpoint_c` · `wind_dir_deg` · `wind_speed_kt` · `wind_gust_kt` · `visibility` · `altimeter_hpa` · `flight_category` · `clouds[]` · `latitude` · `longitude` · `elevation_m` · `raw` (the raw METAR string)

***

### Run it on a schedule

Airport and airline data update daily; aircraft and weather are real-time. Schedule a run to keep a live airport/route table in a sheet or dashboard, power a flight-map, feed a travel or logistics app, or track live traffic and weather at the airports you care about.

#### Using the Python SDK

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR-APIFY-TOKEN")

## Live aircraft near Heathrow
run = client.actor("darknezz/aviation-hub").call(
    run_input={"mode": "live", "near": "EGLL", "radiusNm": 60}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["callsign"], item["altitude_ft"], item["speed_kt"])
```

#### Using the API directly

```
POST https://api.apify.com/v2/acts/darknezz~aviation-hub/run-sync-get-dataset-items
{
  "mode": "weather",
  "near": "EGLL,LFPG"
}
```

***

### Data sources & notes

- **Airports / runways / countries** — [OurAirports](https://ourairports.com) open data (public domain), refreshed daily. ~85k airports worldwide.
- **Airlines / routes** — [OpenFlights](https://openflights.org) open database — the standard open airline and route network (community-maintained). It is a broad reference network, not a live schedule; treat routes as "which carriers have flown this city pair" rather than today's timetable.
- **Live aircraft** — [adsb.lol](https://adsb.lol) community ADS-B feed (no key), with automatic fallback to the [OpenSky Network](https://opensky-network.org) anonymous API. Coverage depends on volunteer receivers; ground/low-altitude aircraft may not appear.
- **Airport weather** — [aviationweather.gov](https://aviationweather.gov) (NOAA) live METAR (no key).
- All data is public and non-personal (airport facilities, airline registries, aircraft tail numbers, weather). **No API key required for any mode.**

***

### Pricing

Pay per event — **$0.001 per data record** (airport, airline, route, live aircraft or weather row) and **$0.007 per digest row**. Nothing is charged on failed or empty runs.

***

#### Keywords

aviation database, airport database, airport API, airline database, IATA code, ICAO code, airport codes, airline codes, flight routes, route map, airline routes, great circle distance, live flights, live aircraft, ADS-B, flight tracker, METAR, airport weather, aviation weather, runway data, OurAirports, OpenFlights, airports by country, busiest airports, flight data, aviation data, no API key.

# Actor input Schema

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

Which aviation dataset to query. airports = 85K+ airports (OurAirports), airlines = airline registry (OpenFlights), routes = route mapper with geocoded endpoints (OpenFlights), live = live ADS-B aircraft (adsb.lol + OpenSky), weather = live METAR (NOAA), digest = one aviation-market summary row.

## `country` (type: `string`):

Filter airports by ISO country code (e.g. 'GB', 'US', 'RO'). Also filters airlines by country name if a full name is given.

## `airportType` (type: `string`):

Filter airports by type: large\_airport, medium\_airport, small\_airport, heliport, seaplane\_base, closed, balloonport.

## `includeRunways` (type: `boolean`):

Airports mode: attach the full runway list (length, width, surface, lighting, closed flag, identifiers) to each airport row.

## `search` (type: `string`):

Filter airports/airlines by a text fragment matched against name, codes, city and keywords (case-insensitive).

## `active` (type: `boolean`):

Airlines mode: only return airlines currently marked active.

## `from` (type: `string`):

Routes mode: only routes departing this IATA airport code (e.g. 'LHR').

## `to` (type: `string`):

Routes mode: only routes arriving at this IATA airport code (e.g. 'JFK').

## `near` (type: `string`):

Live mode: airport code (e.g. 'EGLL', 'KLAX') or 'lat,lon' coordinate to centre the ADS-B search on. Weather mode: comma-separated ICAO codes (e.g. 'EGLL,LFPG,OMDB').

## `radiusNm` (type: `number`):

Live mode: search radius in nautical miles around the centre point.

## `limit` (type: `integer`):

Maximum number of records to return.

## Actor input object example

```json
{
  "mode": "airports",
  "airportType": "",
  "includeRunways": false,
  "active": false,
  "near": "EGLL",
  "radiusNm": 60,
  "limit": 100
}
```

# Actor output Schema

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

Each dataset item is one record: an airport, airline, route, live aircraft, METAR weather report, or the single market-digest row — depending on the chosen mode.

# 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 = {
    "mode": "airports",
    "near": "EGLL"
};

// Run the Actor and wait for it to finish
const run = await client.actor("darknezz/aviation-hub").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 = {
    "mode": "airports",
    "near": "EGLL",
}

# Run the Actor and wait for it to finish
run = client.actor("darknezz/aviation-hub").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 '{
  "mode": "airports",
  "near": "EGLL"
}' |
apify call darknezz/aviation-hub --silent --output-dataset

```

## MCP server setup

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

```

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/RwcWvqsf5Pl7YAfsv/builds/hLuIN2ITmBJxBOjBH/openapi.json
