Energy history
const url = 'https://demo.evcc.io/api/history/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&aggregate=15m&grouped=false&group=forecast&name=db%3A8&title=Battery&format=json&lang=de';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://demo.evcc.io/api/history/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&aggregate=15m&grouped=false&group=forecast&name=db%3A8&title=Battery&format=json&lang=de'Returns aggregated energy history data. Aggregate granularity defaults to 15 minutes. Supports CSV export.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
2026-07-01T00:00:00ZStart time (RFC3339)
Example
2026-07-02T00:00:00ZEnd time (RFC3339)
Example
1hAggregation interval. Examples: 15m, 1h, day, month
Example
falseGroup results by loadpoint
Example
batteryFilter by entity group
Example
db:8Filter by entity name
Example
BatteryFilter by entity title
Example
jsonResponse format
Example
deLanguage for CSV column headers (BCP 47, e.g. de, en). Defaults to Accept-Language header.
Responses
Section titled “Responses”Energy history data
One series per entity, or per group when grouped
object
Entity title, omitted when grouped
SocTemp values are temperatures, not state of charge
object
KWh
KWh exported or discharged
State of charge in percent or temperature of a single slot
Grid import cost, where a price exists
KWh imported where a price exists
Grid export revenue, where a price exists
KWh exported where a price exists
Example
[ { "group": "pv" }]Invalid parameters or database offline