API Reference

Machine-readable access to Swedish energy supplier tariff data, spot prices, and address-based supplier lookup.

Authentication

Every request must include your API key in the X-API-Key header. Machine user keys start with mk_ and can be created by the platform owner in the Control Center.

curl
curl -H "X-API-Key: mk_your_key_here" \
  https://your-domain.com/api/suppliers

Keep your key secret. Do not expose it in client-side code or public repositories. If compromised, the owner can revoke it from the Control Center.

GET/api/suppliers

Returns all active Swedish energy suppliers with summary counts of their tariff versions and price components.

Example request

curl
curl -H "X-API-Key: mk_your_key_here" \
  https://your-domain.com/api/suppliers
GET/api/suppliers/{id}

Returns a single supplier with all its tariff versions and every price component. Use this to get the full tariff structure for building a price calculation.

Example request

curl
curl -H "X-API-Key: mk_your_key_here" \
  https://your-domain.com/api/suppliers/1
GET/api/prices

Cross-supplier flat list of price components. Filter by tariff type, unit, or component name. Useful for comparing a specific fee across all suppliers.

Query parameters

tariff_type
string

Filter by type: grid, district_heating, or district_cooling.

unit
string

Filter by unit, e.g. SEK/kWh or SEK/år.

component_type
string

Filter by component name substring, e.g. energiavgift.

Example request

curl
curl -H "X-API-Key: mk_your_key_here" \
  "https://your-domain.com/api/prices?tariff_type=grid&unit=SEK%2FkWh"
GET/api/address-lookup

Find which energy suppliers cover a given address in Sweden. Returns suppliers grouped by type (electricity, district heating, district cooling). National suppliers (region = Sverige) are always included and marked with national: true.

Query parameters

q
string

Free-text address or city name in Sweden, e.g. Göteborg or Drottninggatan 1, Stockholm. Either q or lat+lon is required.

lat
number

Latitude (WGS84). Use instead of q to skip geocoding.

lon
number

Longitude (WGS84). Required when using lat.

Example request

curl
curl -H "X-API-Key: mk_your_key_here" \
  "https://your-domain.com/api/address-lookup?q=G%C3%B6teborg"
GET/api/spot-prices

Hourly day-ahead electricity spot prices from ENTSO-E for the four Swedish bidding zones (SE1–SE4). Prices are in EUR/MWh.

Query parameters

zone
string

Bidding zone: SE1 (Luleå), SE2 (Sundsvall), SE3 (Stockholm), SE4 (Malmö). Omit for all zones.

date
string

ISO date, e.g. 2025-01-15. Returns 24 hours for that day.

start
string

ISO date range start (inclusive). Use with end.

end
string

ISO date range end (inclusive).

Example request

curl
curl -H "X-API-Key: mk_your_key_here" \
  "https://your-domain.com/api/spot-prices?zone=SE3&date=2025-01-15"