API guides · 29.09.2026
Electricity prices 2027 by municipality: ElCom tariffs through an API
Get the 2027 electricity tariffs of every Swiss municipality by consumption profile and network operator, and compare them with 2026 in a few lines of code.
Every late summer, the Federal Electricity Commission (ElCom) publishes next year's tariffs for every municipality and network operator. The data is open, but as a SPARQL data cube. We made it queryable: nearly 790,000 tariffs from 2011 to 2027 and 742 network operators.
Reading a tariff
A tariff is defined by a year, a municipality (FSO number), a network operator, a consumption profile and a product (standard or cheapest). Amounts are in centimes per kWh, excluding VAT:
| Field | Content |
|---|---|
total |
Total price |
energy |
Energy |
grid_usage |
Grid usage |
community_fees |
Municipal charges |
federal_levy |
Federal network surcharge |
Profiles go from H1 to H8 for households and C1 to C7 for businesses. ElCom's reference profile is H4, 4,500 kWh per year.
A municipality's 2027 tariff
curl -H "Authorization: Token YOUR_KEY" \
"https://opendata.altius-group.ch/energy/electricity/api/v1/tariffs/?municipality=5523&period=2027&category=H4"
For Froideville (VD) the answer is 28.586 ct/kWh, operator Romande Energie SA. The municipality__canton, operator and product parameters narrow the query.
Compare 2027 with 2026
import requests
API = "https://opendata.altius-group.ch/energy/electricity/api/v1/tariffs/"
HEADERS = {"Authorization": "Token YOUR_KEY"}
def price(year, municipality=5523):
r = requests.get(API, headers=HEADERS, params={
"municipality": municipality, "period": year, "category": "H4", "product": "standard"})
return min(float(t["total"]) for t in r.json()["results"])
before, after = price(2026), price(2027)
print(f"{before:.2f} → {after:.2f} ct/kWh ({(after - before) / before:+.1%})")
Ideas
- Property managers: estimate a flat's electricity costs before renting it out.
- Solar installers: compute payback with the municipality's real tariff.
- Comparison sites and media: rank the cheapest and most expensive municipalities of a canton.
Every municipality can also be browsed for free on the website, with its history since 2011.