+Weather API
Current weather, hourly and 10-day forecasts, history, official alerts, air quality and sunrise times in one JSON API.
The API.SH Weather API covers the whole weather stack under one key. Ask by coordinates, place name, postal code or GeoNames id and get current conditions with the nearest station report, an hourly forecast and a daily forecast up to 10 days, observed history back to the 1800s at long-running stations, active official warnings, air quality and sunrise, sunset and moon phase. Forecasts come from MET Norway, history from NOAA NCEI.
- 8 endpoints
- from $1 / 1,000 calls
- 1,000 free credits / month
- failed calls free
GET https://api.api.sh/weather/v1/ air-quality
{ "success": true } What you can build with the Weather API
Weather in apps and websites
Show current conditions, feels-like, wind, UV and precipitation probability, plus hourly and daily forecasts, for a place a user types in.
Historical weather for analysis
Pull daily observations for up to a year per call, or hourly reports for up to a week, from the nearest station with records, for sales, energy or insurance models.
Severe weather alerting
Check active official warnings for a location, US state or marine area, with severity, urgency, onset, expiry and instructions, in the US, Canada and Norway.
Air quality monitoring
Get the official AQI and forecast in the US, Canada and Mexico, and nearby sensor PM2.5 and PM10 with US and European AQI bands worldwide.
Outdoor and event planning
Combine the 10-day forecast with sunrise, sunset, day length and moon phase to plan shoots, sports, farming or travel.
Weather data you get
Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.
Weather API endpoints and prices
Every Weather endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing
| Historical weather /weather/ | $1 · $2 PAYG 1 credit |
| Air quality /weather/ | $1 · $2 PAYG 1 credit |
| Weather alerts and warnings /weather/ | $1 · $2 PAYG 1 credit |
| Sunrise, sunset and moon phase /weather/ | $1 · $2 PAYG 1 credit |
| Current weather /weather/ | $1 · $2 PAYG 1 credit |
| Daily weather forecast (10 days) /weather/ | $1 · $2 PAYG 1 credit |
| Weather forecast (current, hourly and daily) /weather/ | $1 · $2 PAYG 1 credit |
| Hourly weather forecast /weather/ | $1 · $2 PAYG 1 credit |
Call the Weather API
Air quality: GET https://api.api.sh/weather/
curl "https://api.api.sh/weather/v1/air-quality" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/weather/v1/air-quality",
params={},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/weather/v1/air-quality");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); # Google Sheets (API.SH add-on)
=APISH("/weather/v1/air-quality")
# Zapier, Make, n8n (verified node): pick the API.SH app,
# choose "Weather" and "Air quality".
# AI agents (Claude, ChatGPT, Cursor): add the
# API.SH MCP server https://api.sh/mcp - Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
- Create an API keyOne key works for all 483 platforms.
- Send the requestJSON back in one call. Add
output=csvoroutput=ndjsonfor files.
Why API.SH for Weather data
- Public data only: no Weather login, cookies or account needed
- One key and one response shape for Weather and 482 other platforms
- Built and maintained by API.SH, not third-party publishers
- Pay per call; errors on our side cost nothing
- Live status for every endpoint
API.SH vs the official Weather API
Several sources behind this API publish free APIs of their own: MET Norway's Weather API and the US National Weather Service API at api.weather.gov are free, and NOAA, EPA AirNow and Environment Canada share open data. API.SH joins them so one call by place name or postal code returns forecasts, history, alerts or air quality in one JSON shape.
OpenWeather, WeatherAPI.com, Visual Crossing and Meteosource sell their own weather models with free tiers and paid plans; Open-Meteo is free for non-commercial use. API.SH is a fit when you want forecast, station history, alerts and air quality under the key you already use for other API.SH data.
Weather API questions
What weather data can I get?+
Current conditions (/weather/v1/current), combined forecast (/weather/v1/forecast), hourly forecast (/weather/v1/hourly), daily forecast up to 10 days (/weather/v1/daily), historical weather (/weather/v1/history), official alerts (/weather/v1/alerts), air quality (/weather/v1/air-quality) and sunrise, sunset and moon phase (/weather/v1/astronomy).
How much does the Weather API cost?+
Every Weather endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.
Are weather APIs free? Is there a free weather API?+
Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /weather/v1/air-quality at 1 credit each. Free sources exist too, such as MET Norway, api.weather.gov and Open-Meteo for non-commercial use, each with its own terms.
How do I get an API key for weather?+
Sign up at api.sh and copy your key from the dashboard. The same key works for every weather endpoint; you do not need separate keys for MET Norway, NOAA or AirNow.
Where does the data come from?+
Forecasts: MET Norway (CC BY 4.0). History: NOAA NCEI station records. Alerts: US National Weather Service, MET Norway and Environment and Climate Change Canada. Air quality: EPA AirNow and Sensor.Community.
How far back does historical weather go?+
Daily records go back to the 1800s at long-running stations, from the nearest station within about 150 km that has data for your dates. Recent days arrive with a few days' delay.
Can I look up weather by city name or postal code?+
Yes. Every endpoint accepts coordinates, a place name (q), a postal code with country, or a GeoNames id, and units and language can be set.
How do I get started?+
1. Sign up at api.sh. 2. Copy your API key. 3. Call /weather/v1/forecast with q set to a city name. Request examples and every parameter are in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.