Electricity source
Past
get
/electricity-source/{sourceType}/pastWhen signed in, you can use the interactive API Playground to query the Electricity Maps API directly from this page
Get the electricity source for a zone (past).
Path Parameters
sourceType*string
The electricity generation source to get the data for.
Example
"solar"Value in
- "nuclear"
- "geothermal"
- "biomass"
- "coal"
- "wind"
- "solar"
- "hydro"
- "gas"
- "oil"
- "unknown"
- "hydro-discharge"
- "battery-discharge"
Query Parameters
datetime*string
The datetime to get the data for. By default this needs to be the specific hour unless another temporal granularity is requested.
Format
date-timeExample
"2024-05-19T03:00:00Z"temporalGranularity?string
The temporal granularity of the data to get.
Default
"hourly"Example
"hourly"Value in
- "5_minutes"
- "15_minutes"
- "hourly"
- "daily"
- "monthly"
- "quarterly"
- "yearly"
zone?string
An Electricity Maps zone key.
Example
"DK-DK2"lat?number
Latitude of the location to get the data for.
Example
41.877lon?number
Longitude of the location to get the data for.
Example
-88.0703disableCallerLookup?boolean
If true, the fallback IP-based zone lookup will not be performed.
Default
falsedisableEstimations?boolean
If true, the response will exclude estimated data points
Default
falseestimationFallback?boolean
If false, estimated data points are excluded. Equivalent to disableEstimations=true.
Default
trueExample
trueflowTraced?boolean
If true, the response returns flow-traced (consumption-based) values.
Default
trueExample
trueResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/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"}