WhenOff

API Festività

API REST gratuita per le festività nel mondo. Nessuna autenticazione richiesta. CORS abilitato.

URL Base

https://www.whenoff.com

Parametri

country: codice ISO 3166-1 alpha-2 (es. IT, US, GB). year: 2024–2028.

Limiti

Nessun limite. Si prega di essere ragionevoli. Le risposte sono in cache per 24 ore.

Endpoint

GET/api/holidays?type=countries

Elenca tutti i paesi disponibili

Risposta
{
  "count": 122,
  "countries": [
    { "code": "IT", "name": "Italy" },
    { "code": "US", "name": "United States" },
    ...
  ]
}
GET/api/holidays?country={CC}&year={YYYY}

Ottieni le festività per un paese e anno

Risposta
{
  "country": "IT",
  "year": 2026,
  "count": 11,
  "holidays": [
    {
      "date": "2026-01-01",
      "name": "New Year's Day",
      "localName": "Capodanno",
      "countryCode": "IT",
      "global": true,
      "counties": null,
      "types": ["Public"]
    },
    ...
  ]
}
GET/api/holidays?country={CC}&year={YYYY}&type=long-weekends

Ottieni i ponti per un paese e anno

Risposta
{
  "country": "IT",
  "year": 2026,
  "count": 5,
  "longWeekends": [
    {
      "startDate": "2026-01-01",
      "endDate": "2026-01-04",
      "dayCount": 4,
      "needBridgeDay": true,
      "bridgeDays": ["2026-01-02"]
    },
    ...
  ]
}
GET/api/calendar?country={CC}&year={YYYY}

Scarica file calendario .ics per un paese

Risposta
Returns .ics file (text/calendar)
GET/api/calendar?country={CC}&year={YYYY}&slug={slug}

Scarica .ics per una singola festività