Open documentation ↗Overview
Global historical and weather forecast data
Visual Crossing is a weather API from visualcrossing.com. Requests are authenticated with an API key. It is served over HTTPS and allows browser requests (CORS). Its OpenAPI description documents 5 endpoints.
At a glance
- Authentication
- API key
- HTTPS
- Yes
- CORS
- Yes
- Category
- Weather
- Base URL
https://weather.visualcrossing.com- Version
- 4.6
- Endpoints
- 5
- OpenAPI
- Specification ↗
- Spec updated
- 2023-03-06
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/forecast" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"const response = await fetch("https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/forecast", {
method: "GET",
headers: {
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/forecast",
headers={
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /VisualCrossingWebServices/rest/services/timeline/{location} | Historical and Forecast Weather API |
| GET | /VisualCrossingWebServices/rest/services/timeline/{location}/{startdate} | Historical and Forecast Weather API |
| GET | /VisualCrossingWebServices/rest/services/timeline/{location}/{startdate}/{enddate} | Historical and Forecast Weather API |
| GET | /VisualCrossingWebServices/rest/services/weatherdata/forecast | Weather Forecast API |
| GET | /VisualCrossingWebServices/rest/services/weatherdata/history | Retrieves hourly or daily historical weather records. |
Questions
Does the Visual Crossing API need an API key?
Yes. The Visual Crossing API uses API key authentication; the documentation explains how to get credentials.
Can I call the Visual Crossing API from the browser?
Yes. The Visual Crossing API sends CORS headers, so a web page can call it directly with fetch().
Does the Visual Crossing API support HTTPS?
Yes, the Visual Crossing API is served over HTTPS.
How many endpoints does the Visual Crossing API have?
Its OpenAPI description lists 5 endpoints in version 4.6. All of them are shown on this page.
What are alternatives to the Visual Crossing API?
Other Weather APIs include NOAA CO-OPS, NASA POWER, US Weather, AccuWeather, Aemet.
Similar weather APIs
Compare alternatives →NOAA CO-OPS
WeatherUS coastal tides, water levels, currents and meteorological observations
NASA POWER
WeatherGlobal solar and weather data for energy and agriculture
US Weather
WeatherUS National Weather Service
AccuWeather
WeatherWeather and forecast data
Aemet
WeatherWeather and forecast data from Spain
OpenWeatherMap
WeatherExplore OpenWeather's vast range of weather APIs including the versatile One Call API 4.0. Ideal for both beginners and professionals, our APIs offer current weather, minute-by-minute forecasts, historical data archives, and future predictions. Access weather data starting from 01-01-1979, global weather maps, solar irradiance predictions, air pollution data, and more. Our APIs support various for
Listed from public-apis (MIT), public-apis database (MIT), APIs.guru (CC0).