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 -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.
/api/suppliersList all suppliersReturns all active Swedish energy suppliers with summary counts of their tariff versions and price components.
Example request
curl -H "X-API-Key: mk_your_key_here" \ https://your-domain.com/api/suppliers
/api/suppliers/{id}Supplier detailReturns 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 -H "X-API-Key: mk_your_key_here" \ https://your-domain.com/api/suppliers/1
/api/pricesPrice componentsCross-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_typeFilter by type: grid, district_heating, or district_cooling.
unitFilter by unit, e.g. SEK/kWh or SEK/år.
component_typeFilter by component name substring, e.g. energiavgift.
Example request
curl -H "X-API-Key: mk_your_key_here" \ "https://your-domain.com/api/prices?tariff_type=grid&unit=SEK%2FkWh"
/api/address-lookupAddress-based supplier lookupFind 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
qFree-text address or city name in Sweden, e.g. Göteborg or Drottninggatan 1, Stockholm. Either q or lat+lon is required.
latLatitude (WGS84). Use instead of q to skip geocoding.
lonLongitude (WGS84). Required when using lat.
Example request
curl -H "X-API-Key: mk_your_key_here" \ "https://your-domain.com/api/address-lookup?q=G%C3%B6teborg"
/api/spot-pricesElectricity spot pricesHourly day-ahead electricity spot prices from ENTSO-E for the four Swedish bidding zones (SE1–SE4). Prices are in EUR/MWh.
Query parameters
zoneBidding zone: SE1 (Luleå), SE2 (Sundsvall), SE3 (Stockholm), SE4 (Malmö). Omit for all zones.
dateISO date, e.g. 2025-01-15. Returns 24 hours for that day.
startISO date range start (inclusive). Use with end.
endISO date range end (inclusive).
Example request
curl -H "X-API-Key: mk_your_key_here" \ "https://your-domain.com/api/spot-prices?zone=SE3&date=2025-01-15"