{"openapi": "3.1.0", "info": {"title": "Spotpris.nu API", "version": "1.0.0", "description": "Free, unauthenticated JSON API for Nord Pool day-ahead spot electricity prices across Sweden, Norway, Denmark, Finland, Estonia, Latvia and Lithuania. Files are statically generated and refreshed roughly every 15 minutes; there is no rate limit, API key or account. Built for server-to-server use.", "contact": {"url": "https://spotpris.nu/api/docs"}}, "servers": [{"url": "https://spotpris.nu"}], "paths": {"/api/{area}.json": {"get": {"operationId": "getAreaPrices", "summary": "Spot prices for a single price area", "parameters": [{"name": "area", "in": "path", "required": true, "schema": {"type": "string", "enum": ["DK1", "DK2", "EE", "FI", "LT", "LV", "NO1", "NO2", "NO3", "NO4", "NO5", "SE1", "SE2", "SE3", "SE4"]}, "description": "Price area code."}], "responses": {"200": {"description": "Spot prices for the requested area, in every supported currency.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AreaResponse"}}}}}}}, "/api/prices.json": {"get": {"operationId": "getAllPrices", "summary": "Spot prices for every price area", "responses": {"200": {"description": "Spot prices for every price area, in every supported currency.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PricesResponse"}}}}}}}, "/api/regions.json": {"get": {"operationId": "getRegions", "summary": "Metadata for every price area", "responses": {"200": {"description": "Country, default language, default currency and approximate location per area.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegionsResponse"}}}}}}}}, "components": {"schemas": {"PricePoint": {"type": "object", "description": "A single quarter-hour price.", "properties": {"time": {"type": "string", "format": "date-time", "description": "Start of the quarter-hour, ISO 8601 with UTC offset."}, "price": {"type": ["number", "null"], "description": "Price for the quarter-hour, in the currency subunit per kWh (see the enclosing object's \"unit\"), or null if unavailable."}}, "required": ["time", "price"]}, "CurrencyData": {"type": "object", "description": "Prices for one price area in one currency.", "properties": {"unit": {"type": "string", "enum": ["dkk_ore_per_kwh", "eur_cent_per_kwh", "nok_ore_per_kwh", "sek_ore_per_kwh"], "description": "The currency subunit the prices are expressed in, per kWh."}, "current": {"$ref": "#/components/schemas/PricePoint"}, "lowest": {"$ref": "#/components/schemas/PricePoint"}, "highest": {"$ref": "#/components/schemas/PricePoint"}, "prices": {"type": "array", "items": {"$ref": "#/components/schemas/PricePoint"}, "description": "Upcoming and ongoing quarter-hour prices, in chronological order."}}, "required": ["unit", "current", "lowest", "highest", "prices"]}, "CurrenciesObject": {"type": "object", "description": "One entry per supported currency.", "properties": {"SEK": {"$ref": "#/components/schemas/CurrencyData"}, "EUR": {"$ref": "#/components/schemas/CurrencyData"}, "DKK": {"$ref": "#/components/schemas/CurrencyData"}, "NOK": {"$ref": "#/components/schemas/CurrencyData"}}, "required": ["SEK", "EUR", "DKK", "NOK"]}, "AreaResponse": {"type": "object", "properties": {"area": {"type": "string", "enum": ["DK1", "DK2", "EE", "FI", "LT", "LV", "NO1", "NO2", "NO3", "NO4", "NO5", "SE1", "SE2", "SE3", "SE4"]}, "generated_at": {"type": "string", "format": "date-time"}, "currencies": {"$ref": "#/components/schemas/CurrenciesObject"}}, "required": ["area", "generated_at", "currencies"]}, "PricesResponse": {"type": "object", "properties": {"generated_at": {"type": "string", "format": "date-time"}, "areas": {"type": "object", "description": "Keyed by price area code.", "properties": {"DK1": {"$ref": "#/components/schemas/CurrenciesObject"}, "DK2": {"$ref": "#/components/schemas/CurrenciesObject"}, "EE": {"$ref": "#/components/schemas/CurrenciesObject"}, "FI": {"$ref": "#/components/schemas/CurrenciesObject"}, "LT": {"$ref": "#/components/schemas/CurrenciesObject"}, "LV": {"$ref": "#/components/schemas/CurrenciesObject"}, "NO1": {"$ref": "#/components/schemas/CurrenciesObject"}, "NO2": {"$ref": "#/components/schemas/CurrenciesObject"}, "NO3": {"$ref": "#/components/schemas/CurrenciesObject"}, "NO4": {"$ref": "#/components/schemas/CurrenciesObject"}, "NO5": {"$ref": "#/components/schemas/CurrenciesObject"}, "SE1": {"$ref": "#/components/schemas/CurrenciesObject"}, "SE2": {"$ref": "#/components/schemas/CurrenciesObject"}, "SE3": {"$ref": "#/components/schemas/CurrenciesObject"}, "SE4": {"$ref": "#/components/schemas/CurrenciesObject"}}}}, "required": ["generated_at", "areas"]}, "RegionMetadata": {"type": "object", "properties": {"country": {"type": "string", "description": "ISO 3166-1 alpha-2 country code."}, "language": {"type": "string", "description": "Default language code for this area."}, "currency": {"type": "string", "enum": ["SEK", "EUR", "DKK", "NOK"]}, "lat": {"type": "number", "description": "Approximate latitude of the area."}, "lng": {"type": "number", "description": "Approximate longitude of the area."}}, "required": ["country", "language", "currency", "lat", "lng"]}, "RegionsResponse": {"type": "object", "properties": {"generated_at": {"type": "string", "format": "date-time"}, "areas": {"type": "object", "description": "Keyed by price area code.", "properties": {"DK1": {"$ref": "#/components/schemas/RegionMetadata"}, "DK2": {"$ref": "#/components/schemas/RegionMetadata"}, "EE": {"$ref": "#/components/schemas/RegionMetadata"}, "FI": {"$ref": "#/components/schemas/RegionMetadata"}, "LT": {"$ref": "#/components/schemas/RegionMetadata"}, "LV": {"$ref": "#/components/schemas/RegionMetadata"}, "NO1": {"$ref": "#/components/schemas/RegionMetadata"}, "NO2": {"$ref": "#/components/schemas/RegionMetadata"}, "NO3": {"$ref": "#/components/schemas/RegionMetadata"}, "NO4": {"$ref": "#/components/schemas/RegionMetadata"}, "NO5": {"$ref": "#/components/schemas/RegionMetadata"}, "SE1": {"$ref": "#/components/schemas/RegionMetadata"}, "SE2": {"$ref": "#/components/schemas/RegionMetadata"}, "SE3": {"$ref": "#/components/schemas/RegionMetadata"}, "SE4": {"$ref": "#/components/schemas/RegionMetadata"}}}}, "required": ["generated_at", "areas"]}}}}