Hi
Is there a way that I can download hourly data without past hours...ie starting from now time..
thanks
Hi
Is there a way that I can download hourly data without past hours...ie starting from now time..
thanks
Thank you for your question. Yes you can use the 'include' parameter to request only forecast data. For example, "&include=fcst". For more information on the parameter, please see the API documentation at: https://www.visualcrossing.com/resources/documentation/weather-api/timeline-weather-api/
Here is the doc snippet for that include parameter:
include (optional) – Specifies the sections you would like to include in the result data. This allows you to reduce query cost and latency. Specify this as a comma separated list. For example: &include=obs,fcst to include the historical observations and forecast data. The options are:
Regards
Visual Crossing Support
Thanks for reply..
If I add "&include=fcst" then all obs weather shows as null but still shows..
If I add "&options=nonulls" all nulls are gone from json but "datetime": and "datetimeEpoch": still shows for every past hourly entry since midnight which are still pulled as entrys by "jq" command.
Sorted this issue through my script but would be nice if I can hide past hours from json even if empty or null.
Thanks
Thank you for the feedback. We have passed this on to our engineering team to evaluate. This would likely be included as a different parameter to avoid changing existing API responses.
Regards
Visual Crossing Support
Hi i want to get the next 10 hours but i only get the 24 hours for the full day.
How can i get the next 10 hours?
my link
Thank you for your question. We currently require full days of hourly data to ensure that the day-level information in the JSON output correctly aggregated a full day. You can reduce the amount of data by filtering to forecast data only using the 'fcst' include flag:
https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Berlin,Germany/next24hours?unitGroup=metric&key=YOUR_API_KEY&contentType=csv&include=hours,fcst&elements=datetime%2Ctemp%2Cprecip%2Cprecipprob
This will return null values for hours prior to the current hour and therefore reduce the transfer size
Also notice that we recommend always including a country or US code when specifying a city name as many city names are duplicated and so can cause unexpected results.
Regards
Visual Crossing Support