# Energy electricity demand and forecast API

Retrieve European electricity demand by country and date via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as country, output, raw, and retrieve structured data including selected country code, source series timestamp, reported load in MW, source forecast availability flags, and power unit for load dashboard, and time context.

Documentation: https://openany.si/energy/energy-electricity-demand-and-forecast-api/8a714152-a7d5-4c2c-80b3-00731bfff3f6/
API ID: 8a714152-a7d5-4c2c-80b3-00731bfff3f6
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/energy/v1/demand
Page update time: 2026-12-03T02:46:18.466Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:46:16.728Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits used",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## European Grid Demand API

Select country and a day or supported date range, with resolution=hour or raw. series separates load, day-ahead forecast and intraday forecast; forecasts\_available describes source coverage rather than guaranteeing every value.

## What You Can Build

- **Load dashboard**: Plot observed load and forecast series separately.
- **Time context**: Keep UTC timestamps and requested date-window metadata.

## Returned Data

| Field | Meaning |
| --- | --- |
| `country` | Selected country code |
| `series[].time` | Source series timestamp |
| `series[].load_mw` | Reported load in MW |
| `series[].forecast_day_ahead_mw` | Day-ahead load forecast in MW |
| `forecasts_available` | Source forecast availability flags |
| `unit` | Power unit |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Energy electricity demand and forecast API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string",
          "description": "Country code: de (default), fr, es, it, nl, be, at, ch, pl, uk ... (the same list as /energy/v1/generation)."
        },
        "date": {
          "type": "string",
          "description": "One day (YYYY-MM-DD); default today."
        },
        "start_date": {
          "type": "string",
          "description": "Range start (YYYY-MM-DD)."
        },
        "end_date": {
          "type": "string",
          "description": "Range end (YYYY-MM-DD), up to 7 days after start_date."
        },
        "resolution": {
          "type": "string",
          "description": "hour (default) or raw (the source's 15-minute steps).",
          "enum": [
            "hour",
            "raw"
          ]
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. CSV and NDJSON exports are not supported; omit output or send json.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "attribution": {
      "type": "string"
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "country": {
      "type": "string"
    },
    "credits_used": {
      "type": "integer"
    },
    "end_date": {
      "type": "string"
    },
    "fetched_at": {
      "type": "string"
    },
    "forecast_day_ahead_stats": {
      "type": "object",
      "properties": {
        "avg": {
          "type": "integer"
        },
        "max": {
          "type": "number"
        },
        "min": {
          "type": "integer"
        }
      }
    },
    "forecasts_available": {
      "type": "object",
      "properties": {
        "day_ahead": {
          "type": "boolean"
        },
        "intraday": {
          "type": "boolean"
        }
      }
    },
    "load_stats": {
      "type": "object",
      "properties": {
        "avg": {
          "type": "integer"
        },
        "max": {
          "type": "number"
        },
        "min": {
          "type": "number"
        }
      }
    },
    "resolution": {
      "type": "string"
    },
    "series": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "forecast_day_ahead_mw": {
            "type": "number"
          },
          "forecast_intraday_mw": {
            "type": "null"
          },
          "load_mw": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "renewable_share_of_load_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "residual_load_mw": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "time": {
            "type": "string"
          }
        }
      }
    },
    "start_date": {
      "type": "string"
    },
    "unit": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/energy/v1/demand?country=de&output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "attribution": "Source: Energy-Charts (Fraunhofer ISE), CC BY 4.0",
  "cached": false,
  "count": 24,
  "country": "de",
  "credits_used": 1,
  "end_date": "2026-11-19",
  "fetched_at": "2026-11-19T12:20:10.575Z",
  "forecast_day_ahead_stats": {
    "avg": 61622,
    "max": 70024.3,
    "min": 46906
  },
  "forecasts_available": {
    "day_ahead": true,
    "intraday": true
  },
  "load_stats": {
    "avg": 56105,
    "max": 68209.7,
    "min": 45125.7
  },
  "resolution": "hour",
  "series": [
    {
      "forecast_day_ahead_mw": 50355,
      "forecast_intraday_mw": null,
      "load_mw": 49335,
      "renewable_share_of_load_pct": 66,
      "residual_load_mw": 22469.1,
      "time": "2026-11-18T23:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 48085,
      "forecast_intraday_mw": null,
      "load_mw": 46428.1,
      "renewable_share_of_load_pct": 62.4,
      "residual_load_mw": 23078.8,
      "time": "2026-11-19T00:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 46906,
      "forecast_intraday_mw": null,
      "load_mw": 45590.9,
      "renewable_share_of_load_pct": 56.2,
      "residual_load_mw": 25577.4,
      "time": "2026-11-19T01:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 46925.1,
      "forecast_intraday_mw": null,
      "load_mw": 45125.7,
      "renewable_share_of_load_pct": 49.3,
      "residual_load_mw": 28488.1,
      "time": "2026-11-19T02:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 47592.1,
      "forecast_intraday_mw": null,
      "load_mw": 46224.6,
      "renewable_share_of_load_pct": 46.7,
      "residual_load_mw": 30238,
      "time": "2026-11-19T03:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 49908.3,
      "forecast_intraday_mw": null,
      "load_mw": 50457.8,
      "renewable_share_of_load_pct": 43.6,
      "residual_load_mw": 34118,
      "time": "2026-11-19T04:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 56375.4,
      "forecast_intraday_mw": null,
      "load_mw": 55949.4,
      "renewable_share_of_load_pct": 41,
      "residual_load_mw": 38754.6,
      "time": "2026-11-19T05:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 62887.1,
      "forecast_intraday_mw": null,
      "load_mw": 63470,
      "renewable_share_of_load_pct": 40.5,
      "residual_load_mw": 43684.3,
      "time": "2026-11-19T06:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 67201.3,
      "forecast_intraday_mw": null,
      "load_mw": 67376,
      "renewable_share_of_load_pct": 41,
      "residual_load_mw": 46041.5,
      "time": "2026-11-19T07:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 68113.2,
      "forecast_intraday_mw": null,
      "load_mw": 67598.3,
      "renewable_share_of_load_pct": 45.6,
      "residual_load_mw": 42973.5,
      "time": "2026-11-19T08:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 68774.2,
      "forecast_intraday_mw": null,
      "load_mw": 67497.8,
      "renewable_share_of_load_pct": 50.7,
      "residual_load_mw": 39325.2,
      "time": "2026-11-19T09:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 69848.2,
      "forecast_intraday_mw": null,
      "load_mw": 68209.7,
      "renewable_share_of_load_pct": 57.6,
      "residual_load_mw": 34866.8,
      "time": "2026-11-19T10:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 70024.3,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T11:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 69437,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T12:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 68452.1,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T13:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 67910.9,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T14:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 68262.5,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T15:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 69161.6,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T16:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 69784.6,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T17:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 69079.5,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T18:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 66361.3,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T19:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 62692.4,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T20:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 59241.7,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T21:00:00Z"
    },
    {
      "forecast_day_ahead_mw": 55544.7,
      "forecast_intraday_mw": null,
      "load_mw": null,
      "renewable_share_of_load_pct": null,
      "residual_load_mw": null,
      "time": "2026-11-19T22:00:00Z"
    }
  ],
  "start_date": "2026-11-19",
  "unit": "MW"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which date windows are accepted?
Use date for one day, default today, or start_date/end_date with the documented limit of up to seven days after the start.

### How do I select resolution?
hour is the default. raw uses the source's finer steps, documented as 15 minutes for this demand operation.

### Does an available forecast flag make every forecast value non-null?
No. Preserve missing series values separately from zero load.

### Can MW be labeled MWh?
No. MW is power; do not relabel it energy without an explicit time-interval calculation. Preserve the source timestamp and attribution.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/energy/energy-electricity-demand-and-forecast-api/8a714152-a7d5-4c2c-80b3-00731bfff3f6/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
