# WeatherAPI **Provider:** WeatherAPI.com **Category:** weather **Base URL:** `https://api.weatherapi.com/v1` **Auth:** api-key — `?key=YOUR_API_KEY` **Rate Limit:** 1,000,000 calls/month (free) **Free Tier:** Yes — [object Object] **Pricing:** Free tier available (freemium) **Docs:** https://www.weatherapi.com/docs/ ## Description WeatherAPI.com provides a simple, affordable weather API covering real-time conditions, 14-day hourly forecasts, 30+ years of historical weather data, marine weather, astronomy data (sunrise/sunset/moonphase), and air quality index. Supports lookup by city name, ZIP code, IP address, UK postcode, and lat/lon coordinates. Covers 2 million+ locations globally with data from 200+ weather stations and models. ## Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | GET | `https://api.weatherapi.com/v1/current.json` | Current weather conditions for any location | | GET | `https://api.weatherapi.com/v1/forecast.json` | Up to 14-day hourly and daily forecast | | GET | `https://api.weatherapi.com/v1/history.json` | Historical weather data from 2010 onward (paid plans) | | GET | `https://api.weatherapi.com/v1/search.json` | Location autocomplete for search boxes | | GET | `https://api.weatherapi.com/v1/astronomy.json` | Sunrise, sunset, moonrise, moonset, and moon phase | | GET | `https://api.weatherapi.com/v1/marine.json` | Marine/surf conditions including tide and swell | ## Authentication Pass your API key as the key query parameter. Register for a free key at weatherapi.com. ``` ?key=YOUR_API_KEY ``` ## Sample Request ```bash curl "https://api.weatherapi.com/v1/forecast.json?key=$WEATHER_API_KEY&q=London&days=3&aqi=yes" ``` ## Sample Response ```json { "location": { "name": "London", "country": "United Kingdom", "lat": 51.52, "lon": -0.11 }, "current": { "temp_c": 12.0, "condition": { "text": "Partly cloudy" }, "wind_mph": 9.4, "humidity": 76 }, "forecast": { "forecastday": [{ "date": "2024-03-15", "day": { "maxtemp_c": 14.0, "mintemp_c": 8.0 } }] } } ``` ## Pricing Details Free: 1M calls/mo (3-day forecast, no history). Starter: $4/mo. Standard: $12/mo. Business: $199/mo. --- *Source: [API Map](https://apimap.dev/apis/weatherapi/) — CC BY 4.0*