# Aviation Weather METAR Scraper (aviationweather.gov) (`bovi/aviationweather-scraper`) Actor

Collect current METAR airport weather observations from aviationweather.gov: station, location, flight category, temperature, wind, visibility, clouds, pressure and the raw METAR. Search by station ids, state or country groups, or a bounding box.

- **URL**: https://apify.com/bovi/aviationweather-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Travel, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.80 / 1,000 aviation weather metar scraper (aviationweather.gov)s

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Aviation Weather METAR Scraper (aviationweather.gov)

Collects current airport weather observations (METAR) from [aviationweather.gov](https://aviationweather.gov),
the site of the NOAA / NWS Aviation Weather Center. The actor reads the site's public data API, so it is fast,
returns clean structured records and needs no login.

### What it collects

One record per METAR report: station id (ICAO), station name, region and country, coordinates, elevation,
observation time, report type, flight category (VFR / MVFR / IFR / LIFR), temperature, dew point, wind direction,
speed and gust, visibility, present weather, cloud cover and layers, altimeter and sea level pressure, the raw
METAR text and a link to the station page on aviationweather.gov.

### Input

- `stations` (list): ICAO ids such as `KJFK` or `KJFK,KLAX,EGLL`, or state / country groups such as `@CA`, `@NY`, `@GB`.
  Every entry is one request. Default: `@CA`.
- `bbox` (text, optional): area as `lat_min,lon_min,lat_max,lon_max`, for example `34,-120,38,-115`.
- `hoursBack` (integer, 1-24): look-back window. 1 returns the latest report of each station.
- `flightCategories` (list, optional): keep only VFR, MVFR, IFR or LIFR stations.
- `maxResults` (integer, default 50): how many records to collect at most.
- `proxyConfiguration` (proxy editor): Apify RESIDENTIAL by default, used from the first request. Only an
  explicit `useApifyProxy: false` runs without a proxy.

### Example output

```json
{
  "title": "KJFK - New York/JF Kennedy Intl, NY, US",
  "url": "https://aviationweather.gov/data/metar/?ids=KJFK",
  "icaoId": "KJFK",
  "stationName": "New York/JF Kennedy Intl",
  "region": "NY",
  "country": "US",
  "latitude": 40.6392,
  "longitude": -73.7639,
  "elevationM": 3,
  "observedAt": "2026-11-21T04:51:00Z",
  "reportType": "METAR",
  "flightCategory": "VFR",
  "temperatureC": 11.1,
  "dewpointC": 6.1,
  "windDirectionDeg": 0,
  "windVariable": false,
  "windSpeedKt": 0,
  "visibilityMi": "10+",
  "cloudCover": "SCT",
  "clouds": [{"cover": "SCT", "baseFt": 25000}],
  "altimeterHpa": 1026.8,
  "rawMetar": "METAR KJFK 210451Z 00000KT 10SM SCT250 11/06 A3032 RMK SLP268 T01110061 402060072 $"
}
```

### Price per result

You pay per result delivered to the dataset: the platform bills every dataset item itself, the actor
code never charges. The run stops by itself when your charge limit is reached.

### Free-plan preview

On a Free Apify plan a run is a capped preview: only the first entry of the search list is requested, and the run's
status message and the `OUTPUT` record say what was capped. No placeholder rows are ever added to the dataset.
A paid plan unlocks the full result.

# Actor input Schema

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

ICAO station ids (for example KJFK or KJFK,KLAX,EGLL) or state / country groups written with an at sign (for example @CA, @NY, @GB). Each entry is one request. Leave empty to use the bounding box only.

## `bbox` (type: `string`):

Optional area as `lat_min,lon_min,lat_max,lon_max`, for example `34,-120,38,-115`.

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

Look-back window in hours (1-24). 1 returns the latest observation of each station, more hours also return earlier reports.

## `flightCategories` (type: `array`):

Keep only these flight categories. Leave empty to keep all.

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

Maximum number of records to collect.

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

Proxy settings. A residential proxy is used by default for reliable access.

## Actor input object example

```json
{
  "stations": [
    "@CA"
  ],
  "hoursBack": 1,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset with the collected records.

# 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 = {
    "stations": [
        "@CA"
    ],
    "hoursBack": 1,
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/aviationweather-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 = {
    "stations": ["@CA"],
    "hoursBack": 1,
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/aviationweather-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 '{
  "stations": [
    "@CA"
  ],
  "hoursBack": 1,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/aviationweather-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/aviationweather-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/Um07D6F3HixcFUOcv/builds/raqgEE4TfVC00sT6b/openapi.json
