# Weather Scraper (Open-Meteo) – Forecast & History (`ninhothedev/weather-scraper`) Actor

$0.04/1K 🔥 Fast weather scraper (Open-Meteo)! Current, hourly & daily forecasts — temp, rain, wind & more for any city. No key. JSON, CSV, Excel or API in seconds. Enter cities or coords & pull thousands of weather points ⚡

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

## Pricing

from $0.04 / 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/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

## Weather Scraper (Open-Meteo) – Forecast & Historical Data

**Get clean weather data by city or coordinates: current conditions, up to a 16-day daily forecast, and decades of historical archive — temperature, precipitation, wind, humidity and weather codes. As JSON, CSV or Excel. Free, no key, no proxy.**

### 💵 Pricing

**Pay per result — $0.0004 per item (~$0.40 per 1,000 locations).** No subscription, no proxy needed. You only pay for the locations you scrape, and new Apify accounts include free monthly credits so you can test it for **$0**.

### 🔎 What can it extract?

- **Current conditions** — temperature, humidity, wind speed, weather code
- **Daily forecast** — up to 16 days of max/min temperature, precipitation and weather code
- **Historical archive** — daily temperature and precipitation for any past date range
- **Geocoding built in** — pass a city name, get back lat/lon + country automatically
- Query by city name **or** raw coordinates

### 🚀 How do I use it?

1. Click **Try for free**.
2. Set the input (see example below).
3. Click **Start** and download results as JSON, CSV or Excel — or pull them via the API / schedule them.

### ⚙️ Input example

```json
{
  "mode": "cities",
  "cities": ["Berlin", "Tokyo"],
  "forecastDays": 7
}
```

Coordinates mode: `{ "mode": "coordinates", "coordinates": ["52.52,13.41"] }`
Historical mode: `{ "mode": "historical", "cities": ["Berlin"], "startDate": "2024-01-01", "endDate": "2024-01-31" }`

### 📦 Output example

```json
{
  "location": "Berlin",
  "latitude": 52.52,
  "longitude": 13.41,
  "country": "Germany",
  "timezone": "Europe/Berlin",
  "current_temperature": 21.3,
  "current_humidity": 60,
  "current_weather_code": 3,
  "current_wind_speed": 12.5,
  "daily": [
    { "date": "2026-06-30", "temp_max": 24.0, "temp_min": 13.0, "precipitation": 0.0, "weather_code": 3 }
  ],
  "scraped_at": "2026-06-30T08:00:00+00:00"
}
```

### 🎯 Use cases

- **Dashboards** — live weather widgets and BI reports
- **Logistics** — route and delivery planning around conditions
- **Agriculture** — irrigation, frost and harvest scheduling
- **Travel** — trip planners and destination forecasts

### 💰 How much will it cost?

You pay only the per-result price (no proxy cost):
100 → ~$0.04 · 1,000 → ~$0.40 · 10,000 → ~$4

### 🆚 Why this one

| Feature | This actor | Others |
|---|---|---|
| Forecast + history + geocoding | ✅ | usually one |
| City name **or** coordinates | ✅ | coords only |
| No key needed | ✅ | sometimes |

### 🔗 Related actors

- [Geocoding Scraper](https://apify.com/ninhothedev/geocoding-scraper) — addresses ↔ coordinates
- [CoinGecko Crypto Scraper](https://apify.com/ninhothedev/coingecko-crypto-scraper) — crypto prices
- [Google News Scraper](https://apify.com/ninhothedev/google-news-scraper) — news articles
- [Wikipedia Scraper](https://apify.com/ninhothedev/wikipedia-scraper) — knowledge

### ❓ FAQ

**Key/proxy?** No. **How far back is history?** Open-Meteo archive covers decades of daily data. **Forecast horizon?** Up to 16 days.

### 🛟 Support

Found a bug or need an extra field? Open an issue on the actor — fixes and new fields ship fast.

### Legal & privacy

Data via the Open-Meteo public API.

***

**Keywords:** weather scraper, weather forecast API, historical weather, open-meteo, temperature data, precipitation, climate data, geocoding, JSON CSV Excel

# Actor input Schema

## `mode` (type: `string`):

cities (city names -> geocode + forecast), coordinates (lat,lon pairs -> forecast), or historical (city/coords + date range -> daily archive).

## `cities` (type: `array`):

City names to look up (mode=cities, or as targets for historical). Each is geocoded to lat/lon + country.

## `coordinates` (type: `array`):

Coordinate pairs as 'lat,lon' strings, e.g. '52.52,13.41' (mode=coordinates, or as targets for historical).

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

Number of forecast days to return (modes cities/coordinates). Open-Meteo supports up to 16.

## `startDate` (type: `string`):

Start date for historical mode, format YYYY-MM-DD (e.g. 2024-01-01).

## `endDate` (type: `string`):

End date for historical mode, format YYYY-MM-DD (e.g. 2024-01-31).

## `maxItems` (type: `integer`):

Maximum number of locations (dataset items) to scrape.

## Actor input object example

```json
{
  "mode": "cities",
  "cities": [
    "Berlin",
    "Tokyo"
  ],
  "coordinates": [],
  "forecastDays": 7,
  "startDate": "",
  "endDate": "",
  "maxItems": 100
}
```

# Actor output Schema

## `weather` (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 = {
    "cities": [
        "Berlin",
        "Tokyo"
    ],
    "forecastDays": 7,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/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 = {
    "cities": [
        "Berlin",
        "Tokyo",
    ],
    "forecastDays": 7,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/weather-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 '{
  "cities": [
    "Berlin",
    "Tokyo"
  ],
  "forecastDays": 7,
  "maxItems": 100
}' |
apify call ninhothedev/weather-scraper --silent --output-dataset

```

## MCP server setup

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