For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting Started

Are you using Python? Check out our Python SDK to get started in no time!

Authentication

To access Jua's API, you must create an API key in the developer portal. Include the key in your requests using the X-API-Key header.

X-API-Key: API_KEY_ID:API_KEY_SECRET

Query Data

Details about the request parameters & response formats are available in the Query Engine documentation

1. Query a 3-day forecast for Zurich

curl -X GET "https://query.jua.ai/v1/forecast/?models=ept2&init_time=latest&latitude=47.37&longitude=8.54&variables=air_temperature_at_height_level_2m&variables=wind_speed_at_height_level_10m&max_prediction_timedelta=72" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

url = "https://query.jua.ai/v1/forecast/"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Accept": "application/json"
}
params = {
    "models": "ept2",
    "init_time": "latest",
    "latitude": 47.37,
    "longitude": 8.54,
    "variables": [
        "air_temperature_at_height_level_2m",
        "wind_speed_at_height_level_10m"
    ],
    "max_prediction_timedelta": 72, # hours
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

2. Query market aggregated data

You can find more details about market aggregates here

Query the average windspeed over Germany, weighted by wind energy production capacity

curl -X GET "https://query.jua.ai/v1/forecast/market-aggregate\
?models=ept2\
&init_time=2025-10-22T00:00:00Z\
&weighting=wind_capacity\
&market_zones=DE\
&variables=wind_speed_at_height_level_100m\
&max_prediction_timedelta=72\
&include_time=true \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

url = "https://query.jua.ai/v1/forecast/market-aggregate"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Accept": "application/json"
}
params = {
    "models": "ept2",
    "init_time": "2025-10-22T00:00:00Z",
    "weighting": "wind_capacity",
    "market_zones": ["DE"],  # Germany
    "variables": ["wind_speed_at_height_level_100m"],
    "max_prediction_timedelta": 72, # hours
    "include_time": True,
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

3. Using the general `data` endpoint (POST)

/data allows to make complex analytical queries, select regions, apply custom aggregations and much more.

The features include:

  • Making complex geospatial queries, supporting points, bounding boxes, polygons, market zones and countries

  • Querying multiple times at once, including historical time slices

  • Apply groupings and aggregations such as "hourly minimum and maximum temperature in Switzerland"

  • Apply solar & wind capacity or population density weighting to your queries

Checkout our examples for a hands on overview of Query Engine's capabilities

3.1 Request 3 months of historical data for Zurich for EPT2 and IFS

3.2 Compute population-weighted temperature average for a custom polygon region

Key Differences Between GET and POST

Use Case

Simple queries

Complex queries, large datasets

Response Format

JSON only

JSON or Apache Arrow

Streaming

Not supported

Supported with Arrow format

Query Complexity

Limited parameters

Full query flexibility

URL Length

Limited by URL length

No practical limit

Aggregation

Limited (market-aggregate only)

Full aggregation support


Common Parameters

Time Parameters

  • init_time: Forecast initialization time (ISO 8601 format) or "latest" for most recent forecast

  • prediction_timedelta: Lead time(s) from init_time. Units are controlled by the timedelta_unit parameter (default: "h" for hours).

    • Range: {"start": 0, "end": 72} for 0-72 hours

    • List: [0, 6, 12, 24] for specific lead times

    • Or use min_prediction_timedelta and max_prediction_timedelta on the GET endpoints

Location Parameters

  • Point: {"type": "point", "value": [latitude, longitude], "method": "nearest"}

  • Market Zone: {"type": "market_zone", "value": ["DE", "FR"]}

  • Country: {"type": "country_key", "value": ["DE"]}

  • Bounding Box: {"type": "bounding_box", "value": [[lat_min, lon_min], [lat_max, lon_max]]}

Aggregation & Weighting

  • weighting: wind_capacity, solar_capacity, or population

  • group_by: Columns to group by (e.g., ["model", "init_time", "time"])

Credit Management

  • request_credit_limit: Maximum credits allowed for the request (prevents unexpectedly large charges). Pass as a query-string parameter on both GET and POST endpoints, e.g. POST /v1/forecast/data?request_credit_limit=200. Default: 5 for GET endpoints, 50 for POST /data.


Error Handling

Common HTTP status codes:

  • 200: Success

  • 400: Invalid parameters or response size exceeded

  • 401: Missing or invalid API key

  • 402: Insufficient credits

  • 403: Model or variable not in subscription

Last updated