Get Started

Follow these steps to start using the Helio API for short-term solar irradiance forecasting.

Step 1: Register and get an API key

Register to get an account. You’ll receive credentials to authenticate with the API.

Step 2: Understand the API endpoints

  • Get to know the available endpoints. Detailed information can be found here.
  • We provide two types of endpoints: one for specific locations and another for the entire grid of the Netherlands.

Step 3: Make your first API call

  1. Import packages
import requests
import json

def get_firebase_auth_headers(
    username: str,
    password: str
) -> dict[str, str]:
    """
    Authenticate a user with Firebase and return
    the authorization headers required for subsequent
    API requests.

    Parameters:
    ----------
    username: str
        The email address of the user.
    password: str
        The password of the user.
    """
    firebase_key = "AIzaSyCECGQmWsGaZ3x7n_uGiq3kt-lyo-IYPvI"
    firebase_url = "https://identitytoolkit.googleapis.com/v1"
    firebase_endpoint = f"{firebase_url}/accounts:signInWithPassword?key={firebase_key}"
    data_dict = {'email': username, 'password': password, 'returnSecureToken': 'true'}
    response_post_token = requests.post(
        firebase_endpoint,
        data=data_dict
        )
    if response_post_token.status_code == 200:
        id_token = response_post_token.json()['idToken']
        headers = {
            "Content-Type": "application/json",
            "Authorization": f"Bearer {id_token}"
            }
    else:
        print(f"Failed to authenticate user with Firebase. {response_post_token.text}")
        headers = {
            "Content-Type": "application/json",
            "Authorization" : ""
            }
    return headers
  1. Authenticate
username = 'your_username'
password = 'your_password'

headers = get_firebase_auth_headers(username, password)
print(headers)
  1. Make a request
data = json.dumps({
    "forecast_datetime":"2025-01-01T12:00:00Z"
})

response=requests.post(
    "https://api.helio.nl/irradiance",
    headers=headers,
    data=data
)

with open ('output.nc','wb') as f:
  f.write(response.content)

Step 4: Integrate the API into your application

  • Choose your preferred programming language (e.g., Python, Rust, etc.).
  • Schedule periodic API calls to retrieve the latest forecasts at the intervals your application requires.
  • Consider subscribing to our MQTT service to receive real-time notifications whenever a new forecast becomes available.