Last updated
ChangelogMadrid Cultural Agenda API
HealthyRead-onlyMadrid city council's cultural agenda: theatre, music, exhibitions, workshops, kids' activities and more in municipal venues, filtered by a date window, with venue, schedule, price and free flag. Generated from datos.madrid.es.
/events5 credits per callEvents
Cultural events of Madrid's city agenda whose date range overlaps a window, including events already running when the window starts, ordered by start date then id. Each event has its venue (address, district, neighbourhood, coordinates), start/end, weekly schedule and excluded days, price and free flag, category, audience and organizer. Returns one page plus the total for the query, page count and whether another page exists. The city publishes its agenda about 100 days ahead, so windows further out return only what it already lists.
Authorization: Bearer <key> on every request.Parameters
window from today (Madrid time) through today + days; 0 = today only. Ignored when from or to is given.
page number, from 1.
events per page, 1 to 200 (default 50).
activity type, a top-level type (includes its subtypes) or a subtype such as Musica/Flamenco. Case and accents do not matter. An unknown type is an error listing the known ones.
window start date YYYY-MM-DD; overrides days. Alone, the window is that single day.
window end date YYYY-MM-DD, inclusive. Without from, the window starts today.
Response fields
totale.g.574pagee.g.1page_sizee.g.50pagese.g.12has_moree.g.truefrome.g."2026-11-27"toe.g."2026-12-04"categoryevents
ide.g."50450293"urle.g."https://www.madrid.es/sites/v/index.jsp?vgnextchannel=ca9671ee4a9eb410VgnVCM100000171f5a0aRCRD&vgnextoid=469aeab2c5e31a10VgnVCM200000f921e388RCRD"titlee.g."RESIDENCIAS PARA ARTISTAS VISUALES"descriptionstarte.g."2020-01-01"ende.g."2030-12-31"start_datee.g."2020-01-01"end_datee.g."2030-12-31"timerecurrencevenue
namee.g."Matadero Madrid"addresse.g."PLAZA LEGAZPI 8, 28045 MADRID"postal_codee.g."28045"districte.g."Arganzuela"neighborhoode.g."Chopera"late.g.40.39130985242181lnge.g.-3.6958028442054074price
minmaxcurrencytextfreee.g.falsecategoryaudiencelong_runninge.g.trueorganizere.g."Matadero Madrid"pagination
counte.g.50has_moree.g.truenext_cursore.g."WzEsIjBlNzgzMjc4IixudWxsLDAseyJwYWdlIjoyfV0"fetched_ate.g."2026-11-27T09:58:18.795Z"agee.g.0curl "https://api.maviapi.com/v1/sites/madrid-cultural-agenda/events?days=7&page=1&page_size=50" \-H "Authorization: Bearer $MAVI_KEY"
{
"total": 574,
"page": 1,
"page_size": 50,
"pages": 12,
"has_more": true,
"from": "2026-11-27",
"to": "2026-12-04",
"category": null,
"events": [
{
"id": "50450293",
"url": "https://www.madrid.es/sites/v/index.jsp?vgnextchannel=ca9671ee4a9eb410VgnVCM100000171f5a0aRCRD&vgnextoid=469aeab2c5e31a10VgnVCM200000f921e388RCRD",
"title": "RESIDENCIAS PARA ARTISTAS VISUALES",
"description": null,
"start": "2020-01-01",
"end": "2030-12-31",
"start_date": "2020-01-01",
"end_date": "2030-12-31",
"time": null,
"recurrence": null,
"venue": {
"name": "Matadero Madrid",
"address": "PLAZA LEGAZPI 8, 28045 MADRID",
"postal_code": "28045",
"district": "Arganzuela",
"neighborhood": "Chopera",
"lat": 40.39130985242181,
"lng": -3.6958028442054074
},
"price": {
"min": null,
"max": null,
"currency": null,
"text": null
},
"free": false,
"category": null,
"audience": null,
"long_running": true,
"organizer": "Matadero Madrid"
}
],
"pagination": {
"count": 50,
"has_more": true,
"next_cursor": "WzEsIjBlNzgzMjc4IixudWxsLDAseyJwYWdlIjoyfV0"
},
"fetched_at": "2026-11-27T09:58:18.795Z",
"age": 0
}Get all the data, no code
Collect every page of GET /events into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use Madrid Cultural Agenda API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of Madrid Cultural Agenda API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=madrid-cultural-agenda -- npx -y '@maviapi/mcp'Import Madrid Cultural Agenda API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/madrid-cultural-agenda/openapi.json - Postman
https://api.maviapi.com/v1/apis/madrid-cultural-agenda/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
Build with the Madrid Cultural Agenda API
Choose a starting endpoint
- Events
GET /eventsCultural events of Madrid's city agenda whose date range overlaps a window, including events already running when the window starts, ordered by start date then id. Each event has its venue (address, district, neighbourhood, coordinates), start/end, weekly schedule and excluded days, price and free flag, category, audience and organizer. Returns one page plus the total for the query, page count and whether another page exists. The city publishes its agenda about 100 days ahead, so windows further out return only what it already lists.
Parameters and response fields for GET /events
Request parameters Name Type / location Required Description days integer / query No window from today (Madrid time) through today + days; 0 = today only. Ignored when from or to is given. page integer / query No page number, from 1. page_size integer / query No events per page, 1 to 200 (default 50). category string / query No activity type, a top-level type (includes its subtypes) or a subtype such as Musica/Flamenco. Case and accents do not matter. An unknown type is an error listing the known ones. from string / query No window start date YYYY-MM-DD; overrides days. Alone, the window is that single day. to string / query No window end date YYYY-MM-DD, inclusive. Without from, the window starts today. Response fields Field Type Description total integer page integer page_size integer pages integer has_more boolean from string to string category null events object[] events[].id string events[].url string events[].title string events[].description null events[].start string events[].end string events[].start_date string events[].end_date string events[].time null events[].recurrence null events[].venue object events[].venue.name string events[].venue.address string events[].venue.postal_code string events[].venue.district string events[].venue.neighborhood string events[].venue.lat number events[].venue.lng number events[].price object events[].price.min null events[].price.max null events[].price.currency null events[].price.text null events[].free boolean events[].category null events[].audience null events[].long_running boolean events[].organizer string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer
Export Madrid Cultural Agenda data to CSV
Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.
| List | CSV columns |
|---|---|
EventsGET /events | id, url, title, description, start, end, start_date, end_date, time, recurrence, venue, price, free, category, audience, long_running, organizer |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
Madrid Cultural Agenda API questions
What you get, what it costs and how to call it.
Is there an official Madrid Cultural Agenda API?
This Madrid Cultural Agenda API is not official. It is an independent, hosted API from maviapi for the public data on datos.madrid.es, and it is not made, endorsed or supported by Madrid Cultural Agenda. Whether Madrid Cultural Agenda offers a developer API of its own is a question for Madrid Cultural Agenda. This one is ready to call with a maviapi key, and every endpoint and field it returns is documented on this page.
What data can I get from the Madrid Cultural Agenda API?
The Madrid Cultural Agenda API has one endpoint. It returns JSON with the parameters and fields documented above:
- GET
/events: Cultural events of Madrid's city agenda whose date range overlaps a window, including events already running when the window starts, ordered by start date…
How much does the Madrid Cultural Agenda API cost?
Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 5 credits per call. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. Failed calls are free. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the Madrid Cultural Agenda API?
Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /events:
curl 'https://api.maviapi.com/v1/sites/madrid-cultural-agenda/events' \
-H "Authorization: Bearer $MAVI_KEY"Create a key on your API keys page, or try any endpoint first in the console above with the free test key.
What are the ways to get Madrid Cultural Agenda data as JSON?
Each way to get Madrid Cultural Agenda data as JSON fits a different need:
- Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on datos.madrid.es are yours. Better for a one-off pull from a page that rarely changes.
- Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
- RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
- maviapi: The Madrid Cultural Agenda API on this page: one documented endpoint, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.
What happens when datos.madrid.es changes its layout?
Your code does not change. maviapi keeps the Madrid Cultural Agenda API working when datos.madrid.es changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.
Will an update break my Madrid Cultural Agenda API integration?
No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.
Related APIs
- Tripadvisor API
Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…
- Google Maps API
Structured data from maps.google.com.
- Kiwi.com API
Search and compare flights on Kiwi.com, itineraries with live prices, airlines, routes and departure/arrival times…