Live API Endpoint
Get real-time electricity prices for specific tariffs at a location
The /live/
endpoint provides current electricity prices for specified tariffs at a given location. This endpoint returns a timeseries of price data covering recent hours and upcoming periods, making it ideal for applications needing current pricing information.
Endpoint Overview
This endpoint returns electricity pricing data for specified tariffs, with options to control the level of detail and time resolution.
Data Flow Diagram
Key Parameters
Country code (e.g., DK
, SE
) for the location.
Tariff IDs to retrieve prices for. Multiple IDs can be specified by repeating the parameter.
Each tariff ID must include the tar_
prefix (e.g., tar_123
).
Location address to determine applicable pricing. Required if coordinates not provided.
Latitude coordinate of the location. Required if address not provided.
Longitude coordinate of the location. Required if address not provided.
Time resolution of returned prices. Options: 60min
, 30min
, or 15min
.
Level of detail in the response:
summarized
: Only total pricesemi
: Prices aggregated by organization typefull
: Complete breakdown of all price components
How to handle VAT in the response:
excluded
: Prices exclude VATincluded
: VAT included in each price componentseparated
: VAT shown as separate components
Location Specification
The Calculate endpoint follows the same location specification pattern as other Prezio endpoints:
- You must provide either an
address
or thelatitude
/longitude
coordinates, but not both. - The provided location is used to determine which tariffs are applicable in that geographic area.
- For improved accuracy, prefer using an address with postal code when possible.
- The endpoint will return a confidence score (1-10) for the location resolution.
Time Range
The Live endpoint returns price data for approximately 3 days:
- Yesterday (from midnight yesterday in local time)
- Today
- Tomorrow (until end of day in local time)
This ensures you have access to recent historical prices and upcoming prices for live energy optimization.
The endpoint will return null values for future time periods if price data is not yet available (e.g. before day ahead spot market prices are published, for spot-based tariffs).
Example Requests
Response Structure
The response contains a timeseries of pricing data with information about tariff components:
Detail Levels
Full Detail
Returns all price components individually with metadata about each component, ideal for detailed cost analysis.
Semi Detail
Aggregates costs by organization type (DSO, Retailer, etc.), providing simplified but still informative breakdown.
Summarized
Returns only total price for each time interval, useful when only the bottom line matters.
VAT Handling
Control how Value Added Tax is represented in the response:
Best Practices
For most applications, request only the tariffs you need. If you know exactly which tariffs apply to a user, specify those tariff IDs directly rather than retrieving all possible tariffs.
The Live endpoint may return null values for future time periods if price data (especially spot market prices) is not yet available. Handle these cases gracefully in your application.
Use the detail parameter to control response size. If you only need total prices, use detail=summarized
to minimize response payload size.
Common Use Cases
Real-Time Pricing Display
Show current and upcoming electricity prices to help users make informed decisions about energy usage.
Smart Device Control
Power automated systems that activate or deactivate devices based on current electricity prices.
Cost Forecasting
Provide users with near-term cost projections for planned energy consumption.
Price Alerts
Notify users when electricity prices fall below or rise above specified thresholds.