# OurAirports Global Airport Database Scraper (`muhammadafzal/ourairports-global-airport-database-scraper`) Actor

Download and filter global OurAirports airports, runways, frequencies, navaids, countries, and regions from nightly public CSV data.

- **URL**: https://apify.com/muhammadafzal/ourairports-global-airport-database-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Travel, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 dataset items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## OurAirports Global Airport Database Scraper

Download the nightly public-domain [OurAirports](https://ourairports.com/data/) CSV datasets and return clean, filterable records for global airport research, aviation analytics, geospatial applications, and travel datasets.

Use this actor when you need a current worldwide airport reference table without browser automation, login credentials, or third-party aviation APIs.

### Datasets

- `airports` — all airports with identifiers, names, types, coordinates, elevation, country, region, and municipality.
- `airport-frequencies` — airport communication frequencies.
- `runways` — runway dimensions, surfaces, lighting, thresholds, and headings.
- `navaids` — worldwide radio navigation aids.
- `countries` — country codes and names.
- `regions` — top-level administrative subdivisions and region codes.

The source CSV is downloaded directly from OurAirports on each run. OurAirports states that the data is public domain, updated nightly, and provided without a guarantee of accuracy or fitness for use.

### When to use this actor

Use it for airport directories, route-planning reference data, geospatial enrichment, aviation market research, runway analysis, radio-frequency lookups, and country or region code joins. Choose `airports` for the default global airport database; choose a related dataset when you need runway, frequency, navaid, country, or region rows.

This actor is not a live flight-status tracker, airline schedule scraper, airport-review scraper, or airport website crawler. It does not provide departures, arrivals, fares, passenger volumes, or operational status beyond the fields present in the selected OurAirports CSV.

### Input example

```json
{
  "datasetType": "airports",
  "countryCode": "US",
  "airportType": "large_airport",
  "maxResults": 100
}
```

`countryCode`, `regionCode`, `airportType`, and `search` are optional filters. `search` performs a case-insensitive search across every source column. Every result contains normalized common fields and the complete source row in `rawData` so dataset-specific columns are not lost.

### Output example

```json
{
  "recordType": "airports",
  "id": "3830",
  "sourceDataset": "airports",
  "ident": "KJFK",
  "name": "John F Kennedy International Airport",
  "type": "large_airport",
  "countryCode": "US",
  "regionCode": "US-NY",
  "iataCode": "JFK",
  "icaoCode": "KJFK",
  "latitude": 40.639751,
  "longitude": -73.778925,
  "elevationFt": 13,
  "municipality": "New York",
  "rawData": { "scheduled_service": "yes" },
  "scrapedAt": "2026-08-13T00:00:00.000Z"
}
```

Fields that do not exist in the selected source dataset are returned as `null`. The `rawData` object preserves the original CSV columns as strings, which makes the output suitable for both direct analysis and downstream joins.

### Pricing

| Charge | Price | When it applies |
| --- | ---: | --- |
| Actor start | $0.001 per GB event | Once per run, minimum one event; scales with allocated memory |
| Dataset item | $0.001 | Each returned record |

The actor caps output at 10,000 records. With the default 1 GB memory setting, a run with 100 returned records has a maximum event charge of $0.101, plus any applicable Apify platform usage. The start-event portion scales with allocated memory. Empty valid filters return no dataset-item charges. Users can set an Apify maximum run cost to protect their budget.

### Output

The actor writes one homogeneous record per matching source row. Results include `recordType`, `id`, `sourceDataset`, `sourceUrl`, normalized identifiers and geography where available, `rawData`, and `scrapedAt`.

### Reliability, limits, and data quality

This actor has no external API credentials and does not use browser automation or proxies. It downloads one public CSV per run, parses quoted UTF-8 CSV, filters rows locally, and stops after the requested result limit. The default limit is 100 records and the maximum is 10,000. The full source file is read into memory, so the actor is configured for modest memory use rather than huge unrestricted exports.

OurAirports data is community-maintained and may contain missing, outdated, or inaccurate values. Validate important airport identifiers, coordinates, runway measurements, and operational assumptions against an authoritative aviation source before safety-critical or regulatory use.

### Agent and API usage

For an AI agent, use this actor for structured global airport-reference data. Start with `datasetType: "airports"`, add a two-letter `countryCode` for country-specific work, and set a small `maxResults` when only a lookup sample is needed. The stable result shape is `recordType`, `id`, normalized common fields, and `rawData` for dataset-specific columns.

### Source and attribution

Data source: [OurAirports open data downloads](https://ourairports.com/data/) and the [OurAirports data repository](https://github.com/davidmegginson/ourairports-data). Please review the source's current terms and data-quality notice before using the data in production.

# Actor input Schema

## `datasetType` (type: `string`):

OurAirports CSV dataset to download. Airports is the default global airport database.

## `countryCode` (type: `string`):

Optional ISO 3166-1 alpha-2 country code filter, for example US or GB. Applies to datasets containing iso\_country.

## `regionCode` (type: `string`):

Optional OurAirports region code filter, for example US-CA. Primarily applies to airports and regions.

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

Optional airport type filter, such as large\_airport, small\_airport, heliport, seaplane\_base, or closed.

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

Optional case-insensitive search across all columns in each CSV row. Useful for airport names, identifiers, cities, and codes.

## `maxResults` (type: `integer`):

Maximum number of matching records to push to the dataset.

## Actor input object example

```json
{
  "datasetType": "airports",
  "maxResults": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing one normalized record per matching OurAirports CSV row.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/ourairports-global-airport-database-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/ourairports-global-airport-database-scraper").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 '{}' |
apify call muhammadafzal/ourairports-global-airport-database-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/ourairports-global-airport-database-scraper"
        }
    }
}

```

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/wj2nbKV8a5IsagyJZ/builds/6gDrhTnc3ck1iiPuf/openapi.json
