This quickstart guide will help you start using the Prezio API to access electricity pricing data across European markets.

Authentication

Prezio uses token-based authentication for all API requests:

1

Get Your API Token

Obtain an API token by:

2

Use the Token in Requests

Include your token in the Authorization header with every API request:

Authorization: Token YOUR_API_TOKEN

Keep your API token secure. Don’t expose it in client-side code or public repositories.

API Workflow

Starting point: Before making API calls, you need a specific location (address or coordinates) for the end-user’s price you’re looking for. By providing a precise location, the API will be able to return the correct prices applicable to that specific area.

The diagram below shows the typical workflow for retrieving electricity pricing data with the Prezio API:

API Request Flow

Follow this step-by-step process to retrieve accurate pricing data:

1

Find Applicable Organizations

First, determine which organizations (grid operators, retailers, authorities) serve your location:

curl -X GET "https://sandbox.prezio.eu/api/organizations/?country=DK&address=Rådhuspladsen 1, Copenhagen" \
  -H "Authorization: Token YOUR_API_TOKEN"

This returns organizations applicable to the address, including their IDs which you’ll need for the next step.

Select the organization IDs you’re interested in (e.g., a specific retailer and the local grid operator).

2

Get Applicable Tariffs

Next, retrieve the applicable tariffs for each selected organization:

curl -X GET "https://sandbox.prezio.eu/api/tariffs/?country=DK&address=Rådhuspladsen 1, Copenhagen&organization_id=org_70" \
  -H "Authorization: Token YOUR_API_TOKEN"

Select the tariff IDs that match your criteria (e.g., residential customer type, consumption range).

3

Get Current Prices or Calculate Costs

Finally, use the selected tariff IDs to either get current prices or calculate costs:

curl -X GET "https://sandbox.prezio.eu/api/live/?country=DK&tariff_id=tar_456&tariff_id=tar_789&address=Rådhuspladsen 1, Copenhagen" \
  -H "Authorization: Token YOUR_API_TOKEN"

This returns current electricity prices for all components of the selected tariffs.

Understanding Responses

API responses are in JSON format. Here’s a simplified example of a response from the /live/ endpoint:

{
  "context": {
    "currency": "DKK",
    "unit": "per_kwh",
    "location": {
      "coordinates": {
        "latitude": 55.6761,
        "longitude": 12.5683
      }
    }
  },
  "results": [
    {
      "datetime": "2023-10-15T14:00:00Z",
      "elements": [
        {
          "id": "com_123",
          "cost": "0.521"
        },
        {
          "id": "com_456",
          "cost": "1.045"
        }
      ],
      "interval_cost": "1.566"
    }
  ]
}

API Environments

Sandbox

URL: https://sandbox.prezio.eu/api/

Use for development and testing. Contains limited data coverage.

Data availability →

Production

URL: https://api.prezio.eu/api/

Use for production applications. Contains complete data coverage.

Next Steps

Having questions? Contact our support team.