# METAR & TAF Aviation Weather API (NOAA) (`gp005/metar-taf`) Actor

Current METAR and TAF weather reports for ICAO airports, fetched from the official NOAA aviation weather API. Decoded fields plus raw text in clean JSON, batched by station, no API key and no scraping. Pay-per-event; fits flight planning, drone operations, dispatch, and aviation data pipelines.

- **URL**: https://apify.com/gp005/metar-taf.md
- **Developed by:** [Geo](https://apify.com/gp005) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 report serveds

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/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

## METAR & TAF Aviation Weather API (NOAA)

Real-time METAR & TAF API for developers: retrieve METAR observations and TAF forecasts for any supported ICAO airport from the official NOAA/NWS Aviation Weather API.
One batched call returns structured JSON with no API key and no scraping, using public data produced by the US government.

### What this Actor does

This Actor accepts one or more four-letter ICAO station codes and requests aviation weather directly from `aviationweather.gov`.
It can return recent METAR observations, the current TAF forecast, or both.
All requested station IDs are combined into one NOAA request per report type.
That means a run requesting METAR and TAF makes at most two source requests, regardless of the number of ICAO IDs in the batch.
Results are normalized into stable, developer-friendly dataset rows while preserving each raw report.

### Why use it

- Build flight-planning and preflight weather tools.
- Automate drone and UAS operational checks.
- Feed aviation operations and dispatch dashboards.
- Add weather awareness to logistics and routing workflows.
- Collect aviation weather for flight-simulator or AI training datasets.
- Schedule recurring METAR snapshots without managing infrastructure.

### Aviation weather data source: official NOAA API

The source is the official NOAA/NWS Aviation Weather API at [aviationweather.gov](https://aviationweather.gov/).
NOAA aviation weather data is US-government public data.
The API is accessed anonymously and does not require credentials.
This Actor does not scrape HTML pages or use a browser.
Every source request identifies itself with this descriptive user agent:

```text
forge-metar-taf/0.1 (NOAA open-data API consumer; https://apify.com/gp005)
```

The Actor batches all ICAO IDs into one request for each enabled report type and keeps report-type concurrency low.

### Quick start

Use this canonical smoke input:

```json
{"icaoIds":["KJFK","KLAX","EGLL"],"reportTypes":"both","hoursBeforeNow":2}
```

In Apify Console, paste the JSON into the Actor input and start the run.
The default input is already populated with the same three stations.
A successful run stores one dataset row for every report returned by NOAA.
Because METAR history can contain multiple observations per station, the exact number of METAR rows may exceed the number of requested stations.

### Input

#### `icaoIds`

Required array of four-letter ICAO airport or weather-station codes.
Codes are trimmed, converted to uppercase, and deduplicated.
Examples include `KJFK`, `KLAX`, `EGLL`, and `YSSY`.
NOAA silently omits unknown station IDs, so verify spelling when a station is absent.

#### `reportTypes`

Choose `metar`, `taf`, or `both`.
The default is `both`.

#### `hoursBeforeNow`

Number of hours of METAR history to request, from `0` through `24`.
Use `0` for only the most recent METAR observation.
This setting is never sent to the TAF endpoint because TAF always returns the current forecast.

#### `maxConcurrency`

Controls concurrent report-type requests from `1` through `5`.
The default is `2`, enough to fetch METAR and TAF together while remaining polite to NOAA.

### Output

Each successful row has `recordType: "data"` and a `reportType` of `metar` or `taf`.
A METAR row resembles:

```json
{
  "recordType": "data",
  "reportType": "metar",
  "stationId": "KJFK",
  "stationName": "New York/JF Kennedy Intl, NY, US",
  "observationTime": "2026-09-02T12:51:00.000Z",
  "tempC": 20,
  "dewpointC": 16.1,
  "windDir": 60,
  "windSpeedKt": 8,
  "visibility": "10+",
  "altimeter": 1020.4,
  "flightCategory": "MVFR",
  "cloudLayers": [{"cover":"SCT","baseFt":1900}],
  "rawOb": "METAR KJFK ...",
  "fetchTimestamp": "2026-09-02T13:00:00.000Z"
}
```

A TAF row resembles:

```json
{
  "recordType": "data",
  "reportType": "taf",
  "stationId": "KJFK",
  "issuanceTime": "2026-09-02T11:30:00.000Z",
  "validFrom": "2026-09-02T12:00:00.000Z",
  "validTo": "2026-09-03T18:00:00.000Z",
  "forecast": [{"fromTime":"2026-09-02T12:00:00.000Z","toTime":"2026-09-02T14:00:00.000Z","windDir":50,"windSpeedKt":9,"visibility":"6+","cloudLayers":[{"cover":"OVC","baseFt":800}]}],
  "rawOb": "TAF KJFK ...",
  "fetchTimestamp": "2026-09-02T13:00:00.000Z"
}
```

TAF forecast periods also expose change type, probability, gusts, wind shear, altimeter, vertical visibility, weather string, icing/turbulence data, and temperature data when NOAA supplies them.
Errors are dataset rows rather than failed runs whenever possible:

```json
{
  "recordType": "error",
  "status": "error",
  "error": "no_results",
  "message": "No TAF reports returned for requested ids — check ICAO codes",
  "icaoIds": ["ZZZZ"],
  "timestamp": "2026-09-02T13:00:00.000Z"
}
```

This makes scheduled and automated workflows easy to monitor without silently empty datasets.

### Pricing events

The Actor emits `actor-start` once after receiving valid, normalized input.
It emits `report-served` once for every returned NOAA report stored as a data row.
Pricing is configured by the Actor publisher and may change; always check the current Store pricing before running.
At an illustrative rate of `$0.003` per `report-served` event, three stations with one METAR and one TAF each produce:

```text
3 stations x 2 report types = 6 report-served events ≈ $0.018
```

This example is illustrative only because METAR history can return multiple observations and data availability varies by station.
The Actor checks Apify's event charge limit before storing each billable report. When `ACTOR_MAX_TOTAL_CHARGE_USD` is reached, it stops processing additional reports rather than doing unpaid work.

### Integrations and automation

Use this METAR and TAF API from any application or workflow that needs aviation weather:

- **Apify REST API** — start runs and download the default dataset as JSON, CSV, Excel, XML, or another supported format.
- **Apify MCP server** — expose aviation weather retrieval to compatible AI agents and assistants.
- **Webhooks** — notify your application when a run succeeds or fails.
- **Schedules** — use an Apify cron expression to capture recurring METAR snapshots.
- **No-code platforms** — connect runs and datasets to Make, n8n, or Zapier for aviation weather workflows.

For production integrations, store the run ID and dataset ID so each observation batch remains traceable.

### Other Actors by this developer

More API-style tools from the same publisher ([gp005](https://apify.com/gp005)):

- [EU VAT Number Validator & VIES Compliance Check API](https://apify.com/gp005/vat-vies-validator) — validates EU VAT numbers against the official EC VIES service and detects deregistrations.
- [Sanctions Screening API — GLEIF LEI & OFAC/EU/UN/UK Checker](https://apify.com/gp005/gleif-sanctions-screener) — screens legal entities against OFAC, EU, UN, and UK sanctions lists using GLEIF LEI data.
- [SSL/TLS Certificate Expiry Monitor](https://apify.com/gp005/tls-cert-monitor) — monitors SSL/TLS certificate expiry and revocation posture for a list of domains.

### Operational behavior

Source requests have a timeout of about 20 seconds.
Network failures are retried once after a two-second backoff.
HTTP failures for one report type become structured errors and do not prevent the other report type from completing.
Unknown ICAO IDs are normally omitted by NOAA rather than returned as explicit errors.
If an entire requested report type returns no rows, the Actor writes one `no_results` error item.
All source timestamps are passed through when NOAA supplies ISO-8601 values; epoch fields are converted to UTC ISO-8601 strings.

### Limitations and safety

NOAA does not provide an availability SLA for this public endpoint.
Station coverage is global, but US stations dominate and coverage outside CONUS can be thinner or intermittent.
Not every station issues a TAF, and reporting cadence differs by station and conditions.
METAR history may yield more than one row per station, while unavailable or invalid codes may yield none.
Decoded fields reflect NOAA's current API response and may be absent when the source report omits them.
Decoded TAF fields are advisory and are not a substitute for an official aviation weather briefing.
Always review raw METAR/TAF text, NOTAMs, airspace restrictions, and applicable operational guidance before flight.
Do not use this Actor as the sole source for safety-critical go/no-go decisions.

### FAQ

#### Does it require a NOAA API key?

No. The official Aviation Weather API supports anonymous requests.

#### Does it scrape aviationweather.gov?

No. It calls the documented JSON data endpoints directly.

#### Can I request international airports?

Yes, where NOAA has METAR or TAF coverage. Availability outside the United States varies.

#### Why did I receive fewer rows than ICAO IDs?

NOAA may omit unknown stations, stations without a current report, or airports that do not issue TAFs.

#### Can I get historical TAFs?

No. This Actor requests the current TAF. The history setting applies only to METAR observations.

#### What is the difference between METAR and TAF?

A METAR is an observation of the weather currently reported at an airport (wind, visibility, clouds, temperature, altimeter). A TAF is a forecast of expected conditions at that airport over the coming hours. Request `reportTypes: "both"` and each station returns both report types in one run.

#### Can I fetch METAR data for multiple airports in one request?

Yes. Pass an array of ICAO codes in `icaoIds` (for example `KJFK`, `KLAX`, `EGLL`). Codes are deduplicated, and all stations are combined into one NOAA request per report type, so a batched run stays fast and polite to the source.

#### Where can I verify the original report?

Use the `rawOb` field and consult the official source at [aviationweather.gov](https://aviationweather.gov/).

# Actor input Schema

## `icaoIds` (type: `array`):

4-letter ICAO airport or station codes to request in one comma-separated batch (for example KJFK, EGLL, YSSY). METAR and TAF coverage is global, but US stations dominate and coverage may be thinner elsewhere.

## `reportTypes` (type: `string`):

Choose whether to fetch current and recent METAR observations, the current TAF forecast, or both report types.

## `hoursBeforeNow` (type: `integer`):

How many hours of METAR observation history to request. Set 0 for the most recent observation only. TAF is always the current forecast.

## `maxConcurrency` (type: `integer`):

Maximum concurrent report-type requests. Keep this low because the actor sends only one batched request per enabled report type.

## Actor input object example

```json
{
  "icaoIds": [
    "KJFK",
    "KLAX",
    "EGLL"
  ],
  "reportTypes": "both",
  "hoursBeforeNow": 2,
  "maxConcurrency": 2
}
```

# Actor output Schema

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

No description

# 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 = {
    "icaoIds": [
        "KJFK",
        "KLAX",
        "EGLL"
    ],
    "reportTypes": "both",
    "hoursBeforeNow": 2,
    "maxConcurrency": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("gp005/metar-taf").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 = {
    "icaoIds": [
        "KJFK",
        "KLAX",
        "EGLL",
    ],
    "reportTypes": "both",
    "hoursBeforeNow": 2,
    "maxConcurrency": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("gp005/metar-taf").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 '{
  "icaoIds": [
    "KJFK",
    "KLAX",
    "EGLL"
  ],
  "reportTypes": "both",
  "hoursBeforeNow": 2,
  "maxConcurrency": 2
}' |
apify call gp005/metar-taf --silent --output-dataset

```

## MCP server setup

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

```

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/bdMqgVvA05AfXlIVL/builds/Bwco7esCBC2JakaiR/openapi.json
