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

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

Location
Timezone
Current Conditions
temperature
weather conditions
humidity

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
// 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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Weather
Difficulty Beginner
Listing details not endpoint-verified

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 →