Forecast
forecastGet a multi-day weather forecast for a location: daily high/low temperature, condition, chance of rain, total precipitation, and sunrise/sunset times. Up to 10 days. Example: forecast({ q: "Tokyo", days: 5 }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Location — city name (e.g. "London"), "lat,lon" (e.g. "48.8567,2.3508"), US/UK/Canada zip/postcode, IATA airport code (e.g. "DXB"), or "auto:ip". NOTE on IATA codes: WeatherAPI resolves them to that airport's CITY, not the airport's own weather station — for the actual airport-station reading (can differ by several degrees) use the aviation-weather pack's metar tool with the airport's ICAO code instead. | |
| days | No | Number of forecast days (default 3, max 10). | |
| _apiKey | No | Optional — your own WeatherAPI.com API key for higher limits; omit to use the shared Pipeworx key. |