How to

Structure of the page
The main usage of this page is the providing of datasets . These datasets are also associated with descriptive posts .

Search and Filter
You can filter posts and datasets by type, energy sources and projets or search for e.g. technical terms (e.g. solar).

Download
On the dataset pages there are download buttons. The data is provided as JSON result.

API Definition

Additional to the download links on the respective Posts we offer data download via API. The description of the API can be found below. You can also directly try out the endpoints here. We also provide a small example at the end of this page on how to fetch data from the API using Python.

Please note that some requests to large datasets might take a long while or fail after some time. This can be avoided by adding more query parameters and thus reducing the amount of data returned.

Python

You can also access opendata.ffe.de from Python. The following snippet provides a minimum working example to get you started.

# %%
import requests

url = "https://api.opendata.ffe.de"
params = {
    "id_opendata": 52,
    "internal_id_1": 75
}

# check if the API is available by making a GET request to the /health endpoint
response = requests.get(url + '/health')
if not response.status_code == 200:
    print(f"API not available. Status code: {response.status_code}")
    print(response.json())
    exit()

print('API available.')

# fetch the data by making a GET request to the 'opendata' endpoint
# using the previously defined parameters
response = requests.get(url + '/opendata', params=params)

# check if the request was successful
if not response.status_code == 200:
    print(f"Request failed. Status code: {response.status_code}.")
    print(response.json())
    exit()

print('Request successful.')

# get the response as a dictionary
data = response.json()

# print some of the metadata
print(f"id_opendata: {data['id_opendata']}")
print(f"title: {data['title']}")

# print the first three data entries
for data_entry in data['data'][:3]:
    print(data_entry)