# Open-Meteo Weather Forecast (`gochujang/open-meteo-weather-forecast`) Actor

Free weather forecasts using Open-Meteo API. No API key needed.

- **URL**: https://apify.com/gochujang/open-meteo-weather-forecast.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

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

## Open-Meteo Weather Forecast — Current, Daily & Hourly (No API Key)

Free, keyless weather data for any location on Earth. Powered by [Open-Meteo](https://open-meteo.com/) — an open-source weather API with no rate limits for reasonable use.

### Features

- **No API key** — completely free, no registration required
- **Global coverage** — any latitude/longitude on Earth
- **Multiple data types**: current conditions, 16-day daily forecast, hourly forecast, or historical archive
- **Bulk locations** — fetch weather for dozens of cities in one run
- **Air quality** — optional PM2.5, PM10, ozone, AQI (European & US)
- **City name input** — just enter "Tokyo" or "Berlin", no coordinates needed
- **Flexible units** — Celsius/Fahrenheit, km/h, mph, m/s, knots

### Output

Each location produces a structured record including:

| Field | Description |
|-------|-------------|
| `location`, `country`, `latitude`, `longitude` | Location metadata |
| `timezone` | Detected timezone |
| `current_temperature_c` | Current temperature (°C) |
| `current_weather_description` | Human-readable WMO code (e.g. "Partly cloudy") |
| `current_humidity_percent` | Relative humidity % |
| `current_wind_speed_kmh` | Wind speed km/h |
| `current_precipitation_mm` | Current precipitation mm |
| `daily_forecast` | Array of up to 16 daily forecasts |
| `hourly_forecast` | Array of hourly forecasts |
| `air_quality_pm2_5` | PM2.5 µg/m³ (if enabled) |
| `air_quality_us_aqi` | US AQI index (if enabled) |

#### Daily forecast fields (per day)

`date`, `weather_description`, `temp_max_c`, `temp_min_c`, `sunrise`, `sunset`, `precipitation_sum_mm`, `precipitation_probability_max_pct`, `wind_speed_max_kmh`, `uv_index_max`

#### Hourly forecast fields (per hour)

`datetime`, `temperature_c`, `feels_like_c`, `humidity_percent`, `precipitation_probability_pct`, `precipitation_mm`, `weather_description`, `wind_speed_kmh`, `visibility_m`, `uv_index`

### Input Example

```json
{
  "locations": [
    {"name": "New York", "latitude": 40.7128, "longitude": -74.0060},
    {"name": "Tokyo", "latitude": 35.6762, "longitude": 139.6503},
    "Berlin"
  ],
  "dataType": "all",
  "forecastDays": 7,
  "temperatureUnit": "celsius",
  "windSpeedUnit": "kmh",
  "includeAirQuality": false
}
```

> **Tip:** You can mix coordinate objects `{"name":"...", "latitude":..., "longitude":...}` with plain city name strings like `"Paris"`. City names are resolved via the Open-Meteo Geocoding API.

### Data Types

| `dataType` | What you get |
|-----------|--------------|
| `current` | Live conditions only |
| `forecast` | Daily forecasts (up to 16 days) |
| `hourly` | Hour-by-hour forecast |
| `all` | Current + daily forecast (default) |
| `historical` | Past dates — requires `historicalStartDate` & `historicalEndDate` |

#### Historical example

```json
{
  "locations": [{"name": "London", "latitude": 51.5, "longitude": -0.13}],
  "dataType": "historical",
  "historicalStartDate": "2024-01-01",
  "historicalEndDate": "2024-01-31"
}
```

### Pricing

- **$0.003** per Actor start
- **$0.001** per location fetched

100 locations = ~$0.10

### Use Cases

- **Weather dashboards** — monitor real-time conditions across multiple cities
- **Agriculture & logistics** — plan around precipitation and wind forecasts
- **Travel apps** — display multi-city weather itineraries
- **Climate research** — download historical weather data for analysis
- **Alert systems** — detect extreme temperature or precipitation events

### Data Source

[Open-Meteo](https://open-meteo.com/) — open-source weather API. Data sourced from national weather services (NOAA GFS, ECMWF, DWD ICON, Météo-France AROME, and others). Updates every 1–6 hours depending on model.

### Technical Details

- Fully async (asyncio + httpx) — parallel fetching for all locations
- WMO weather code → human-readable description mapping included
- Auto-detects timezone for each location
- Handles geocoding errors gracefully (failed locations are logged, not fatal)

# Actor input Schema

## `locations` (type: `array`):

List of locations to get weather for. Each entry can be a city name (e.g. 'Tokyo'), or an object with lat/lon/name fields.

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

Which weather data to fetch: 'current' (now), 'forecast' (daily up to 16 days), 'hourly' (next 7 days hourly), 'historical' (past dates), or 'all' (current + forecast).

## `forecastDays` (type: `integer`):

Number of days to forecast (1-16). Used when dataType is 'forecast', 'hourly', or 'all'.

## `historicalStartDate` (type: `string`):

Start date for historical data in YYYY-MM-DD format. Required when dataType is 'historical'.

## `historicalEndDate` (type: `string`):

End date for historical data in YYYY-MM-DD format. Required when dataType is 'historical'.

## `temperatureUnit` (type: `string`):

Temperature unit: 'celsius' or 'fahrenheit'.

## `windSpeedUnit` (type: `string`):

Wind speed unit: 'kmh', 'ms', 'mph', or 'kn'.

## `includeAirQuality` (type: `boolean`):

Include air quality data (PM2.5, PM10, ozone, etc.) from Open-Meteo Air Quality API.

## Actor input object example

```json
{
  "locations": [
    {
      "name": "New York",
      "latitude": 40.7128,
      "longitude": -74.006
    },
    {
      "name": "London",
      "latitude": 51.5074,
      "longitude": -0.1278
    },
    {
      "name": "Tokyo",
      "latitude": 35.6895,
      "longitude": 139.6917
    }
  ],
  "dataType": "all",
  "forecastDays": 7,
  "historicalStartDate": "",
  "historicalEndDate": "",
  "temperatureUnit": "celsius",
  "windSpeedUnit": "kmh",
  "includeAirQuality": false
}
```

# Actor output Schema

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

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/open-meteo-weather-forecast").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("gochujang/open-meteo-weather-forecast").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 gochujang/open-meteo-weather-forecast --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/open-meteo-weather-forecast"
        }
    }
}

```

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/eQZxxMN7oHyh8hFh6/builds/BMfq5kQspTkLPoeXO/openapi.json
