Weather API Documentation WeatherAPI.com provides access to free weather and geo data via a JSON/XML restful API. It allows developers to create desktop, web and mobile applications using this data very easy. We provide following data through our API: Real-time weather 14 day weather forecast Historical weather Marine Weather and Tide Data Future Weather (Upto 365 days ahead) Daily and hourly intervals Pollen forecast (Pro+ plan and above) New 15 min intervalNew (Enterprise only) Astronomy Time zone Sports Weather Maps New Location data Search or Autocomplete API Weather Alerts Air Quality Data Bulk Request Solar Irradiance Solar PV Energy Forecast (Business plan and above) New Agriculture: growing degree days, crop water use, spray windows, disease and frost risk (Business plan and above) New Evapotranspiration (Enterprise) Wind at 100m (Enterprise) New Pollen History (Enterprise) New Quick start Sign up free and copy your API key from your account. Call any endpoint with your key, for example current weather for London:https://api.weatherapi.com/v1/current.json?key=YOUR_API_KEY&q=London Explore every endpoint and parameter in the guides below, or try requests in the API Explorer. IntroductionGetting StartedSign up for a free WeatherAPI.com key and make your first weather API call in minutes: base URL, key, request formats and a working example.AuthenticationHow to authenticate WeatherAPI.com requests: pass your API key with the key parameter on every call, and keep it safe.Request URLWeatherAPI.com base URL, HTTP and HTTPS access, JSON and XML formats and the full list of API methods: current, forecast, history, marine, future and more.Request ParametersEvery WeatherAPI.com request parameter explained: q (city, lat/lon, postcode, IP), days, dt, hour, aqi, alerts, tp, pollen and more, with examples.MultilingualGet weather condition text in 40 languages with the WeatherAPI.com lang parameter. Full list of supported language codes, from Arabic to Zulu.Location ObjectFields returned in the WeatherAPI.com location object: name, region, country, lat, lon, tz_id, localtime and localtime_epoch.Weather AlertsGovernment weather alerts and warnings for the USA, UK, Europe and worldwide through WeatherAPI.com: alert fields, coverage and how to request them.Air QualityRealtime and forecast air quality from WeatherAPI.com: CO, O3, NO2, SO2, PM2.5, PM10, US EPA index and UK DEFRA index fields explained.Pollen NewPollen data via WeatherAPI.com: hazel, alder, birch, oak, grass, mugwort and ragweed in grains/m³ for the US, Canada, UK and Europe. Fields and usage.Weather Maps NewFree weather map tiles from WeatherAPI.com (no API key needed): temperature, precipitation, pressure and wind overlays, hourly for 3 days, with demos.Bulk RequestGet weather for up to 50 locations in one WeatherAPI.com call with a bulk POST request (Pro+, Business and Enterprise). JSON body format and examples.API Error CodesEvery WeatherAPI.com error code with its HTTP status: missing or invalid API key, monthly quota exceeded, location not found, plan access and bulk errors.APIsRealtime APICurrent weather API (current.json): temperature, feels like, wind, humidity, pressure, UV and optional air quality for any location, as JSON or XML.Forecast APIForecast API (forecast.json): up to 14 days of daily and hourly weather, astronomy, alerts and air quality. Parameters, response fields and examples.History APIHistory API (history.json): hourly and daily historical weather for any date since 1 January 2010. Parameters, response fields and examples.Alerts APIAlerts API (alerts.json): government-issued weather warnings for the requested location, with headline, severity, areas, effective and expiry times.Marine APIMarine API (marine.json): wave height, swell, water temperature and tide data for coastal and offshore locations, up to 7 days ahead.Future APIFuture API (future.json): 3-hourly weather for a date between 14 and 300 days in the future, for event and travel planning. Parameters and examples.Solar Energy API NewSolar PV energy forecast API: hourly and daily power and energy for your system for up to 14 days, from GHI, DNI and DHI irradiance. Business plan and above.Agriculture API NewAgriculture API: growing degree days, ET0 and crop water use, spray windows, frost, disease and blight risk for up to 14 days. Business plan and above.Search/Autocomplete APISearch/Autocomplete API (search.json): find matching cities and towns as the user types, with id, name, region, country, latitude and longitude.IP Lookup APIIP Lookup API (ip.json): city, region, country, continent, coordinates and time zone for an IPv4 or IPv6 address. Fields and example response.Astronomy APIAstronomy API (astronomy.json): sunrise, sunset, moonrise, moonset, moon phase and illumination for any location and date.Time Zone APITime Zone API (timezone.json): time zone id and current local time for a city, coordinates, postcode or IP address.Sports APISports API (sports.json): upcoming football, cricket and golf events with stadium, country, tournament and start time, for weather-aware apps.ExamplesSample WeatherAPI.com requests and responses to copy and adapt, from current weather to forecasts, in JSON and XML.IntegrationsWeatherAPI.com SDKs on GitHub (Python, PHP, Ruby, JavaScript, Java, Go and more), the Note API Connector for Notion, and the API Explorer.ResourcesWeather Icons and CodesFull list of WeatherAPI.com weather condition codes with day and night text and icons. Download the list as JSON, XML or CSV.Credit / Link BackHow to credit WeatherAPI.com when you use our data on a website or app: text and logo link-back code you can copy.