API Directory › 🌦 Weather › Visual Crossing Weather
API KeyHTTPSCORS

Visual Crossing Weather API

Historical and forecast weather data with an easy free tier for developers.

Category
Auth
API Key
HTTPS
Yes
CORS
Yes
Open Visual Crossing Weather docs ↗

What it does

Visual Crossing’s Timeline Weather API returns history, current conditions and forecast for a location in a single call, with a consistent schema. Historical coverage is deep — hourly data back to the 1970s for many places — and output can be JSON or CSV.

Base URL

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline

Authentication

Sign up for a free key and pass it as ?key=YOUR_KEY. The location and optional date range go in the path: /timeline/{location}/{start}/{end}.

Code examples

curl (forecast)
curl -s "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/London,UK?unitGroup=metric&key=$VC_KEY"
Python (history)
import requests

loc, start, end = "Chicago,IL", "2025-07-01", "2025-07-07"
url = ("https://weather.visualcrossing.com/VisualCrossingWebServices/"
       f"rest/services/timeline/{loc}/{start}/{end}")
r = requests.get(url, params={"unitGroup": "us", "key": KEY,
                              "include": "days"}, timeout=20)
for day in r.json()["days"]:
    print(day["datetime"], day["tempmax"], day["tempmin"], day["conditions"])

Rate limits & quotas

Free plan: 1,000 records/day — and a ‘record’ is one result row, so a 15-day hourly request costs 360 records, not 1. Track usage in the dashboard. Over the limit returns HTTP 429. Use include=days (not hours) and elements= to keep record counts down.

Key response fields

days[].datetime / tempmax / tempmin / tempDaily summary rows
days[].hours[]Hourly detail when include=hours
currentConditionsNow-cast block (temp, conditions, wind, humidity)
days[].conditions / iconText and icon key
resolvedAddress / latitude / longitudeHow the API interpreted your location

Common errors

401 / "API key ... not found"Key missing or wrong.
429Daily record allowance used up (remember: rows, not requests).
400 "Bad API Request"Malformed date in the path or unknown parameter.

When to use it (and alternatives)

The standout free choice when you need historical weather alongside forecast in one consistent call — great for backtesting, analytics and reports. For pure forecast at higher volume, Open-Meteo is cheaper.

FAQ

Why did one request use 300+ of my daily allowance?

Billing is per result record. An hourly request for several days returns hundreds of hour rows. Request include=days for daily summaries, or narrow elements=, to stay within 1,000/day.

Can I get history and forecast together?

Yes — that is the point of the Timeline API. Give a start date in the past and an end date in the future and it stitches observed history, current conditions and forecast into one response.

How far back does history go?

Often to the 1970s (hourly from around 1970–2000 depending on location, daily earlier). Coverage and resolution vary by region.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

Weather Checker

Related Weather APIs

← Back

More Weather APIs · All 196 APIs