Choliday API

Swiss holiday REST API · v1

← App

Base URL: https://choliday.rappo.dev/api  ·  Rate limit: 300 req/min  ·  Format: JSON (default) or CSV

Endpoints

GET /holidays/{country}/{region}[/{year}]

Returns all holidays for a country/region. Year defaults to the current year.

Path parameters

ParamExampleDescription
countryCHISO 3166-1 alpha-2 country code
regionZH or ZH,BECanton code. Comma-separated for multi-region union.
year2025Optional. 1900–2200. Defaults to current year.

Query parameters

ParamValuesDescription
formatcsvReturns CSV instead of JSON
fieldsdate,name_deComma-separated field subset
nonwork1Only return non-workday holidays
weekday1,5Only holidays on these weekdays (0=Sun … 6=Sat)

Example

GET /api/holidays/CH/ZH/2025

{
  "country": "CH",
  "region": "ZH",
  "year": 2025,
  "count": 13,
  "holidays": [
    {
      "date": "2025-01-01",
      "name_de": "Neujahr",
      "name_fr": "Nouvel An",
      "name_it": "Capodanno",
      "is_always_nonworkday": true
    },
    ...
  ]
}

GET /holidays/{country}/{region}/next

Returns the next upcoming holiday from today.

Example

GET /api/holidays/CH/BE/next

{
  "country": "CH",
  "region": "BE",
  "holiday": { "date": "2025-05-29", "name_de": "Auffahrt", ... }
}

GET /holidays/{country}/{region}/{date}

Checks whether a specific date is a holiday. Date format: YYYY-MM-DD.

Example

GET /api/holidays/CH/ZH/2025-08-01

{
  "country": "CH",
  "region": "ZH",
  "date": "2025-08-01",
  "is_holiday": true,
  "holiday": { "date": "2025-08-01", "name_de": "Nationalfeiertag", ... }
}

GET /holidays/{country}/heatmap/{year}

Returns holiday counts for every region in the country. Used to render the map heatmap.

Example

GET /api/holidays/CH/heatmap/2025

{ "AG": 15, "AI": 14, "AR": 11, "BE": 12, ... }

GET /countries

Lists all supported countries.

GET /countries/{country}/regions

Lists all regions (cantons) for a country.

Holiday object fields

FieldTypeDescription
datestringISO date YYYY-MM-DD
name_destringGerman name
name_frstringFrench name
name_itstringItalian name
is_always_nonworkdaybooleanTrue if officially non-working across all employers

Caching

All responses include Cache-Control: public, max-age=86400, stale-while-revalidate=604800.

Machine-readable spec

openapi.json — OpenAPI 3.1 spec, compatible with Swagger UI, Insomnia, Postman, and similar tools.

Choliday is open source. Holiday data is algorithmically generated per Swiss law.