# Historical Weather Lookup (`snappytools/open-meteo-historical-weather-api`) Actor

Give it a place name or coordinates and a date range, and it returns the exact recorded daily weather for that place: highest and lowest temperature, rainfall and peak wind, day by day, from the Open-Meteo archive. You type in a list of Locations, a Start date and an End date.

- **URL**: https://apify.com/snappytools/open-meteo-historical-weather-api.md
- **Developed by:** [Snappy](https://apify.com/snappytools) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 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?

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

## Historical Weather Lookup – historical weather API and daily weather export

Give it a place name or coordinates and a date range, and this historical weather API returns the recorded daily weather for that place: highest and lowest temperature, rainfall and peak wind, day by day, from the Open-Meteo archive.

You type in a list of **Locations** (like `Sydney` or `40.7128,-74.0060`), a **Start date** and an **End date**. You get back one row per location, with `placeName`, `country`, `latitude`, `longitude`, `maxTemperatureC`, `minTemperatureC`, `totalPrecipitationMm` and a `daily` array holding each day.

You can run it on a schedule to build up a weather log, for example each Monday for the week before.

### Why this one

- **One row per input, in order.** Each line you enter gets its own row, so your list and the results line up.
- **Archive data.** Every number comes from the Open-Meteo Historical Weather API, and each row links to it in `source.url`.
- **Names or coordinates.** Type a city name or pass exact latitude and longitude.
- **Summary plus daily detail.** You get range totals for quick filtering and a day-by-day array when you need it.
- **Long history.** Data goes back to 1940.
- **Cheap.** $1.50 per 1,000 results, and runs with no results cost nothing.

### Quick start

```json
{
  "locations": ["Sydney", "London", "40.7128,-74.0060"],
  "startDate": "2024-01-01",
  "endDate": "2024-01-07",
  "includeDaily": true
}
```

This returns three rows, each with seven days of weather for Sydney, London and New York.

### What you can use it for

| Who | What for |
|---|---|
| Insurance and claims staff | Check rainfall or wind on the day of a reported loss |
| Event and hospitality managers | Compare attendance with past weather |
| Retail and demand analysts | Add temperature and rain to sales models |
| Construction project managers | Back up weather delay claims with daily records |
| Researchers and students | Pull daily series for many places at once |

### How to use it

1. Click **Try for free**.
2. In **Locations**, add one place per line, such as `Melbourne` or `-37.81,144.96`. You can add up to 50.
3. Set **Start date**, e.g. `2024-06-01`.
4. Set **End date**, e.g. `2024-06-30`. The range can be at most 366 days and cannot be in the future.
5. Leave **Include daily rows** on if you want each day, or turn it off for summary totals only.
6. Click **Start**.

Tip: use **Schedules** to run it weekly and keep a rolling weather log.

### What data you get

Each row covers one location over your date range.

| Field | What it is | Example |
|---|---|---|
| `id` | Stable id from the input and dates | `sydney:2024-01-01:2024-01-07` |
| `input` | The line you typed | `Sydney` |
| `status` | Result of the lookup | `ok` |
| `reason` | Plain reason when the lookup did not work | `null` |
| `placeName` | Resolved place name | `Sydney` |
| `country` | Country of the place | `Australia` |
| `latitude` | Latitude used | `-33.86785` |
| `longitude` | Longitude used | `151.20732` |
| `timezone` | Local timezone used for days | `Australia/Sydney` |
| `startDate` | First day returned | `2024-01-01` |
| `endDate` | Last day returned | `2024-01-07` |
| `dayCount` | Days in the range | `7` |
| `maxTemperatureC` | Highest daily maximum in the range | `27.4` |
| `minTemperatureC` | Lowest daily minimum in the range | `16.3` |
| `avgMaxTemperatureC` | Mean of daily maximums | `25.2` |
| `totalPrecipitationMm` | Total precipitation in the range | `5.5` |
| `maxWindSpeedKmh` | Highest daily peak wind | `31.7` |
| `daily` | One entry per day with `date`, `temperatureMaxC`, `temperatureMinC`, `precipitationMm`, `windSpeedMaxKmh` | `{"date": "2024-01-01", "precipitationMm": 1.4, "temperatureMaxC": 23.6, ...}` |
| `checkedAt` | When the lookup ran (ISO 8601) | `2026-11-20T08:47:35.238Z` |
| `source` | Service name, link and API URL used | `Open-Meteo Historical Weather API` |

### Pricing

| Event | Price |
|---|---|
| Result (one per row written to the dataset) | $0.0015 |

There is no start fee, and runs with no results cost nothing.

| Run | Cost |
|---|---|
| 100 results | $0.15 |
| 1,000 results | $1.50 |
| 10,000 results | $15.00 |

### Good to know

- **Limits**: up to 50 locations per run and up to 366 days per range.
- **Data source**: the public Open-Meteo historical weather archive. Data goes back to 1940.
- **Units**: temperature in Celsius, precipitation in millimetres, wind in km/h.
- **Not included**: forecasts, hourly values and live conditions.
- **Place names**: use coordinates as `latitude,longitude` when a name could mean more than one place.
- **Not affiliated**: this tool isn't affiliated with or endorsed by Open-Meteo.

### FAQ

**Is there a historical weather API I can use without writing code?** Yes. Enter your places and dates here and run it, or call it through the Apify API.

**How do I export historical weather to Excel or CSV?** Run it, open the Output tab and download the results as Excel or CSV.

**How far back does the weather data go?** It goes back to 1940.

**Can I look up weather by coordinates?** Yes. Enter them as `latitude,longitude`, for example `40.7128,-74.0060`.

### Getting the data out

Download results as Excel, CSV or JSON from the Output tab. Send them to Google Sheets, Slack, Zapier, Make or webhooks from the **Integrations** tab. Every run is available through the Apify API, and you can schedule runs from **Schedules**.

### Questions or problems

Open an issue on the **Issues** tab and include the run link. I reply within one business day.

### Related tools

- [Bulk Email Syntax and MX Validator](https://apify.com/snappytools/email-syntax-mx-validator): check email syntax and mail servers in bulk
- [TED Europa Tender Scraper](https://apify.com/snappytools/ted-europa-tender-scraper): export public tenders from TED Europa
- [Companies House Company Scraper](https://apify.com/snappytools/companies-house-uk-scraper): pull UK company records from Companies House

# Actor input Schema

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

One place per line: a place name (e.g. Sydney) or decimal coordinates as latitude,longitude (e.g. 40.7128,-74.0060). Up to 50 per run. You get one row per line, in the same order.

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

First day of the range in YYYY-MM-DD format, e.g. 2024-01-01. Data goes back to 1940.

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

Last day of the range in YYYY-MM-DD format, e.g. 2024-01-07. Range is at most 366 days and cannot be in the future.

## `includeDaily` (type: `boolean`):

When on, each record also holds a `daily` array with one entry per day. Turn off for summary totals only.

## Actor input object example

```json
{
  "locations": [
    "Sydney",
    "London",
    "40.7128,-74.0060"
  ],
  "startDate": "2024-01-01",
  "endDate": "2024-01-07",
  "includeDaily": true
}
```

# Actor output Schema

## `results` (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 = {
    "locations": [
        "Sydney",
        "London",
        "40.7128,-74.0060"
    ],
    "startDate": "2024-01-01",
    "endDate": "2024-01-07"
};

// Run the Actor and wait for it to finish
const run = await client.actor("snappytools/open-meteo-historical-weather-api").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 = {
    "locations": [
        "Sydney",
        "London",
        "40.7128,-74.0060",
    ],
    "startDate": "2024-01-01",
    "endDate": "2024-01-07",
}

# Run the Actor and wait for it to finish
run = client.actor("snappytools/open-meteo-historical-weather-api").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 '{
  "locations": [
    "Sydney",
    "London",
    "40.7128,-74.0060"
  ],
  "startDate": "2024-01-01",
  "endDate": "2024-01-07"
}' |
apify call snappytools/open-meteo-historical-weather-api --silent --output-dataset

```

## MCP server setup

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

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/WtulwqP6VZCALREo2/builds/MLrQ3gGlOq0Y4xDdr/openapi.json
