# Catalonia Public Holidays - Local Holidays by Municipality (`hydramill/catalonia-holidays`) Actor

Official working holidays of Catalonia from the Generalitat open data: the general holidays plus the local holidays of all 947 municipalities and their nuclei, with long weekends and ponts. Clean JSON with INE codes, comarca, names in Catalan/Spanish/English and ICS-ready dates.

- **URL**: https://apify.com/hydramill/catalonia-holidays.md
- **Developed by:** [Hydramill](https://apify.com/hydramill) (community)
- **Categories:** Developer tools, Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Catalonia Public Holidays - local holidays of every municipality, long weekends, ICS-ready

The **official working-holiday calendar of Catalonia** from the Generalitat de Catalunya open data: the 12 general (Catalonia-wide) holidays **plus the two local holidays chosen by each of the 947 town councils** and by ~530 sub-municipal nuclei (EMD, pedanies). Optionally, every **long weekend and _pont_** of each municipality, with the bridge day you would have to take off.

Each holiday comes back as one clean row: date, weekday, name in English/Catalan/Spanish, scope (general / local) and level (national / regional / local), municipality, INE and IDESCAT codes, comarca, nucleus, and **iCalendar-ready dates** (`DTSTART;VALUE=DATE` / exclusive `DTEND`).

> Resum en català i resumen en español [al final](#català).

### Why this actor

- **Local holidays per municipality.** Spain has 14 working holidays a year, but two of them are chosen by each town council, so "is 24 September a holiday?" depends on the town (it is in Barcelona and L'Hospitalet, not in Girona). Generic holiday APIs stop at national and regional holidays; this actor has the local ones of every Catalan municipality.
- **Official source, no scraping.** It reads the Generalitat's own datasets (the labour calendar and the local holidays calendar of the Departament d'Empresa i Treball, plus the IDESCAT/ICGC municipality list) through the open data portal API, licensed for reuse.
- **Long weekends and ponts.** Computed on each municipality's own calendar: a holiday on Friday or Monday gives a long weekend; one on Tuesday or Thursday gives a *pont* with its bridge day. Runs that cross New Year are seen whole.
- **Easy to plug in.** INE codes to join with your data, comarca for grouping, names in three languages, `icsStart` / `icsEnd` to build a calendar feed, a `localPublished` flag when a town council's dates are not in the open data.
- **Fast and cheap.** Five small API requests; a run takes 2-8 s, even for the whole of Catalonia.
- **Docs in English, Catalan and Spanish.**

#### How it compares (Apify Store, checked 2026-11-01)

- *Spain public holidays & business days (BOE)* (`fixandfocus/festivos-espana`, $0.0005 per holiday): national and regional holidays for every Spanish region from the BOE, plus business-day counts. **No local (municipal) holidays.**
- *Public Holidays API* (`easyapi/public-holidays-api`, ~$3 / 1,000), *Public Holidays Finder* (`scrapemint/public-holidays-finder`, $2 / 1,000) and several Nager.Date wrappers: worldwide, national and regional only.

This actor covers **Catalonia only**, but at municipality level: the 2 local holidays of every town and nucleus, long weekends and ponts per town, INE/comarca, ICS dates. For the rest of Spain, use one of the actors above.

### Input

Every field is optional.

| Field | Type | Example | Notes |
|---|---|---|---|
| `years` | string\[] / number\[] | `["2026"]` | Calendar years. Default: the current year. Available today: **2023-2026**; next year appears in the autumn (general calendar ~October, local holidays later). A year not yet published fails the run with the list of available years. |
| `municipalities` | string\[] | `["Barcelona", "08279"]` | Name (accents and case optional, `L'Hospitalet de Llobregat` or `Hospitalet de Llobregat, l'`), 5-digit INE code, 6-digit IDESCAT code, or the 8-digit code of a nucleus (`08205001` = Valldoreix). Empty = all 947 municipalities. Unknown names fail the run with suggestions. |
| `includeGeneral` | boolean | `true` | Default `true`. `false` = local holidays only (and only the long weekends that contain a local holiday). |
| `includeNuclei` | boolean | `true` | Default `true`: a municipality brings along its nuclei that have their own local holidays (39 municipalities, e.g. Baix Pallars, publish local holidays only per nucleus). |
| `includeLongWeekends` | boolean | `true` | Default `false`. Adds one item per long weekend / pont. |
| `maxResults` | integer | `1000` | Default 100,000 (= everything), max 500,000. You pay only for the rows returned. |

Example: the 2026 calendar of three towns with their long weekends:

```json
{
  "years": ["2026"],
  "municipalities": ["Barcelona", "Sant Cugat del Valles", "17079"],
  "includeLongWeekends": true
}
```

More examples: `{}` (every holiday of every Catalan municipality this year, ~20,500 rows), `{ "includeGeneral": false, "includeNuclei": false }` (just the local holidays of every town, ~1,750 rows), `{ "years": ["2025", "2026"], "municipalities": ["Girona"] }`.

### Output

One item per holiday per municipality (or nucleus), then its long weekends when asked. Real run, 2026-11-01:

```json
{
  "type": "holiday",
  "year": 2026,
  "date": "2026-09-24",
  "endDate": "2026-09-24",
  "days": 1,
  "weekday": "Thursday",
  "weekdayNumber": 4,
  "name": "Local holiday",
  "nameCa": "Festa local",
  "nameEs": "Fiesta local",
  "scope": "local",
  "level": "local",
  "longWeekendKind": null,
  "holidays": ["2026-09-24"],
  "bridgeDays": [],
  "municipality": "Barcelona",
  "ine": "08019",
  "idescat": "080193",
  "comarca": "Barcelonès",
  "nucleus": null,
  "nucleusCode": null,
  "localPublished": true,
  "icsStart": "20260924",
  "icsEnd": "20260925",
  "retrievedAt": "2026-10-31T23:49:17.034Z",
  "source": "Generalitat de Catalunya. Departament d'Empresa i Treball (calendari laboral i festes locals); IDESCAT i ICGC (municipis)",
  "licence": "Llicència oberta d'ús d'informació - Catalunya (https://administraciodigital.gencat.cat/ca/dades/dades-obertes/informacio-practica/llicencies/)"
}
```

A long weekend uses the same columns:

```json
{
  "type": "long-weekend", "year": 2026, "date": "2026-09-24", "endDate": "2026-09-27", "days": 4,
  "weekday": "Thursday", "weekdayNumber": 4,
  "name": "Bridge: Local holiday", "nameCa": "Pont: Festa local", "nameEs": "Puente: Fiesta local",
  "scope": "local", "level": null, "longWeekendKind": "pont",
  "holidays": ["2026-09-24"], "bridgeDays": ["2026-09-25"],
  "municipality": "Barcelona", "ine": "08019", "comarca": "Barcelonès",
  "icsStart": "20260924", "icsEnd": "20260928"
}
```

| Field | Meaning |
|---|---|
| `type` | `holiday` (one day) or `long-weekend` (3+ days off). |
| `date`, `endDate`, `days` | The holiday; or first day, last day and length of the long weekend (bridge days included). |
| `name`, `nameCa`, `nameEs` | General holidays by name (`Christmas Day` / `Nadal` / `Navidad`). **Local holidays are named only "Local holiday"**: the Generalitat's open data publishes their dates, not their names. |
| `scope`, `level` | `general` (national = Spain-wide, or regional = chosen by the Generalitat) or `local` (chosen by the town council). A long weekend is `local` when one of its holidays is. |
| `longWeekendKind`, `bridgeDays` | `long-weekend` (holiday next to the weekend) or `pont` (Tuesday/Thursday holiday; `bridgeDays` = the working day to take off). |
| `localPublished` | `false` when the town council's local holidays of that year are not in the open data (38 municipalities for 2026, e.g. Viladecans); the row set then holds general holidays only. |
| `icsStart`, `icsEnd` | Drop them into `DTSTART;VALUE=DATE:` / `DTEND;VALUE=DATE:` of an all-day iCalendar event (end exclusive, RFC 5545). |

The run also stores a `SUMMARY` record in the key-value store (available years, calendars, holidays and long weekends returned, municipalities without published local holidays, why it stopped). The Console shows two table views ("Holidays" and "Long weekends").

### Use cases

- HR, payroll and workforce tools: the right local holidays for each office or worker's town.
- Delivery, logistics and booking apps: closed days per town, delivery-date estimates.
- Calendars: publish an ICS feed per municipality, or add local holidays to Google/Outlook calendars.
- Travel and leisure: long weekends and ponts per town, for campaigns and planning.
- Developers: a clean JSON alternative to joining three Socrata datasets yourself.

### Pricing

Pay per event: you pay **per item returned** (event `result`) plus Apify's small start fee. `maxResults` caps the cost, and the actor stops cleanly when your maximum cost per run is reached. See the Pricing tab for the current price.

### Data source and licence

**Generalitat de Catalunya. Departament d'Empresa i Treball** (datasets [Calendari laboral de Catalunya](https://analisi.transparenciacatalunya.cat/d/yf2b-mjr6) and [Calendari de festes locals a Catalunya](https://analisi.transparenciacatalunya.cat/d/b4eh-r8up)); **IDESCAT i ICGC** ([Municipis Catalunya Geo](https://analisi.transparenciacatalunya.cat/d/9aju-tpwc)). Licence: [Llicència oberta d'ús d'informació - Catalunya](https://administraciodigital.gencat.cat/ca/dades/dades-obertes/informacio-practica/llicencies/): reuse, also commercial, as long as the content is not altered and the source is cited. Every row carries `source`, `licence` and `retrievedAt`; when you republish the data, keep the attribution. Names of general holidays and long weekends are added by this actor. This actor is not affiliated with or endorsed by the Generalitat de Catalunya.

### Limits

- **Catalonia only.** Other Spanish regions publish their local holidays in other formats; they are not covered.
- Local holidays have no names in the source (only dates).
- Only what the Generalitat publishes: a few town councils are missing each year (`localPublished: false`); the Festa d'Aran (17 June) is not in the datasets.
- Years: 2023 onwards (older years of the local dataset contain test rows and are not offered).

### Català

El calendari oficial de festius laborals de Catalunya (dades obertes de la Generalitat): els 12 festius generals i **les dues festes locals de cadascun dels 947 municipis** i dels nuclis amb festes pròpies, amb els caps de setmana llargs i els ponts de cada municipi si els demanes. Cada fila porta data, dia de la setmana, nom en català, castellà i anglès, àmbit (general o local), municipi, codi INE i IDESCAT, comarca, nucli i dates a punt per a iCalendar. Filtra per anys i municipis (nom amb accents o sense, o codi INE). Font: Generalitat de Catalunya, Departament d'Empresa i Treball; IDESCAT i ICGC. Pagues només per fila retornada.

### Español

El calendario oficial de festivos laborales de Cataluña (datos abiertos de la Generalitat): los 12 festivos generales y **las dos fiestas locales de cada uno de los 947 municipios** y de los núcleos con fiestas propias, con los puentes y fines de semana largos de cada municipio si los pides. Cada fila trae fecha, día de la semana, nombre en catalán, castellano e inglés, ámbito (general o local), municipio, código INE e IDESCAT, comarca, núcleo y fechas listas para iCalendar. Filtra por años y municipios (nombre con o sin acentos, o código INE). Fuente: Generalitat de Catalunya, Departament d'Empresa i Treball; IDESCAT i ICGC. Pagas solo por fila devuelta.

# Actor input Schema

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

Calendar years (4 digits). Empty = the current year. A year the Generalitat has not published yet is rejected with the list of available years (2023 onwards; next year usually appears in the autumn).

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

Catalan municipalities by name (accents and case optional: "Sant Cugat del Valles", "L'Hospitalet de Llobregat", "Prat de Llobregat, el"), 5-digit INE code ("08019"), 6-digit IDESCAT code or the 8-digit code of a sub-municipal nucleus. Empty = all 947 municipalities.

## `includeGeneral` (type: `boolean`):

Also return the Catalonia-wide holidays (Christmas, Sant Joan, La Diada...) for each municipality. Off = local holidays only.

## `includeNuclei` (type: `boolean`):

Also return the calendars of the nuclei (EMD, pedanies) that have their own local holidays, e.g. Valldoreix in Sant Cugat del Vallès. Some municipalities publish local holidays only per nucleus.

## `includeLongWeekends` (type: `boolean`):

Add one item per long weekend (3+ days off: a holiday on Friday or Monday) and per pont (a Tuesday or Thursday holiday, with the bridge day to take off), computed on each municipality's own calendar.

## `maxResults` (type: `integer`):

Maximum items returned (and charged). One year for every municipality and nucleus is about 20,000 holiday items.

## Actor input object example

```json
{
  "years": [
    "2026"
  ],
  "municipalities": [
    "Barcelona",
    "08279"
  ],
  "includeGeneral": true,
  "includeNuclei": true,
  "includeLongWeekends": true,
  "maxResults": 100000
}
```

# Actor output Schema

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

One item per public holiday (regional and local) per municipality.

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

Totals of the run (key SUMMARY in the default key-value store).

# 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": [
        "2026"
    ],
    "municipalities": [
        "Barcelona",
        "Girona",
        "Lleida",
        "Tarragona"
    ],
    "includeLongWeekends": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydramill/catalonia-holidays").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": ["2026"],
    "municipalities": [
        "Barcelona",
        "Girona",
        "Lleida",
        "Tarragona",
    ],
    "includeLongWeekends": True,
}

# Run the Actor and wait for it to finish
run = client.actor("hydramill/catalonia-holidays").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": [
    "2026"
  ],
  "municipalities": [
    "Barcelona",
    "Girona",
    "Lleida",
    "Tarragona"
  ],
  "includeLongWeekends": true
}' |
apify call hydramill/catalonia-holidays --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydramill/catalonia-holidays"
        }
    }
}
```

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/4ix7n3rrMMau2yC1I/builds/sDmsQFijdKt5J1hpd/openapi.json
