Phrases API - Forecasts
ForecastsThe Forecasts endpoint generates a summary of the requested forecast periods. By default, requests before 5pm return the current day and night forecast; requests after 5pm return the night and next day forecast. Forecasts aggregates and identifies the most important weather metrics and presents them akin to traditional weather broadcasts or reports. This report can include metrics such as temperatures, wind speeds, precipitation, humidity, and more.
This endpoint primarily utilizes data from Forecasts Data API endpoint. Please refer to this for more information on the available metrics and valid time ranges.
Note: The limit parameter maximum is 31 when using day, daynight, or mdnt2mdnt filters. This allows for the maximum forecast range of +15 days. The limit parameter maximum is 25 otherwise for #hr or #min filters.
Requests
Every request to the endpoint must include one of the supported actions in the url.
https://phrases.api.xweather.com/forecasts/{action}?client_id={client_id}&client_secret={client_secret}&{params}Response
The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.
Properties
response (string)
The object containing the text summary output.
{
"response": "On June 5 in Minneapolis, MN, the weather will begin with partly cloudy skies and a chance of showers and isolated storms in the morning. The maximum temperature will reach around 27.2°C (81°F), while the minimum feels like temperature will be 26.7°C (80°F). Winds will be from the south-southwest at speeds ranging from 9 to 18 km/h (6 to 11 mph). There is a 22% probability of precipitation, with light rain expected at a rate of 0.1 mm (0.004 in) per hour.\n\nAs the day transitions to evening, the weather will become mostly cloudy with a chance of storms. The temperature will drop to a minimum of 15°C (59°F) with a maximum feels like temperature of 24.4°C (76°F). Winds will shift to the south at speeds between 7 to 14 km/h (4 to 9 mph). The probability of precipitation increases to 58%, with rain expected at a rate of 3.2 mm (0.126 in) per hour."
}