# METAR & TAF Airport Weather Scraper — Aviation Weather Reports (`compute-edge/metar-taf-airport-weather-scraper`) Actor

Fetches METAR current weather observations and TAF terminal area forecasts for any airport worldwide using the NOAA/NWS Aviation Weather Center API. No API key required.

- **URL**: https://apify.com/compute-edge/metar-taf-airport-weather-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## METAR & TAF Airport Weather Scraper — Aviation Weather Reports

Extract real-time **METAR weather observations** and **TAF terminal area forecasts** for any airport worldwide using the official NOAA/NWS Aviation Weather Center API. No API key required. Perfect for flight operations, drone/UAV planning, logistics routing, and weather analytics pipelines.

**METAR** (Meteorological Aerodrome Report) is the standard format for current weather observations at an airport — issued hourly or whenever conditions change significantly. **TAF** (Terminal Aerodrome Forecast) is the 24–30 hour weather forecast for the airspace around an airport, updated every 6 hours by the National Weather Service.

### Key Features

- Fetch **METAR**, **TAF**, or **both** in a single run
- Query any combination of ICAO station IDs (e.g. `KJFK`, `EGLL`, `OMDB`)
- Use **state/region codes** like `@NY` (all New York stations) or `@CA` (all California stations) — the API supports these natively
- Configure **lookback window** for METAR history (1–72 hours)
- Structured JSON output with clean camelCase fields — ready for databases and analytics platforms
- Raw METAR/TAF text included for aviation-grade use cases
- Runs in under 30 seconds for typical workloads

### Output Data Fields

| Field | Type | Description |
|---|---|---|
| `reportType` | string | `"METAR"` or `"TAF"` |
| `icaoId` | string | ICAO airport identifier (e.g. `KJFK`) |
| `stationName` | string | Airport full name |
| `reportTime` | string | ISO 8601 observation or issue time |
| `flightCategory` | string | VFR / MVFR / IFR / LIFR (METAR only) |
| `temp` | number | Temperature in Celsius (METAR only) |
| `dewpoint` | number | Dew point in Celsius (METAR only) |
| `windDir` | number/string | Wind direction in degrees or "VRB" |
| `windSpeed` | number | Wind speed in knots |
| `windGust` | number | Wind gust speed in knots (if present) |
| `visibility` | string | Visibility in statute miles |
| `altimeter` | number | Altimeter setting in hPa |
| `seaLevelPressure` | number | Sea level pressure in hPa (METAR only) |
| `clouds` | array | Cloud layers: `[{cover, base}]` |
| `lat` / `lon` | number | Station coordinates |
| `elev` | number | Station elevation in meters |
| `rawText` | string | Raw METAR or TAF text string |
| `validFrom` / `validTo` | string | TAF validity window (ISO 8601) |
| `forecasts` | array | TAF forecast periods with wind/vis/clouds |

### Who Needs This Data?

- **Flight operations teams** — pre-flight weather briefings and go/no-go decisions
- **Drone and UAV operators** — wind, visibility, and ceiling checks before launch
- **Logistics and freight** — weather-aware routing for time-sensitive shipments
- **Weather analytics platforms** — historical observation ingestion and model validation
- **Airport management** — monitoring surface observations across multiple stations
- **Research and academia** — building climatological datasets from raw NWS data

---

### How to scrape METAR and TAF aviation weather data

1. **Open the Actor** on Apify and click **Try for free**.
2. In the **Station IDs** field, enter one or more ICAO codes, e.g. `KJFK`, `KLAX`, `KORD`. You can also use state codes like `@NY` to pull all stations in New York.
3. Set **Data Type** to `metar`, `taf`, or `both` depending on your use case.
4. Set **METAR Hours Lookback** to control how many hours of observations to retrieve (default 2, max 72).
5. Optionally set **Max Results** to cap output size.
6. Click **Start** and wait for the run to complete (typically under 30 seconds).
7. Open the **Dataset** tab to browse results or download as JSON, CSV, or XLSX.

For large-scale pulls (e.g. all US airports), use the `@XX` state codes and increase **Max Results** accordingly.

---

### Pricing

This Actor costs approximately **$0.003 per result** plus standard Apify compute time. A typical run fetching 20 stations with both METAR and TAF (~40 records) costs under $0.15 including compute.

| Run Size | Approx. Cost |
|---|---|
| 10 stations, METAR only (~10–20 records) | ~$0.06 |
| 50 stations, both types (~100–150 records) | ~$0.45 |
| All @CA stations, both types (~500+ records) | ~$1.50 |

---

### Input Example

```json
{
  "stations": ["KJFK", "KLAX", "KORD", "@NY"],
  "dataType": "both",
  "hoursBack": 3,
  "maxResults": 500
}
````

### Output Example

```json
{
  "reportType": "METAR",
  "icaoId": "KJFK",
  "stationName": "New York/JF Kennedy Intl, NY, US",
  "reportTime": "2026-07-02T17:00:00.000Z",
  "rawText": "METAR KJFK 021651Z 20013KT 10SM FEW070 37/21 A2998 RMK SLP152 T03720206 $",
  "temp": 37.2,
  "dewpoint": 20.6,
  "windDir": 200,
  "windSpeed": 13,
  "windGust": null,
  "visibility": "10+",
  "altimeter": 1015.3,
  "seaLevelPressure": 1015.2,
  "flightCategory": "VFR",
  "clouds": [{ "cover": "FEW", "base": 7000 }],
  "lat": 40.6392,
  "lon": -73.7639,
  "elev": 3,
  "validFrom": null,
  "validTo": null,
  "forecasts": null
}
```

***

### Other Scrapers

You might also find these related government weather and aviation data Actors useful:

- [NWS Weather Alerts Scraper](https://apify.com/compute-edge/nws-weather-alerts-scraper) — Real-time active weather alerts and watches from National Weather Service
- [FAA NAS Status Scraper](https://apify.com/compute-edge/faa-nas-status-scraper) — FAA National Airspace System status, delays, and NOTAMs
- [NOAA SWPC Space Weather Scraper](https://apify.com/compute-edge/noaa-swpc-space-weather-scraper) — Solar flare alerts, geomagnetic storm data, and space weather forecasts
- [NTSB Aviation Accident Scraper](https://apify.com/compute-edge/ntsb-aviation-scraper) — NTSB aviation accident and incident database

***

### FAQ

**How often are METARs updated?**
METARs are issued at the top of every hour and whenever conditions change significantly (a "special observation" or SPECI). Aviation Weather Center typically reflects updates within 5–10 minutes of issuance.

**What is a flight category (VFR/MVFR/IFR/LIFR)?**
Flight categories classify visibility and ceiling conditions: VFR (Visual Flight Rules) = clear flying conditions; MVFR (Marginal VFR) = reduced but usable; IFR (Instrument Flight Rules) = low ceiling or visibility; LIFR (Low IFR) = severe low-visibility conditions. They appear in METAR records only.

**Can I scrape international airports?**
Yes — the NOAA Aviation Weather Center API includes thousands of international stations. Use the standard ICAO code format (e.g. `EGLL` for London Heathrow, `RJTT` for Tokyo Haneda). State/region codes (`@XX`) are US-only.

**How far back can I pull METAR history?**
The `hoursBack` parameter supports up to 72 hours. For older historical data, consider NOAA's ASOS/AWOS archives or the IEM ASOS download service.

**Why are some fields null in TAF records?**
TAF records represent forecasts, not current conditions — so observed fields like `temp`, `dewpoint`, `altimeter`, `seaLevelPressure`, and `flightCategory` are not applicable and are returned as `null`. The forecast periods in the `forecasts` array contain wind, visibility, and cloud data.

***

### Legal Disclaimer

This Actor fetches data from the NOAA/NWS Aviation Weather Center API (`aviationweather.gov`), which is a public United States government data service. Data is in the public domain under 17 U.S.C. § 105. Use of this data is subject to [NOAA's data disclaimer](https://www.weather.gov/disclaimer). This Actor is not affiliated with or endorsed by NOAA, NWS, or the FAA. Aviation weather data must **not** be used as the sole basis for flight planning decisions — always consult certified aviation weather services and a qualified meteorologist for safety-critical operations.

For support, contact us through the Apify Actor page.

# Actor input Schema

## `stations` (type: `array`):

List of ICAO airport station IDs (e.g. KJFK, KLAX) or state/region codes prefixed with @ (e.g. @NY for all New York stations, @CA for California). Defaults to 10 major US airports.

## `dataType` (type: `string`):

Choose which report type(s) to fetch. 'metar' = current weather observations only. 'taf' = terminal area forecasts only. 'both' = fetch METARs and TAFs.

## `hoursBack` (type: `integer`):

How many hours back to retrieve METAR observations. 1 = most recent report only, 2 = last 2 hours, up to 72 hours. Does not affect TAF lookback.

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

Maximum total number of records (METARs + TAFs combined) to return. Set to 0 for unlimited.

## Actor input object example

```json
{
  "stations": [
    "KJFK",
    "KLAX",
    "KORD",
    "KATL",
    "KDFW",
    "KDEN",
    "KSFO",
    "KSEA",
    "KMIA",
    "KBOS"
  ],
  "dataType": "both",
  "hoursBack": 2,
  "maxResults": 1000
}
```

# 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("compute-edge/metar-taf-airport-weather-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("compute-edge/metar-taf-airport-weather-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 compute-edge/metar-taf-airport-weather-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=compute-edge/metar-taf-airport-weather-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "METAR & TAF Airport Weather Scraper — Aviation Weather Reports",
        "description": "Fetches METAR current weather observations and TAF terminal area forecasts for any airport worldwide using the NOAA/NWS Aviation Weather Center API. No API key required.",
        "version": "0.1",
        "x-build-id": "c357LfD0vW05Sroax"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~metar-taf-airport-weather-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-metar-taf-airport-weather-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/compute-edge~metar-taf-airport-weather-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-metar-taf-airport-weather-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/compute-edge~metar-taf-airport-weather-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-metar-taf-airport-weather-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "stations": {
                        "title": "Station IDs",
                        "type": "array",
                        "description": "List of ICAO airport station IDs (e.g. KJFK, KLAX) or state/region codes prefixed with @ (e.g. @NY for all New York stations, @CA for California). Defaults to 10 major US airports.",
                        "default": [
                            "KJFK",
                            "KLAX",
                            "KORD",
                            "KATL",
                            "KDFW",
                            "KDEN",
                            "KSFO",
                            "KSEA",
                            "KMIA",
                            "KBOS"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "dataType": {
                        "title": "Data Type",
                        "enum": [
                            "metar",
                            "taf",
                            "both"
                        ],
                        "type": "string",
                        "description": "Choose which report type(s) to fetch. 'metar' = current weather observations only. 'taf' = terminal area forecasts only. 'both' = fetch METARs and TAFs.",
                        "default": "both"
                    },
                    "hoursBack": {
                        "title": "METAR Hours Lookback",
                        "minimum": 1,
                        "maximum": 72,
                        "type": "integer",
                        "description": "How many hours back to retrieve METAR observations. 1 = most recent report only, 2 = last 2 hours, up to 72 hours. Does not affect TAF lookback.",
                        "default": 2
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum total number of records (METARs + TAFs combined) to return. Set to 0 for unlimited.",
                        "default": 1000
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
