The German „Environmental Protection Agency“ (Umweltbundesamt) provides air quality data for Germany on its webpage and it is also possible to download data as CSV. However, as far as I know, there is no option to programmatically download these data, e.g. via an API. Does anyone know about a source for German air quality data which can be accessed programmatically, e.g via an API?
Although it's not documented, when clicking on a link for a CSV, I noticed that you can use the endpoint as your own API.
So if we deconstruct the URL, we can create filters to pass to the web server, which will return a CSV. That's an API.
To programmatically access this API, you would have your code pass variables to the endpoint and collect the results.
I also noticed that you can replace
json in the URL to get a JSON response
To get the metadata:
The file that is returned
Luftqualitaet_DERP020_Trier-Ostallee_2020-03-25_00-2020-04-01_06.csv contains some basic metadata in the filename.
To get an actual file of metadata, To get the metadata, I had to go to the Network view of "Developer Tools"
The URL of the JSON metadata seems to be: