# Swiss Electricity Tariffs (ElCom) (`darikami/swiss-electricity-tariffs`) Actor

Official electricity tariffs of every Swiss grid operator and municipality from ElCom, 2011 to next year: total price and its components (energy, grid, fees, levies) per consumption category (H1-H8 households, C1-C7 businesses). For energy advisers, installers, proptech and price comparisons.

- **URL**: https://apify.com/darikami/swiss-electricity-tariffs.md
- **Developed by:** [DARIKAMI GmbH](https://apify.com/darikami) (community)
- **Categories:** Business, Real estate, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 tariff rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Swiss Electricity Tariffs (ElCom)

**Official Swiss electricity prices per municipality and grid operator, from the federal regulator ElCom, 2011 to 2027.**
You get the total price and its components in Rappen per kWh, per consumption category (H1-H8 households, C1-C7 businesses).
**USD 0.002 per tariff row (USD 2 per 1,000).** One clean row per tariff, instead of a SPARQL query.

| Year | Municipality | Grid operator | Category | Total Rp./kWh | Energy | Grid usage |
|---|---|---|---|---|---|---|
| 2027 | Zürich | Elektrizitätswerk der Stadt Zürich | H4 | 24.632 | 7.884 | 11.122 |
| 2027 | Zürich | Elektrizitätswerk der Stadt Zürich | C3 | 24.432 | 8.787 | 11.985 |
| 2027 | Bern | Energie Wasser Bern | H4 | 31.113 | 10.75 | 13.45 |
| 2027 | Bern | Energie Wasser Bern | C3 | 29.39 | 10.75 | 14.1 |

The rows come from a real cloud run of 04.11.2026 (2 municipalities, 2 categories). The full item is under Output.

### Who uses it

- **Energy advisers, solar and heat-pump installers:** the local tariff for the payback calculation of an offer.
- **Proptech and real-estate portals:** the electricity cost of a home per municipality, with H4 as the benchmark.
- **Price comparisons and research:** all ~2,100 municipalities of a year, or the trend since 2011.

### What it does not do

- Prices exclude VAT. The total has no fixed costs (they are separate fields).
- Next year's tariffs appear each September, when ElCom publishes them.
- The operator's own tariff sheet (`tariffSheetUrl`) is authoritative for a bill.

### Input

```json
{ "years": ["2027"], "municipalities": ["261", "Bern"], "categories": ["H4", "C3"], "product": "standard" }
```

| Field | Meaning |
|---|---|
| `years` | Four-digit years, 2011 or later (the data starts in 2011). Empty = the latest year in the data. |
| `municipalities` | BFS municipality numbers (261 = Zurich) or official names (exact, case-insensitive). Empty = all ~2,100. An unknown name fails the run; a number without tariffs gives a warning. |
| `categories` | `H1`-`H8`, `C1`-`C7`. Empty = all fifteen. `H4` is the usual benchmark. |
| `product` | `standard` (the operator's default product, ~2,270 municipalities a year) or `cheapest` (its cheapest product, ~770 municipalities). |

Categories (annual consumption, as ElCom defines them): H1 1,600 kWh 2-room flat; H2 2,500 kWh 4-room flat; H3 4,500 kWh
4-room flat with electric boiler; **H4 4,500 kWh 5-room flat, electric cooker and dryer, no electric boiler**; H5 7,500
kWh 5-room house with boiler; H6 25,000 kWh house with electric resistance heating; H7 13,000 kWh house with a 5 kW heat
pump; H8 7,500 kWh large, highly electrified flat; C1 8,000 kWh to C7 7,500,000 kWh businesses (C1-C4 low voltage, C5-C7
medium voltage with their own transformer station).

### Output (one item per tariff)

```json
{
  "year": 2027,
  "municipalityId": "261",
  "municipality": "Zürich",
  "operatorId": "565",
  "operator": "Elektrizitätswerk der Stadt Zürich",
  "category": "H4",
  "consumptionKwhPerYear": 4500,
  "product": "standard",
  "totalRpPerKwh": 24.632,
  "energyRpPerKwh": 7.884,
  "gridUsageRpPerKwh": 11.122,
  "chargeRpPerKwh": 1.3,
  "aidFeeRpPerKwh": 2.3,
  "meteringRpPerKwh": 2.027,
  "annualMeteringCostChf": 91.2,
  "fixCostsChfPerYear": 0,
  "fixCostsPercent": 0,
  "energyTariffName": "Tarif Energie ewz.natur",
  "gridTariffName": "Tarif Netznutzung NNA",
  "tariffSheetUrl": "https://www.ewz.ch/dam/ewz/meinewz/Dokumentencenter/tarif-ewz-maschinenlesbar.json",
  "conflictingFields": [],
  "source": "ElCom (Swiss Federal Electricity Commission), cube \"Electricity tariff per provider\" on LINDAS (lindas.admin.ch), terms: opendata.swiss Open use"
}
```

Prices are **Rappen per kWh, excl. VAT**. `totalRpPerKwh` is ElCom's total of all variable costs (energy + grid usage +
levies + federal surcharge + metering); fixed costs are not in it. Values are passed through as published: a few
rows (43 of 30,811 in 2027) have no total, and the field is then `null`. **Where the source itself states two different
values** for one tariff (it happens in a handful of older observations - e.g. municipality 295, operator 589, 2020, where the
total reads both 16.077 and 14.727 Rp./kWh), the smaller value of each such field is given, and `conflictingFields` lists the
fields concerned (empty for all of 2027); the run logs a warning with the number of such rows. Treat a row with a conflict
as unreliable and check ElCom's own viewer.

### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| `tariff-row` | **USD 0.002** | one tariff row delivered |

A whole year for all of Switzerland, standard product (about 30,800 rows in 2027) costs about USD 62; one municipality's
benchmark a fraction of a cent. A run that finds nothing is free. You can set a maximum charge for a run.

### Data source and terms

- **Source:** ElCom's open-data cube "Electricity tariff per provider" (`https://energy.ld.admin.ch/elcom/electricityprice`)
  on **LINDAS**, the Confederation's linked-data service, read through its public SPARQL endpoint
  (`https://lindas.admin.ch/query`, no key). ElCom's own viewer is `https://www.strompreis.elcom.admin.ch/`.
- **Terms:** the cube's metadata on LINDAS states its licence as **"Open use"** (opendata.swiss terms of use
  `NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired`: commercial use allowed, no attribution required). Each
  item names its source anyway. ElCom's tariffs are facts published by a federal authority.
- The tariffs are the operators' reports to ElCom; the operator's own tariff sheet (`tariffSheetUrl`) is
  authoritative for a bill.

### Run summary

The run summary is in the default key-value store under `SUMMARY`.
The data comes as the source publishes it, without warranty.

**More official-data actors by darikami:** [Swiss UID & VAT validator](https://apify.com/darikami/swiss-uid-validator) · [Swiss federal law MCP](https://apify.com/darikami/swiss-federal-law-mcp) · [SEC company fundamentals](https://apify.com/darikami/sec-company-fundamentals) · [German public tenders](https://apify.com/darikami/german-public-tenders).
In an AI agent: ask the Apify MCP server (`mcp.apify.com`) for `darikami/swiss-electricity-tariffs`.

# Actor input Schema

## `years` (type: `array`):

Tariff years, four digits, 2011 onward (ElCom publishes next year's tariffs each September; 2027 has been in the data since September 2026). Empty = the latest year in the data.

## `municipalities` (type: `array`):

BFS municipality numbers (e.g. 261 for Zurich) or official names (e.g. Zürich, Bern; exact match, case-insensitive). Empty = all ~2,100 municipalities. An unknown name fails the run.

## `categories` (type: `array`):

ElCom consumption categories: H1-H8 (households, 1,600 to 25,000 kWh/year) and C1-C7 (businesses, 8,000 to 7,500,000 kWh/year). Empty = all fifteen. H4 (4,500 kWh/year, 5-room flat, electric cooker and dryer, no electric boiler) is the usual benchmark.

## `product` (type: `string`):

standard = the operator's default product in each municipality; cheapest = its cheapest product (published for fewer municipalities).

## Actor input object example

```json
{
  "years": [
    "2027"
  ],
  "municipalities": [
    "261"
  ],
  "categories": [
    "H4"
  ],
  "product": "standard"
}
```

# Actor output Schema

## `results` (type: `string`):

One item per grid operator, municipality, year and consumption category: the total price and its components.

## `summary` (type: `string`):

SUMMARY record: pushed, charged, attempts, errors, stoppedByBudget, ok, message.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "years": [
        "2027"
    ],
    "municipalities": [
        "261"
    ],
    "categories": [
        "H4"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("darikami/swiss-electricity-tariffs").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "years": ["2027"],
    "municipalities": ["261"],
    "categories": ["H4"],
}

# Run the Actor and wait for it to finish
run = client.actor("darikami/swiss-electricity-tariffs").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "years": [
    "2027"
  ],
  "municipalities": [
    "261"
  ],
  "categories": [
    "H4"
  ]
}' |
apify call darikami/swiss-electricity-tariffs --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,darikami/swiss-electricity-tariffs"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8ZBaE7V2OuV5nRp0m/builds/wuoGeVtdi5rzavpqT/openapi.json
