Python

// Some code
import requests

URL="https://openapi.carnot.dk/openapi/get_predict"

PARAMS={
        "daysahead": 5,
        "energysource": "solarpower",
        "region": "dk1",
      }
      
HEADERS={
        "apikey": "{{ api-key }}",
        "username": "{{ username }}",
      }

r = requests.get(url = URL, params = PARAMS,headers=HEADERS)

data = r.json()

print(data)

Last updated