Has anyone figured out the correct incantation of request parameters to get historic hourly weather conditions from WeatherKit? I've tried every combo of hourlyStart, dailyStart, currentAsOf, etc with past dates and it seems like the oldest it will go back to is midnight for today. I would like to get the last 24 hours of conditions.
Ditto! It respects
dailyEnd, but not
dailyStart. This query will yield an empty array. Removing
dailyEnd will return 10 days of June.
https://weatherkit.apple.com/api/v1/weather/en/41.029/-74.642 ?dataSets=forecastDaily ¤tAsOf=2022-01-01T00:00:00Z &dailyStart=2022-01-01T00:00:00Z &dailyEnd=2022-01-07T00:00:00Z &timezone=Americas/Los_Angeles &countryCode=US
It's probably forthcoming later this summer, but filed FB10383199.
Same problem here, no way to get the historical data, even though this is advertised. I'm using darksky.net now, which Apple has acquired. Need to port my code to the WeatherKit, and I thought it would be easier with all being on the Apple platform. However, it has has given a lot of headaches so far to try and get everything to work.. :(
With the Darksky API, it was possible to get hourly historical weather data of 50 years back. I am struggling with getting the same from the Weatherkit API. Is there an example call that provide e.g. the historical hourly weather data on a specific location, and a date of e.g. 20 years back?
With the Swift API (not REST) I'm still finding it to be hit or miss. Here's a look ...
// Historical daily request let forecast: Forecast<WeatherKit.DayWeather> = try await weatherService.weather(for: location, including: .daily(startDate: november24-2021, endDate: november25-2021))
request like this can get historic hourly weather conditions, but it's not accurate in my area: