API Reference

Documentation

Everything you need to integrate European electricity prices into your application.

๐Ÿ”‘ Sign in to try the API live from this page Sign In

Quickstart

Get an API key from your dashboard, then make your first request. New here? The dashboard will guide you to sign in.

# 1. Get an API key (free during beta) # Sign in at sparkrate.io/dashboard โ†’ create and copy a key # 2. Make your first request curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://sparkrate.io/v1/prices/DK1/today?currency=DKK" # 3. That's it. You get 24 hourly prices + stats in clean JSON.

Base URL

https://sparkrate.io/v1

REST endpoints under /v1 require an API key via the Authorization: Bearer YOUR_API_KEY header. This is a spot-price and reference-FX API, not a retail electricity bill.

Dates and times are UTC

Never interpret a Sparkrate timestamp as the server's, your browser's, or the bidding zone's local clock. Z means UTC. For example, 2026-09-27T14:00:00Z is the same instant everywhere; Copenhagen displays 16:00 on that summer-time date. Convert exactly once at the presentation boundary.

REST, MCP, and the Try-It examples use time_basis: "UTC". A date selects a UTC calendar day from 00:00:00Z inclusive to the next 00:00:00Z exclusive, not a zone-local day. today and tomorrow also mean UTC days. Invalid date queries return 400.

Daily responses include period_start_utc and period_end_utc. Hourly price arrays retain 24 hour/price entries, with full ISO 8601 start_utc/end_utc timestamps ending in Z on every entry. The short hour, min_hour, and max_hour labels are explicitly UTC. Unknown prices remain null; coverage may be partial even when some prices are available.

timezone is regional metadata only. Clients decide whether and how to display local times, including daylight-saving transitions. Current and upcoming intervals include their full UTC dates, even across midnight. Cheapest windows start no earlier than the next full UTC hour, never bridge missing hours, and return full ISO 8601 Z values in start/end and their start_utc/end_utc aliases. MCP cost estimates use the same whole-hour baseline.

{ "date": "2026-09-27", "time_basis": "UTC", "period_start_utc": "2026-09-27T00:00:00Z", "period_end_utc": "2026-09-28T00:00:00Z", "prices": [{ "hour": "14:00", "start_utc": "2026-09-27T14:00:00Z", "end_utc": "2026-09-27T15:00:00Z", "price": null }] }

Illustrative excerpt: the real hourly response has 24 UTC slots. A local calendar day may have 23 or 25 hours; request the UTC dates covering that local day and filter by full timestamps if you need a local-day view.

Compatibility note: routes and the legacy hour/price fields remain. UTC boundary fields are additive; cheapest_window.start/end now have explicit Z. Price placement is corrected to follow the source period's actual UTC start, so values can differ from older shifted lookups. Missing source intervals and missing currency conversion no longer become interpolated or mislabelled prices.

Raw energy periods

GET /v1/energy/{zone}?from=YYYY-MM-DD&to=YYYY-MM-DD&fill_missing=true

from and to are inclusive UTC calendar dates, limited to 31 days per request. Results retain original PT15M, PT30M, or PT60M periods with UTC ISO 8601 Z timestamps. This endpoint supplies spot prices and historical FX only: it does not include grid tariffs, taxes, or VAT.

fill_missing=true authorizes a bounded attempt to fetch missing data within the requested range. Actual coverage may remain partial; it does not guarantee complete data or synthesize missing prices. The existing /v1/prices hourly endpoints remain available unchanged in route and legacy field names.

Hole fetching is on by default; use fill_missing=false for a cache-only read. A request attempts at most six price days and six FX dates within a four-second fetch budget, with a short cooldown for repeated misses. It adds source observations without replacing known prices; an empty or partial response is still possible. FX dates identify the actual observation day, which can precede the requested date on weekends and holidays.

X-Sparkrate-Fill reports inline or cache-only.

Server-Timing separates auth, quota, fill, prices, fx, parse and usage where applicable. app is the total application time before response serialization and network transfer. All durations are milliseconds; timings do not contain API keys or user data.

The raw response uses camelCase fields: version, zone, from, to, timeBasis, periodStartUtc, periodEndUtc, generatedAtUtc, prices and exchangeRates. Each price contains its original periodStart, periodEnd, resolution, measureUnit, currency and point positions. Adjacent original periods may extend beyond the requested bounds; clip by UTC timestamps, not array indices.

This reference is static; the Try-It executor below does not implement the raw energy endpoint.

Endpoints

GET /zones

List all 43 bidding zones with metadata.

GET Sign in & select key โ†‘
GET /prices/{zone}/today

24 UTC hourly slots for today's UTC calendar day with statistics. Unknown prices are null.

ParameterTypeDescription
zone path Zone code, e.g. DK1, DE-LU, SE3
currency query EUR, DKK, SEK, NOK, etc. Default: EUR
GET Sign in & select key โ†‘
GET /prices/{zone}/current

Current UTC hour price + next 3 UTC hours + daily comparison, with full UTC interval dates.

ParameterTypeDescription
zone path Zone code
currency query Default: EUR
GET Sign in & select key โ†‘
GET /prices/{zone}/tomorrow

Tomorrow's UTC day-ahead prices. Coverage may be partial; returns 404 only when no hour is available. No fixed publication time is guaranteed.

ParameterTypeDescription
zone path Zone code
currency query Default: EUR
GET Sign in & select key โ†‘
GET /prices/{zone}/{date}

Historical hourly prices for a UTC calendar date.

ParameterTypeDescription
zone path Zone code
date path YYYY-MM-DD: 00:00Z inclusive to next 00:00Z exclusive
currency query Default: zone currency
GET Sign in & select key โ†‘
GET /prices/{zone}/cheapest

Find the cheapest contiguous UTC hours, starting at or after the next full UTC hour. Missing hours are never bridged.

ParameterTypeDescription
zone path Zone code
hours query Number of consecutive hours needed
include_tomorrow query true/false. Default: true
currency query Default: EUR
GET Sign in & select key โ†‘
GET /prices/compare

Compare prices across multiple zones side-by-side.

ParameterTypeDescription
zones query Comma-separated zone codes
date query YYYY-MM-DD or 'today': UTC calendar day, 00:00Z to next 00:00Z. Invalid dates return 400.
currency query Default: EUR
GET Sign in & select key โ†‘
GET /currencies

List supported currencies.

GET Sign in & select key โ†‘
GET /currencies/rates

ECB exchange rates for any date. 30 currencies, daily updates, historical back to 1999.

ParameterTypeDescription
date query YYYY-MM-DD UTC calendar date. Default: today UTC. Invalid dates return 400.
symbols query Comma-separated filter, e.g. USD,GBP,DKK
GET Sign in & select key โ†‘

Supported Zones

43 European bidding zones across 31 countries โ€” from the Nordics to the Balkans to Ukraine.

DK1 Denmark West2014
DK2 Denmark East2014
SE1 Sweden Luleå2014
SE2 Sweden Sundsvall2014
SE3 Sweden Stockholm2014
SE4 Sweden Malmö2014
NO1 Norway Oslo2014
NO2 Norway Kristiansand2014
NO3 Norway Trondheim2014
NO4 Norway Tromsø2014
NO5 Norway Bergen2014
FI Finland2014
DE-LU Germany/Luxembourg2018
NL Netherlands2015
BE Belgium2015
FR France2015
AT Austria2014
CH Switzerland2014
PL Poland2015
CZ Czech Republic2014
SK Slovakia2014
HU Hungary2014
SI Slovenia2014
EE Estonia2014
LV Latvia2014
LT Lithuania2014
ES Spain2014
PT Portugal2014
IT-North Italy North2015
IT-Centre-North Italy C. North2015
IT-Centre-South Italy C. South2015
IT-South Italy South2015
IT-Sardinia Italy Sardinia2015
IT-Sicily Italy Sicily2015
GR Greece2014
HR Croatia2017
RO Romania2014
BG Bulgaria2016
RS Serbia2016
ME Montenegro2014
MK North Macedonia2023
UA-IPS Ukraine2020
IE Ireland2015

Supported Currencies

All 30 ECB currencies available for price conversion and the exchange rate API.

EUR DKKSEKNOKCHF PLNCZKHUFRON
USDGBPJPYCADAUD CNYINRBRLMXNTRY ISKNZDZARSGDHKD KRWIDRMYRPHPTHBILS

Zone currencies (top row) are used as defaults for each bidding zone. All currencies work with ?currency= on price endpoints. ECB rates updated daily, historical back to 1999.

MCP Server (AI Assistants)

Give compatible AI assistants electricity price tools via the Model Context Protocol (opens in a new tab).

Configuration

For VS Code, add this server to your MCP configuration. For other clients, use the same URL with their Streamable HTTP connection settings.

// VS Code MCP configuration { "servers": { "sparkrate-energy": { "type": "http", "url": "https://sparkrate.io/mcp" } } }

Available Tools

ToolDescriptionKey parameters
list_zones List all available bidding zones with country and currency country (optional filter)
get_current_price Current electricity price for a zone zone (required), currency
get_prices_for_date Hourly prices for a specific historical date zone + date (required), currency
get_tomorrow_prices Tomorrow's 24 UTC hourly slots; availability may be partial zone (required), currency
find_cheapest_charging_window Cheapest consecutive hours for EV charging, heat pump, etc. zone (required), hours (1-12), currency
get_daily_price_forecast All 24 hourly prices for today or tomorrow with chart zone (required), day (today/tomorrow), currency
estimate_cost Cost estimate: next full UTC hour vs cheapest contiguous window, total kWh spread evenly zone + kwh (required), hours, currency
compare_zones Compare prices across multiple zones, sorted cheapest first zones (required, comma-separated), date, currency
get_exchange_rates ECB exchange rates (EUR base) date, symbols (optional filter)

Example prompts

๐Ÿ’ฌ "What's the electricity price right now in Denmark West?" ๐Ÿ’ฌ "When's the cheapest 4-hour window tonight to charge my EV in NO1?" ๐Ÿ’ฌ "Show me tomorrow's prices for SE3 in SEK" ๐Ÿ’ฌ "How much would it cost to run my washing machine (1.5 kWh) now vs at the cheapest time in DK1?"

Rate Limits

TierRequests/dayRequests/monthAvailability
Free1001,000Available now
Developer10,000100,000Paid signup coming soon
Pro100,0001,000,000Paid signup coming soon
BusinessUnlimitedUnlimitedPaid signup coming soon

REST limits apply per account across its API keys, including cached responses. Check X-RateLimit-Remaining-Day, X-RateLimit-Remaining-Month and X-RateLimit-Reset. See your actual usage in the dashboard and compare plans.

Reconnecting...