Visual Crossing API

⭐ Beginner's Pick Weather / API Key Beginner HTTPS CORS
1,000 records/day (no per-minute limit specified)

Overview

Visual Crossing offers comprehensive historical weather data, current conditions, and forecasts for any location worldwide, making it particularly valuable for data analysis and building weather-driven insights. It supports queries by city name, address, or coordinates and returns data in JSON or CSV format. Beginners appreciate its clear documentation and a free tier that allows up to 1,000 records per day without a credit card.

💡

Beginner Tip

Sign up at visualcrossing.com for a free API key. The timeline endpoint is the most versatile — you can request historical data, forecasts, or both by changing the date range in the URL.

Available Data

Location
Timezone
Current Conditions
temperature
weather conditions
humidity

Example Response

JSON Response
{
  "location": "Tokyo",
  "temperature": {
    "current": 22,
    "feels_like": 24,
    "min": 18,
    "max": 26
  },
  "condition": "Partly Cloudy",
  "humidity": 65,
  "wind": {
    "speed": 12,
    "direction": "NE"
  },
  "forecast": [
    {
      "date": "2025-01-16",
      "high": 25,
      "low": 17,
      "condition": "Sunny"
    }
  ]
}

Field Reference

days Array of daily weather objects covering the requested date range
days[].datetime Date string in YYYY-MM-DD format for each day
days[].tempmax Maximum temperature for the day in the requested unit group
days[].tempmin Minimum temperature for the day
days[].precip Total precipitation amount in millimeters (or inches for US units)
days[].conditions Human-readable summary of weather conditions such as "Partially cloudy" or "Rain, Overcast"

Implementation Example

// Get weather timeline for a location
const url = "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/London,UK?key=YOUR_API_KEY";

const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();

console.log(`Location: ${data.resolvedAddress}`);
console.log(`Timezone: ${data.timezone}`);
console.log(`Current Conditions: ${data.currentConditions.temp}°F, ${data.currentConditions.conditions}`);
console.log(`Days in forecast: ${data.days.length}`);
data.days.slice(0, 3).forEach(day => {
  console.log(`${day.datetime}: ${day.tempmax}°F / ${day.tempmin}°F - ${day.conditions}`);
});

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized API key missing or incorrect
Add key=YOUR_API_KEY as a query parameter; do not put it in a header
Empty days array Requested a future date range beyond the forecast window
Free tier forecasts go up to 15 days ahead; historical data is available from 1970 onwards on paid plans
CSV returned instead of JSON contentType parameter not set to json
Add contentType=json to your request URL to ensure JSON output

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Weather
Difficulty Beginner
Verified: 2026-04-04

Alternatives to Visual Crossing

Technical alternatives for different use cases.

Strong historical weather data going back decades

Better For

Real-time weather alerts and push notifications

Trade-off

Historical weather analysis and climate research

Similar APIs

View All →