Weather Scraper – Forecast & History for Any City
Pricing
from $2.00 / 1,000 result rows
Weather Scraper – Forecast & History for Any City
Daily weather forecast and history for any city worldwide from the free Open-Meteo APIs. No API key, no browser: city name or coordinates in, one row per day out with temperatures, precipitation and a readable weather description.
Daily weather forecast and history for any city — free, key-free, no browser, with a readable weather description in every row.
Open-Meteo is a free, open weather API that aggregates national meteorological services into one clean JSON interface. It needs no API key, no sign-up and no browser, and it covers locations worldwide.
This Actor wraps the three official Open-Meteo endpoints — geocoding, forecast and historical archive — and returns one flat row per day with high/low/average temperature, precipitation and a human-readable weather description.
Why this Actor
| Typical scrapers | This Actor | |
|---|---|---|
| Data source | HTML weather pages, often JS-rendered | Official Open-Meteo APIs (forecast + archive) |
| API key | Usually required | None — completely free and anonymous |
| Browser / scraping stack | Headless browser, proxies, CAPTCHA handling | None — plain HTTP JSON, standard library only |
| Output | Raw numbers, coded conditions | One flat row per day, with a readable weather description |
| Coverage | Limited to scraped pages | Any city or coordinates worldwide |
What you get
One dataset item per day.
| Field | Type | Description |
|---|---|---|
city | string | Resolved city name (from geocoding) or the coordinates string when coordinates were passed directly. |
latitude | number | Location latitude at full precision, in decimal degrees. |
longitude | number | Location longitude at full precision, in decimal degrees. |
country | string | Country of the resolved location. Empty when coordinates were passed directly. |
date | string | The day this record describes, YYYY-MM-DD (local time of the location). |
mode | string | Which API produced the row: forecast or history. |
temperature_max | number | Daily high temperature in degrees Celsius. |
temperature_min | number | Daily low temperature in degrees Celsius. |
temperature_avg | number | Daily mean temperature in degrees Celsius, averaged from the hourly data; falls back to the mean of max and min when hourly data is unavailable. |
precipitation | number | Total precipitation for the day in millimetres. |
weather_desc | string | Readable description of the day's weather (Clear sky, Rain, Snow, Thunderstorm, ...) mapped from the WMO weather code. |
latitude-- Passed to and returned from Open-Meteo at full precision — never rounded.temperature_avg-- Averaged from the hourly temperature series; when hourly data is missing it falls back to the midpoint of the daily max and min.weather_desc-- Mapped from the WMO weather code into plain English (e.g. 0 -> Clear sky, 63 -> Moderate rain, 73 -> Moderate snow), so no downstream decoding is needed.
Input
| Parameter | Type | Default | Description |
|---|---|---|---|
city | string | (empty) | Required. City name, e.g. "Beijing" or "New York", resolved to coordinates through Open-Meteo geocoding. You may also pass coordinates directly as "lat,lon", e.g. "39.9042,116.4074". |
mode | string (enum) | forecast | forecast returns upcoming days; history returns past daily weather from the Open-Meteo archive. |
forecastDays | integer | 7 | Number of upcoming days to return, from today onward. Only used when mode is forecast. |
startDate | string | (empty) | First day of the historical range, YYYY-MM-DD. Only used when mode is history. Defaults to 7 days ending today. |
endDate | string | (empty) | Last day of the historical range, YYYY-MM-DD. Only used when mode is history. Defaults to today. |
A note on city
A city name is resolved through Open-Meteo geocoding. For full control you can skip geocoding entirely and pass coordinates as "lat,lon" — for example "52.52,13.405" for Berlin.
A note on mode
forecast pulls upcoming days from the forecast API; history pulls finished days from the archive API. The two modes never mix in one run.
A note on startDate
Dates must be YYYY-MM-DD. In history mode, if you omit both dates the Actor returns the last 7 days up to today.
Usage examples
1. 7-day forecast for Beijing
{"city": "Beijing","mode": "forecast","forecastDays": 7}
2. Last week of history for New York
{"city": "New York","mode": "history"}
Schedule a daily forecast run for a city to track upcoming conditions, or a weekly history run to build a temperature/precipitation time series. De-duplicate on date to keep an ever-growing weather table.
Data notes
- Temperatures are in degrees Celsius and precipitation in millimetres, as returned by Open-Meteo.
- The forecast endpoint covers up to 16 days ahead;
forecastDaysis clamped to that range. - The archive endpoint has a slight reporting lag, so the most recent 1-2 days may not appear in history mode yet — use forecast mode for today and the near future.
- Coordinates are never rounded: the exact values Open-Meteo resolves or accepts are passed through to the API and returned in
latitude/longitude.
Pricing
This Actor uses pay-per-event pricing. You only pay for what you actually get.
| Event | Price | When it is charged |
|---|---|---|
| Actor start | $0.002 | Once per run |
| Result row | $0.002 per row | For every row saved to the dataset |
That works out to $2 per 1,000 rows. A typical run returning 50 rows costs about $0.10 in total.
No subscription is required. You can cap your spend with the max cost per run setting in Apify Console, and an empty or invalid input charges only the start event.
FAQ
Do I need an API key?
No. Open-Meteo's geocoding, forecast and archive APIs are free, public and anonymous. There is no key to obtain, store or rotate.
Is this data reliable enough for real use?
Open-Meteo combines models and observations from national weather services. It is intended for informational and planning use; for safety-critical decisions (aviation, outdoor events in severe weather) always confirm with an official meteorological authority.
Why does history mode not include today?
The historical archive is published with a small lag, typically 1-2 days, because observations need to be quality-checked. Today and the coming days belong to forecast mode.
Related Actors
More data tools from the same publisher:
- App Store Reviews Scraper - App Store and Steam user reviews with ratings, versions and dates.
- EU Tenders Scraper - EU public procurement notices from the official TED API.
- ClinicalTrials.gov Scraper - Clinical trial records with phase, status and sponsor.
- Federal Register Scraper - US Federal Register documents, rules and notices.
- arXiv Scraper - arXiv papers with authors, abstracts and PDF links.
- Hacker News Scraper - Hacker News stories by keyword, top ranking or newest.
Disclaimer
All data is retrieved in real time from Open-Meteo, which redistributes data from national meteorological services via its public APIs. This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Open-Meteo or any weather service.
Weather data is provided for informational purposes only and may be delayed, incomplete or incorrect. Do not use it for life-safety, navigation or safety-critical decisions without verification from an official meteorological authority.