Weatherstack API

⭐ Beginner's Pick Weather / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Weatherstack is a real-time and historical weather data API that covers over 200,000 locations worldwide. It returns current conditions, temperature, humidity, wind speed, and more in a simple JSON format. Beginners will find it easy to integrate into weather dashboards, travel apps, or any location-aware project.

💡

Beginner Tip

On the free plan you can only use HTTP, not HTTPS; upgrade to a paid plan if your app requires secure connections. Always pass the query parameter as a city name or coordinates like "New York" or "48.8566,2.3522".

Available Data

temperature
weather conditions
humidity
wind speed
forecast data

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

location.name The resolved city or place name for the queried location.
location.country The country where the queried location is situated.
current.temperature Current temperature in Celsius (or Fahrenheit if unit=f is set).
current.weather_descriptions Text descriptions of the current weather conditions, e.g., Partly cloudy.
current.humidity Current relative humidity expressed as a percentage.
current.wind_speed Wind speed in kilometers per hour at the queried location.

Implementation Example

const url = "https://weatherstack.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

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

101 invalid_access_key The access key is missing, incorrect, or not yet activated.
Copy your access key from the Weatherstack dashboard and pass it as the access_key query parameter.
105 https_access_restricted HTTPS requests are not available on the free subscription tier.
Switch to http:// instead of https://, or upgrade your plan to access HTTPS endpoints.
615 request_failed (no result) The location query string does not match any known location.
Try a more specific city name, ZIP code, or use latitude/longitude coordinates for precise location lookup.

Matrix Score Breakdown

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

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Weather
Difficulty Intermediate
Verified: 2026-04-04

Alternatives to Weatherstack

Technical alternatives for different use cases.

Much larger community and more feature-rich API

Better For

Weather alerts, forecasts, and air pollution data

Trade-off

Quick historical weather lookups

More generous free tier with astronomy data

Better For

Free tier with more API calls per month

Trade-off

Apilayer ecosystem compatibility

Similar APIs

View All →