onmomo / meteoswiss-api-client

Consumes weather forecasts and hazards via MeteoSwiss api and forward via UDP
MIT License
19 stars 2 forks source link

MeteoSwiss API documentation #7

Open th0my67 opened 6 months ago

th0my67 commented 6 months ago

Hello, have you any documentation for the MeteoSwiss API that you use in your project ? And if not, how have you found the API ? I need to get the Sunshine duration forecast for one of my project. Thanks

maximecharriere commented 6 months ago

I'm also interested to an API for MeteoSwiss. But apparently the data are not open yet. Maybe in 2026 it will be accessible -> https://www.meteoswiss.admin.ch/services-and-publications/service/open-government-data.html

If you are a teacher, student, or researcher, you can try this option (I didn't tried) -> https://www.meteoswiss.admin.ch/services-and-publications/service/weather-and-climate-products/data-portal-for-teaching-and-research.html

You can try to access the data using opendata.swiss (I didn't tried) -> https://opendata.swiss/en/organization/bundesamt-fur-meteorologie-und-klimatologie-meteoschweiz

I this repo, it looks like @Onmomo has used the internal API of the MeteoSwiss App to access the data. I didn't found any open doc of this API, so I'm not sure that it's allowed to use this API -> https://github.com/onmomo/meteoswiss-api-client/blob/3f99fc95cd3e756a56b5342f1053aaec875fe06d/meteoApiClient.go#L156

And this API seams to be really limited. You will only find the data available in the MeteoSwiss app, not all MeteoSwiss data.
To see an example of the API reply -> https://app-prod-ws.meteoswiss-app.ch/v1/plzDetail?plz=300800

th0my67 commented 6 months ago

Thanks for your response !

I have seen what the API reply, but there isn't the data that I'm interested in it.

And yes I have also seen this future API, MeteoSwiss published a lot of stuff on their GitHub but nothing is out now I suppose. I was hoping that someone had mapped the internal API or recorded the API call when we launch the app or the website.

As a student I can try the second option, but forecast aren't mentioned at all, and it seems like you have access to past data only.

Same for opendata.swiss, it looks like there is nothing about a forecast API.

Thanks again and hope we found a solution before 2026 !