Weather

Forecast Weather

Returns weather forecast for up to 14 days (plan dependent). Includes hourly intervals, astronomy, air quality, pollen, and weather alerts.

get/forecast.json

Query parameters

keystring required
Example:YOUR_API_KEY

Your WeatherAPI.com API key.

qstring required
Example:London

Location query. Accepts: city name, lat/lon, US zip, UK postcode, Canada postal code, METAR code (metar:EGLL), IATA (iata:DXB), auto:ip, IPv4/IPv6, or location ID (id:2801268).

daysinteger required
Example:3

Number of forecast days (1–14).

dtstring date

Restrict date output in yyyy-MM-dd format.

unixdtinteger
Example:1490227200

Unix timestamp equivalent of dt. Do not pass both.

hourinteger

Restrict output to a specific hour (0–23) in 24-hour format.

alerts'yes' | 'no'

Include weather alerts in Forecast API response.

aqi'yes' | 'no'

Include Air Quality Index (AQI) data in response.

pollen'yes' | 'no'

Include pollen data. Available on Pro+ and above.

tp15

Interval for data. Use tp=15 for 15-minute intervals (Enterprise only).

langstring
Example:fr

Language code for condition text. E.g.: fr, de, es, zh, ar. See full list in docs.

day_fieldsstring

Comma-separated fields to return in forecast/history day element.

hour_fieldsstring

Comma-separated fields to return in forecast/history hour element.

et0'yes' | 'no'

Include evapotranspiration data. Business and Enterprise only.

Response

Forecast weather data

Changes