Skip to main content
The Cost of Energy API gives you programmatic access to the full cost stack for electricity consumers in Sweden: grid fees, energy tax, transfer charges, peak power fees, subscription fees, and everything else a Distribution System Operator (DSO) charges. Instead of implementing hundreds of rate plans one by one, you work with a single set of building blocks that covers every operator and fee type.

How it works

Every cost component is described as a machine-readable calculation pipeline — a small, composable graph of operations like multiply, add, constant, aggregate, and select. The same fixed set of operations models everything from a flat monthly subscription fee to a peak-demand tariff with seasonal time-of-use bands. You can evaluate pipelines yourself in any language — or call our Calculate endpoint and get a step-by-step cost breakdown in the response.

Why developers choose this

  • Implement once, expand across operators. There are only a handful of operations to implement. Adding a new DSO means reading new pipeline definitions, not writing new code.
  • Rules change, your code doesn’t. When a DSO updates their rates, the pipeline definition updates — your integration stays the same.
  • Full transparency. Every calculation returns the intermediate steps. No black boxes. You can audit, display, or optimize against every line item.
  • Works for optimization. The same pipeline definitions can be used to construct optimization problems, not just calculate costs.

Coverage

Live in Sweden today — covering all DSOs with published tariffs. Designed for multi-market expansion across European markets.

Get started

1

Sign up

Create an account at console.engrate.io and generate an API key.
2

Follow the quickstart

Go from zero to a working cost calculation in minutes with the Cost of Energy Quickstart.
3

Explore the API reference

4

Connect your AI tools

Use the MCP integration to explore tariffs and calculations from Claude, Cursor, or VS Code.

API reference

Explore the Cost of Energy API — models, calculation pipelines, functions, and endpoints