Open Swiss Data Tariff API
The Tariff API from Open Swiss Data — 2 operation(s) for tariff.
The Tariff API from Open Swiss Data — 2 operation(s) for tariff.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/openswissdata-com:openswissdata-com-tariff-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: OpenSwissData — public read-only Tariff API
version: 1.0.0
description: 'Read-only JSON endpoints over the official localities and streets directories (swisstopo), the combined commune and canton profiles (including the BFE one-time photovoltaic remuneration), a catalogue of approved open Swiss datasets (generic engine, filterable by canton, commune, postal code, NOGA code or year), the Swiss company fiche (company_check) and the public source registry. Free, no key, limited per network address. The company fiche is also available over MCP (`company_check`, see /mcp) without a key; the commune and canton profiles, the BFE data and the open datasets catalogue are REST-only. Unofficial copies: binding decisions belong to the official sources named in each `sources`/`source` entry.'
contact:
url: https://www.openswissdata.com/en/
servers:
- url: https://www.openswissdata.com
tags:
- name: Tariff
paths:
/api/v1/tariff/{code}/at:
get:
summary: A customs tariff line as archived on a date
description: 'The summary of one 8-digit Swiss tariff line as OpenSwissData archived it in the most recent version not later than the requested date, with that version and its date, the next archive and whether the line differs in it, and any gap in the archives around that date. Unofficial copy: the response carries the same notice as the MCP tool tariff_lookup. An archive holds what the BAZG published as in force on its collection day, so this is not a statement of the law in force on the requested date, and a change that took effect between two versions shows only from the next version. A null duty or a regime absent from the summary means the summary has no single value, never duty-free; no lowest value is picked among conditional variants; values keep their published unit. Only archives in the current file format, and only the most recent versions, are served: a date before the first one answers no_archive_for_date, never a guessed value. A date after the last archive answers with that last archive and says that later changes are unknown. Responses other than rate limiting carry `source_notice_de`, the notice required by the BAZG.'
parameters:
- name: code
in: path
required: true
schema:
type: string
maxLength: 20
description: 8-digit Swiss tariff number; dots and spaces are ignored
- name: date
in: query
required: true
schema:
type: string
format: date
description: Date, YYYY-MM-DD
responses:
'200':
description: The line, the version used and its date, the next archive, any gap, the notices and the sources
headers:
Cache-Control:
schema:
type: string
description: public, max-age=3600
'400':
description: invalid_tariff_number or invalid_date (a date that does not exist, such as 2026-02-30, is refused)
'404':
description: no_archive_for_date (date before the first archive served) or tariff_line_not_found (absent from the version used; no other version is tried)
'429':
description: Rate limit exceeded for this network address (600 requests/hour, shared with /localities, /communes, /cantons, /datasets and /sources)
'503':
description: 'tariff_history_unavailable: archives not loaded yet or unreadable'
tags:
- Tariff
operationId: getApiV1TariffByCodeAt
x-operation-id-source: derived
/api/v1/tariff/changes:
get:
summary: What changed in the customs tariff between two dates
description: 'Lines that appeared or disappeared, rates that changed and other fields that changed, between the archived versions in force on two dates (same rule as /api/v1/tariff/{code}/at for each date). Rates means the base duty and the preferential regimes of the summary; other_fields_changed covers the number of detailed rates, relief codes, texts and validity start. Sorted by tariff number. limit defaults to 100, maximum 1000; offset defaults to 0; both reject an out-of-range or non-integer value with a 400 error. The comparison rests on the summary of each line and on the two versions only: moves between them are not listed, and a conditional variant can change without the summary changing, so no listed change does not mean that nothing changed. Gaps in the archives between the two dates are listed. Unofficial copy: the response carries the same notice as the MCP tool tariff_lookup. Responses other than rate limiting carry `source_notice_de`, the notice required by the BAZG.'
parameters:
- name: from
in: query
required: true
schema:
type: string
format: date
description: Start date, YYYY-MM-DD
- name: to
in: query
required: true
schema:
type: string
format: date
description: End date, YYYY-MM-DD, not before from
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 1000
default: 100
description: Changes per page
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
description: Changes to skip
responses:
'200':
description: The two versions compared, totals per kind, one page of changes, any gap, the notices and the sources
headers:
Cache-Control:
schema:
type: string
description: public, max-age=3600
'400':
description: invalid_date, invalid_range (from after to), invalid_limit or invalid_offset
'404':
description: 'no_archive_for_date: from is before the first archive served'
'429':
description: Rate limit exceeded for this network address (600 requests/hour, shared with /localities, /communes, /cantons, /datasets and /sources)
'503':
description: 'tariff_history_unavailable: archives not loaded yet or unreadable'
tags:
- Tariff
operationId: getApiV1TariffChanges
x-operation-id-source: derived