API ReferenceElectricity source

Past

get
/v4/electricity-source/{sourceType}/past

Get the electricity source for a zone at a given datetime

Path Parameters

sourceType required

The electricity generation source to get the data for.

One of: "nuclear", "geothermal", "biomass", "coal", "wind", "solar", "hydro", "gas", "oil", "unknown", "hydro-discharge", "battery-discharge"

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
flowTraced optional

Whether values are flow-traced. true accounts for electricity flows and returns consumption-based values; false returns values for the zone's own generation only.

Default: 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-source/solar/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",      "temporalGranularity": "hourly",      "value": 100,      "flowTraced": true,      "isEstimated": false,      "estimationMethod": "string"    }  ],  "source": "solar"}

Playground

get
/v4/electricity-source/{sourceType}/past
Explore the API with a 14-day trial.