evcc · electricity price and CO2
48 hours free, 120 hours with Private Pro
Add the electricity price and CO2 forecast to evcc over HTTP as a custom tariff source. The free configuration works right away; for five days of price preview you add your Private Pro key.
- Copy-and-paste configuration for evcc
- Price and CO2 can be used separately
- CO2 free for up to 120 hours
Since 1 October 2026: 48 hours free, 120 hours with Private Pro
The price endpoint stays free without an API key but then delivers at most 48 hours. With Private Pro up to 120 hours of price forecast remain available. The CO2 forecast stays free without an API key for up to 120 hours.
Existing evcc configurations keep working: without a key the price series is simply cut to 48 hours. There is no hard API error.
Private Pro starts with a 14-day free trial: nothing is charged during that time, and if you cancel before it ends you pay nothing.
What is this for?
The endpoint only delivers the time series. The charging decision stays with evcc. evcc can then take these values into account, for example in the charge planner for cheap or CO2-optimised charging. The optimizer can use forecast data as well but is still experimental in evcc.
As soon as published day-ahead prices exist, the endpoint uses them first. For the hours after that our forecast is added. That is most useful when you want to plan charging times over several days.
Quick start: add it to evcc
New: hourly prices for evcc. Does your supplier charge one uniform price per hour? Then use our HTTP price source with resolution=hourly. Setting up hourly tariffs.
The block belongs in evcc.yaml at the top YAML level, so not under loadpoints, chargers, meters or individual devices. If you already have a tariffs: block, do not create it twice; add to or replace the entries there.
tariffs:
currency: EUR
grid:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=48
co2:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=co2&hours=120
Then restart evcc. Use evcc tariff to check whether evcc loads the values correctly. If you only want to test the price forecast, the grid: part is enough to begin with.
Add the price forecast to evcc
Example for Germany. The values are in EUR/kWh.
tariffs:
currency: EUR
grid:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=48
hours=48 uses the free price horizon. Since 1 October 2026 the endpoint delivers at most 48 hours without an API key; existing anonymous 120h configurations keep running and are cut to 48 hours.
Hourly tariff: matching prices for the planner
If your supplier applies one uniform price to every full hour, add this to the HTTP URL of our price source: &resolution=hourly. The API averages the four published quarter-hour market prices into one hourly price. The model forecast that follows stays hourly.
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=48&resolution=hourly
The block is an excerpt of your existing source. If you use our data separately in the planner, change only this source and keep your supplier's tariff for costs and statistics. An existing price formula and the API key settings are kept. The API still delivers base prices; surcharges and taxes have to match your contract.
Within a running hour, too, the hourly mode takes all four quarter hours into account. If a value is missing, it uses a complete hourly day-ahead substitute or the hourly model forecast. An average of only the remaining quarter hours is not returned as the hourly price.
On a quarter-hour tariff leave the URL unchanged or use resolution=native. Published market prices then stay quarter-hourly; later forecast values stay hourly.
The built-in evcc template energypriceforecast offers, under the advanced settings, average: true. Your own custom sources support features: [average]. For a complete average of the running hour we recommend the HTTP source with resolution=hourly; an additional averaging in evcc is then not needed. evcc reference
Up to 120 hours with an API key
Enter your personal API key as a Bearer token directly in the HTTP block and set hours=120. The key belongs under forecast.auth, not in the URL.
tariffs:
currency: EUR
grid:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=120
auth:
type: bearer
token: "YOUR_API_KEY"
Then restart evcc and run evcc tariff to check. Do not share the API key publicly or post it in forum messages and logs.
Add the CO2 forecast to evcc
Example for Germany. The values are in g/kWh.
tariffs:
co2:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=co2&hours=120
CO2 values are forecast values. They help with timing and describe the estimated CO2e load per kWh consumed, but they do not replace an official emissions balance.
Supported countries and bidding zones
https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=ch&type=grid¤cy=CHF&hours=48Test in the browser
With debug=1 you also get metadata about the source. For the evcc configuration, debug=1 should not be used.
https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=24&debug=1https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=co2&hours=24&debug=1Good to know
Are the prices my exact household electricity price?
No. The standard endpoint delivers market and forecast prices. Grid fees, taxes, levies and supplier surcharges can differ by country, region and contract. For charge optimisation the relative course is often what matters: when is electricity rather cheap and when rather expensive?
How does evcc use these values?
evcc fetches the values as a forecast data source. The grid forecast can be used for dynamic tariffs and cheap charging windows. The co2 forecast can be used for CO2-optimised charging. The endpoint does not decide when to charge; evcc makes that decision.
What resolution does evcc get?
Published day-ahead prices are returned in their native quarter-hour resolution. For hours after the published day-ahead the endpoint continues with the hourly forecast. evcc handles both intervals; the command evcc tariff was used to test this locally.
What changed on 1 October 2026?
Without an API key only the price forecast is limited to 48 hours. A valid Private Pro key allows up to 120 hours. CO2 stays free for up to 120 hours regardless.
What happens with old or missing data?
The endpoint then deliberately does not return historical test values as a current forecast. An error status is returned instead, so evcc does not optimise with wrong prices.
Which zones get published day-ahead prices?
We only pass on published day-ahead prices where the source allows it. For NO1, NO3, NO4, NO5, SE1, SE2, FI, RO, SK, GR, BG and the Italian zones except North the endpoint therefore returns our forecast for every hour since 24 October 2026. If you want the published prices there, let evcc load them itself, for example from Nord Pool, and append our forecast:
tariffs:
grid:
type: merged
primary:
type: template
template: nordpool
region: NO1
currency: NOK
secondary:
type: template
template: energypriceforecast
region: NO1
currency: NOK
horizon: 48
This only works in evcc.yaml; remove a tariff set up in the web interface first. Adjust zone and currency (Romania is TEL at Nord Pool), and with Private Pro add apikey and horizon: 120. For SK, GR, BG and Italy use the entsoe template with your own token instead of nordpool.
A note on use
The evcc connection is fetched regularly by many installations; the command evcc tariff is also used to check it technically. When you set it up for the first time, still compare the values with the web app and report anything that looks wrong.
More information: evcc documentation on tariffs and evcc documentation on CO2-optimised charging.