> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tariffs.nlead.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Three questions, three requests, no key.

There is nothing to sign up for and no header to send. Set the base URL once:

```bash theme={null}
export TARIFF_API="https://ch-el-tarif-db.azurewebsites.net"
```

> [!NOTE]
>
> Keep the base URL in configuration rather than in code. Every example in these
> pages uses `$TARIFF_API`, so the same snippets keep working wherever the API is
> served from.

## 1. What years do you have?

Start here, because the answer changes over the year. ElCom publishes a tariff
year only after the filing deadline, so the year being collected is thinner than
the year before it.

```bash theme={null}
curl "$TARIFF_API/api/v1/periods"
```

```json theme={null}
{
  "vse": [
    { "period": 2026, "stage": "tarif_validiert", "n_dsos": 165, "n_tariffs": 4141 },
    { "period": 2026, "stage": "API_validiert",   "n_dsos": 175, "n_tariffs": 2589 },
    { "period": 2026, "stage": "ki",              "n_dsos": 163, "n_tariffs": 3123 }
  ],
  "elcom": [{ "period": 2025, "n_operators": 631 }]
}
```

`stage` is the provenance of those rows — see [Provenance](https://docs.tariffs.nlead.ch/concepts/provenance.md).

## 2. Which operator serves this place?

Operators are addressable two ways, and both work everywhere a `dso_id` is
accepted: the 11-digit **VSE number**, or the **ElCom operator id**.

```bash theme={null}
curl "$TARIFF_API/api/v1/dsos?q=AEW"
```

```json theme={null}
[
  {
    "vse_number": "10117012345",
    "elcom_operator_id": "5",
    "uid": "CHE-106.844.310",
    "name": "AEW Energie AG",
    "json_url": "https://www.aew.ch/json-2026",
    "json_available": 1,
    "n_tariffs": 152,
    "periods": "2026"
  }
]
```

> [!TIP]
>
> Searching by place rather than by operator? `GET /api/search?q=Aarau` resolves
> municipalities to their operator.

## 3. What does it charge?

```bash theme={null}
curl "$TARIFF_API/api/v1/dsos/10117012345/tariffs?period=2026&tariff_type=electricity"
```

Each entry carries `stage`, so you can decide for yourself what to trust:

```json theme={null}
{
  "dso": { "vse_number": "10117012345", "name_elcom": "AEW Energie AG" },
  "n": 24,
  "tariffs": [
    {
      "tariff_name": "AEW Classic Standard-Tarif E",
      "stage": "tarif_validiert",
      "voltage_level": 7,
      "tariff_type": "electricity",
      "energy_min": 0.114,
      "energy_max": 0.114,
      "base_chf_m": 0.0,
      "is_eco": 0,
      "has_dynamic": 0,
      "windows": [{ "label": "Einheitstarif", "price": 0.114 }]
    }
  ]
}
```

> [!WARNING]
>
> `/api/v1` returns the operators' own unit, **CHF/kWh** — `0.114`, not `11.4`.
> The reader-facing endpoints (`/api/tariff/find`, `/api/map/tariffs`) convert to
> **Rp/kWh**. Neither includes VAT.

By default you get only the most trustworthy stage present for each year. Pass
`best_stage_only=false` to see every stage, including the machine-read version
of a tariff a reviewer has since confirmed.

## Where to go next

> [card] [Guided path to one tariff](https://docs.tariffs.nlead.ch/guides/find-a-tariff.md)
>
> `/api/tariff/find` does the narrowing for you and returns the tariff
> decomposed, compared to the national median, and labelled with its
> provenance.

> [card] [Every operator at once](https://docs.tariffs.nlead.ch/guides/bulk.md)
>
> Skip the per-operator calls: one CSV or JSONL request returns the whole
> harmonized dataset.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.