Open API
All data on this site is also available as JSON over HTTP, free of charge and without an API key. CORS is open, so the API can be called directly from a web page. The Home Assistant page has a ready-made sensor configuration.
The API is provided as is, for personal use such as home automation, hobby projects and your own analyses. spotweb is an independent hobby project with no connection to ENTSO-E or the ECB.
There are no guarantees of uptime, availability, response times or correctness of the data. The API may be changed, rate limited or shut down without notice. Do not use it where an outage or a wrong price can cause damage, such as trading, invoicing or safety critical control, and check the prices against the original source when it matters.
Be considerate: cache the responses and do not fetch the same data more often than needed. Tomorrow's prices are published once a day, around 13:00 CET. Clients that send too many requests may be blocked or get 429 Too Many Requests. For heavy use, run your own instance (the source code is open) or fetch the data directly from ENTSO-E.
Where the data comes from
- Spot prices, production, consumption, cross-border flows and outages come from the ENTSO-E Transparency Platform. The spot prices are the day-ahead prices of each bidding zone, published in EUR/MWh.
- Exchange rates are the euro foreign exchange reference rates of the European Central Bank (ECB), fetched once a day.
The ENTSO-E data is re-used under the terms of use of the ENTSO-E Transparency Platform (CC BY 4.0). Every response names the source in source, and responses with converted prices also have a note. Credit "ENTSO-E Transparency Platform" when you re-use the data, and say that it has been converted where that applies.
Converted and calculated data
Unless you ask for raw prices in EUR, what you get is not exactly the figures ENTSO-E publishes. This is what spotweb does with the data:
- Currency: prices in any currency other than EUR are converted from EUR/MWh with the latest ECB reference rate. This also applies to historical prices, so older prices in for example SEK can differ from what was paid at the time. Ask for EUR if you need the original values.
- Unit:
/api/v2/spotand/api/v2/cheapestanswer in currency per MWh./api/v2/hassanswers per kWh (divided by 1000), in öre withcurrency=ORE(multiplied by 100), with yourmultiplier,extraandfactorapplied, rounded todecimalsdecimals and as text. - Averages:
daily,weekly,monthly,yearlyandtotal, and the averages in/api/v2/hassand/api/v2/cheapest, are calculated by spotweb as time-weighted averages of the interval prices, grouped in the local time of the bidding zone.minandmaxare the lowest and highest interval price. A supplier's monthly price is weighted by consumption and usually differs. - Resolution: without
interval, each local day uses the zone's current market resolution (15 or 60 minutes), or the finest resolution available for days before a change. Withinterval=PT15MorPT60Monly prices stored in exactly that resolution are returned; nothing is interpolated or averaged into another resolution. - Repeated values: ENTSO-E leaves out positions where the value does not change (curve type A03). spotweb fills them in with the previous value, so every interval has a price.
- Flows: the net flow per border is calculated by spotweb from the physical flows in both directions. Flows older than 90 days are only kept as hourly averages.
General
- All endpoints answer
GETrequests with JSON. Parameter names are case sensitive, values such as area and currency are not. - Dates (
YYYY-MM-DD) are read in the local time zone of the bidding zone. Times in the responses are in UTC, either as ISO 8601 or, in/api/v2/spot, as milliseconds since 1970-01-01. - Errors are answered with HTTP status 500 and
{"status": "error", "details": "…"}, for example for an unknown area or currency, missing parameters or a too long date range. In/api/v2/hassmissing prices are"-". - Responses have a
Cache-Controlheader (usually one minute for current data and one hour for history) and anETag, so a request withIf-None-Matchgives304 Not Modifiedwhen nothing has changed.
/api/v2/spot
Prices for one bidding zone and period, raw or grouped. Tomorrow's prices are included once they are published.
- period –
hourly(raw intervals, which despite the name can be 15 minutes),daily,weekly,monthly,yearlyortotal. - area – code of the bidding zone, the last part of the address of a zone page, e.g.
SE3,FI,DE-LU. - startDate, endDate – first and last day (inclusive),
YYYY-MM-DD. At most 31 days forhourlyand 366 days fordaily; longer groupings have no limit. - currency – optional, any ECB currency, e.g.
SEK,NOK,DKK,PLN. DefaultEUR(not converted). - interval – optional,
PT15MorPT60M. Default is the zone's current market resolution, see above.
Returns data with time (start of the interval or group in ms since 1970-01-01 UTC, null for total), price (average), min and max, all in currency/MWh.
Example
GET https://spot.56k.guru/api/v2/spot?period=daily&area=SE3&startDate=2026-01-01&endDate=2026-01-02¤cy=SEK
{
"status": "ok",
"source": "ENTSO-E Transparency Platform (https://transparency.entsoe.eu/)",
"note": "Converted from EUR/MWh with ECB reference rates by spotweb",
"data": [
{ "time": 1767222000000, "price": 512.3, "min": 301.2, "max": 870.4 },
{ "time": 1767308400000, "price": 468.9, "min": 289.5, "max": 790.1 }
]
}
/api/v2/hass
Yesterday, today and tomorrow per kWh, made for the RESTful integration of Home Assistant.
- area, currency – required.
currencycan also beOREfor öre. - multiplier, extra, factor – optional. Price = ((spot price ×
multiplier) +extra) ×factor.extrais fees per kWh in the chosen currency,factoris usually VAT (1.25 is 25 %). - decimals – optional number of decimals, default 5.
- interval – optional,
PT15MorPT60M. Default is the zone's current market resolution, see above.
Returns the price right now in now, the average, lowest and highest price of today, tomorrow and yesterday, and every interval in data (st start, p price). All prices are text. The Home Assistant page has a ready-made configuration.
Example
GET https://spot.56k.guru/api/v2/hass?area=SE3¤cy=SEK&decimals=3
{
"source": "ENTSO-E Transparency Platform (https://transparency.entsoe.eu/)",
"note": "Converted from EUR/MWh with ECB reference rates by spotweb",
"updated": "2026-01-02T09:05:00.000Z",
"now": "0.512",
"avg": "0.469", "min": "0.290", "max": "0.790",
"avg_tomorrow": "0.401", "min_tomorrow": "0.210", "max_tomorrow": "0.655",
"avg_yesterday": "0.512", "min_yesterday": "0.301", "max_yesterday": "0.870",
"data": [
{ "st": "2025-12-31T23:00:00.000Z", "p": "0.402" },
{ "st": "2025-12-31T23:15:00.000Z", "p": "0.398" }
]
}
/api/v2/cheapest
The cheapest time to use electricity, for automations such as charging a car or heating water.
- area – code of the bidding zone, the last part of the address of a zone page, e.g.
SE3,FI,DE-LU. - hours – required, number of hours, e.g.
3or1.5. - consecutive – optional.
true(default) gives the cheapest unbroken period,falsethe cheapest separate intervals. - from, to – optional time range to search, by default from now (the interval in progress included) to the end of tomorrow. Accepts dates, local times like
2026-01-02T07:00and ISO 8601 with a time zone. At most 7 days. - currency, interval – as for
/api/v2/spot.
Returns found, start, end, the average price in currency/MWh, the unbroken periods in windows, the chosen intervals in data and active, which is true while one of the chosen intervals is in progress. Only intervals with published prices are searched.
Example
GET https://spot.56k.guru/api/v2/cheapest?area=SE3&hours=2
{
"status": "ok",
"source": "ENTSO-E Transparency Platform (https://transparency.entsoe.eu/)",
"area": "SE3", "currency": "EUR", "hours": 2.0, "consecutive": true,
"from": "2026-01-02T09:05:00.000Z", "to": "2026-01-03T23:00:00.000Z",
"found": true, "active": false,
"start": "2026-01-03T01:00:00.000Z", "end": "2026-01-03T03:00:00.000Z",
"price": 18.42,
"windows": [
{ "start": "2026-01-03T01:00:00.000Z", "end": "2026-01-03T03:00:00.000Z", "price": 18.42 }
],
"data": [
{ "time": "2026-01-03T01:00:00.000Z", "price": 19.1 },
…
]
}
/api/v2/flows
Physical flows between bidding zones. Without parameters: the latest net flow per border (from, to, value in MW, time).
- area or country – optional. With
area=SE3(bidding zone) orcountry=sv(country, as in the address of the country page) you get the net export per neighbour and hour. - start, end – optional first and last day,
YYYY-MM-DD, by default yesterday and today. At most 31 days.
Per hour, net is the total net export (MW, negative is import) and flows the net export to each neighbour.
Example
GET https://spot.56k.guru/api/v2/flows?area=SE3
{
"status": "ok",
"source": "ENTSO-E Transparency Platform (https://transparency.entsoe.eu/)",
"license": "CC-BY-4.0",
"area": "SE3", "unit": "MW", "interval": "PT60M",
"neighbours": ["SE2", "SE4", "NO1", "DK1", "FI"],
"data": [
{ "time": "2026-01-01T23:00:00.000Z", "net": -812.0,
"flows": { "SE2": -2400.0, "SE4": 1350.0, "NO1": 120.0, "DK1": 98.0, "FI": 20.0 } }
]
}
Status and monitoring
/api/v2/status– version, how up to date the data is and the latest runs of the import jobs./healthz–200 okwhen the service and its database are running./healthz/data–200 okwhen prices, production and consumption are up to date, otherwise503with one problem per line.
These endpoints only show the current state and promise nothing about future uptime. If you need guaranteed availability, run your own instance; the source code is open.