WeatherKit Rest API - Extended Hourly Forecast

I am attempting to transition from DarkSky to WeatherKit, and can't seem to figure out how to request an extended hourly forecast. I can get up to 24 hours, but nothing more.

Is the extended hourly forecast ("10-day hourly forecasts") only available with the Apple WeatherKit SDK (i.e. function hourly(startDate, endDate))?

I have tried query parameters of: ?dataSets=forecastHourly?hourlyStart=<unix_timestamp>?hourlyEnd=<unix_timestamp> ...with no luck.

Is my query parameter wrong or does the Rest API not provide this level of detail?

Answered by in 747361022

The hourly forecast is available for the next 10 days. The format of the hourlyStart and hourlyEnd should be ISO date-time format yyyy-MM-dd'T'HH:mm:ssZ rather than Unix timestamps.

Accepted Answer

The hourly forecast is available for the next 10 days. The format of the hourlyStart and hourlyEnd should be ISO date-time format yyyy-MM-dd'T'HH:mm:ssZ rather than Unix timestamps.

Thank you for the response @Frameworks Engineer, I got the hourly query working.

If anyone else references my original post, note the prefix delimiter for hourlyStart and hourlyEnd should be "&" ampersands, and not "?" question marks. An example of a correct query is: ?dataSets=forecastHourly&hourlyStart=2023-03-10T21:04:51.722Z&hourlyEnd=2023-03-17T20:04:51.722Z

WeatherKit Rest API - Extended Hourly Forecast
 
 
Q