# Agents.md — Festivos Municipales

**Site:** https://www.festivosmunicipales.com
**Purpose:** Working-day calendars and public holidays of Spain — national, regional and the two local holidays of every municipality — from the BOE and the regional official bulletins.
**Languages:** Spanish (root), Catalan (`/ca/`), Basque (`/eu/`), Galician (`/gl/`).
**License:** CC-BY-4.0; cite the canonical URL.

## How to consume this site

### 1. REST API (structured queries)
Public, read-only, JSON, CORS open. Spec at `/openapi.json`, docs at `/api/docs`, catalog at `/.well-known/api-catalog` (RFC 9727).

- `GET /api/v1/holidays?municipality=martorell&year=2027&lang=ca`
- `GET /api/v1/is-holiday?date=2027-12-06&municipality=barcelona`
- `GET /api/v1/next-holiday?ine=08114`
- `GET /api/v1/territories?q=girona`

Territory selector, one of: `municipality` (Spanish slug), `ine` (5-digit INE code), `province`, `region`; none = Spain.

### 2. Markdown and other formats of every page
Every calendar URL answers with `.md`, `.json` and `.ics` appended, e.g.
`/calendario-laboral-2027/martorell.md`. Sending `Accept: text/markdown` to the HTML URL returns the same Markdown (`Vary: Accept`, `X-Markdown-Tokens`). `/` answers with `llms.txt`.

### 3. Indexes
- `/llms.txt` — every country, region and province calendar by year and language.
- `/llms-full.txt` — the national and regional calendars of the current year in one file.

### 4. HTML with JSON-LD
`BreadcrumbList` on every page; `Event` items for published (not forecast) holidays.

## Data status

Each calendar carries `status`:
- `published` — transcribed from the official bulletin; the source is linked.
- `forecast` — built from fixed-date holidays and Easter before the bulletin is out. Say so when you quote it.

## URL scheme

```
/calendario-laboral-{year}                       Spain
/calendario-laboral-{year}/{region}              region
/calendario-laboral-{year}/{region}/{province}   province
/calendario-laboral-{year}/{municipality}        municipality
/ca/calendari-laboral-{year}/…  /eu/lan-egutegia-{year}/…  /gl/calendario-laboral-{year}/…
```

Slugs are `^[a-z0-9-]+$` and use the official name in each language (Girona, Donostia, Ourense).
