# Weather by city, with a daily archive

> Temperature and precipitation for cities around the world, from two open national weather services, kept as a daily archive you can query or download.

Canonical page: https://scrapercompany.com/data/weather. Collected through the day, with a daily archive.

## About this data

Each row is one city with the latest values we stored for it. Forecasts are easy to find; a clean archive of what each day looked like, city by city, is not. We keep one, so you can line weather up against sales, bookings or prices without stitching services together.

Values come from the Norwegian Meteorological Institute (MET Norway), which covers the whole world, and the US National Weather Service for US cities. Both publish open data; MET Norway’s licence asks for the attribution under the table.

## Columns

- City (`city`)
- Country (`country`)
- Every value column the build carries (temperatures, precipitation); the summary documents each one
- Source of each row

## Sources

- [MET Norway](https://api.met.no)
- [US National Weather Service](https://www.weather.gov/documentation/services-web-api)

Weather data from MET Norway (CC BY 4.0) and the US National Weather Service (public domain).

## Get the data

- Latest values, free (a sample, keyless, rate limited per IP): `https://api.scrapercompany.com/datasets/summary?name=weather`
- Every item: `GET https://api.scrapercompany.com/v1/datasets/weather/latest`, 1 credit per call
- One item's history: `GET https://api.scrapercompany.com/v1/datasets/weather/history`, 1 credit per call
- Full history as SQLite: `GET https://api.scrapercompany.com/v1/datasets/weather/download`, 500 credits

Sources in one line: MET Norway and US National Weather Service. Sign-up: https://api.scrapercompany.com/signup. Pricing: https://scrapercompany.com/pricing. More datasets: https://scrapercompany.com/data.md

## Frequently asked questions

### Is the Weather by city table free?

Yes. This page shows a sample of the latest build for free, with no account. To get every item, call GET /v1/datasets/weather/latest on the API for 1 credit per call.

### How often is it refreshed?

The data is collected through the day, with a daily archive. A value is stored only when it changes, with the first and last day it was seen, so the history is complete without repeating unchanged rows.

### Can I download the full history?

Yes. GET /v1/datasets/weather/download returns a short-lived link to the whole dataset as one SQLite file, every item and every recorded change since collection started, for 500 credits. Open it with sqlite3, DuckDB, pandas or Datasette.

### Where does the data come from?

It is collected from MET Norway and US National Weather Service, and every row records its source. Weather data from MET Norway (CC BY 4.0) and the US National Weather Service (public domain).

### Can I use the weather data in my product?

Yes, with attribution. MET Norway publishes under CC BY 4.0, which asks you to credit it; the National Weather Service’s data is in the US public domain. The downloaded file keeps each row’s source, so you can credit the right one.
