API ReferenceElectricity mix

Past

get
/v4/electricity-mix/past

Get the electricity mix for a zone at a given datetime

Query Parameters

datetime required

The datetime to get the data for. By default this needs to be the specific hour unless another temporal granularity is requested.

Format: ISO 8601 datetime
Example: "2024-05-19T03:00:00Z"
zone optional

An Electricity Maps zone key.

Example: "DK-DK2"
temporalGranularity optional

The temporal granularity of the data to get.

Default: "hourly"
One of: "5_minutes", "15_minutes", "hourly", "daily", "monthly", "quarterly", "yearly"
lat optional

Latitude of the location to get the data for.

Example: 41.877
lon optional

Longitude of the location to get the data for.

Example: -88.0703
estimationFallback optional

If false, estimated data points are excluded. Equivalent to disableEstimations=true.

Default: true
breakdownType optional

Breakdown method of the electricity mix. normal breaks the mix down by the zone's own generation modes, with imports and exports reported as flows. flow-traced attributes imported electricity to the generation modes that produced it.

Default: "normal"
One of: "normal", "flow-traced"
flowTraced optional deprecated

Deprecated alias of breakdownType. false is the same as breakdownType=normal; true has no effect. Ignored when breakdownType is given.

Example: true
Example: false
disableCallerLookup optional

If true, the fallback IP-based zone lookup will not be performed.

Default: false
disableEstimations optional

If true, the response will exclude estimated data points

Default: false

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v4/electricity-mix/past?datetime=2024-05-19T03%3A00%3A00Z"
{  "zone": "DK-DK2",  "temporalGranularity": "hourly",  "unit": "MW",  "data": [    {      "datetime": "2024-05-19T03:00:00.000Z",      "updatedAt": "2025-07-25T12:32:42.039Z",      "breakdownType": "flow-traced",      "mix": {        "nuclear": 0,        "geothermal": 0,        "biomass": 0,        "coal": 0,        "wind": 0,        "solar": 0,        "hydro": 0,        "gas": 0,        "oil": 0,        "unknown": 0,        "hydro storage": {          "charge": 0,          "discharge": 0        },        "battery storage": {          "charge": 0,          "discharge": 0        },        "flows": {          "imports": 0,          "exports": 0        }      },      "isEstimated": false,      "estimationMethod": "string"    }  ]}

Playground

get
/v4/electricity-mix/past
Explore the API with a 14-day trial.