Skip to content

Last updated

Changelog

Madrid Cultural Agenda API

HealthyRead-only

Madrid 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.

Base URL
https://api.maviapi.com/v1/sites/madrid-cultural-agenda
1
Endpoints
52 min ago
Last verified
100%
Uptime / 7d
258ms
p50 latency
GET/events5 credits per call

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

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
integerOptionalin query

window from today (Madrid time) through today + days; 0 = today only. Ignored when from or to is given.

integerOptionalin query

page number, from 1.

integerOptionalin query

events per page, 1 to 200 (default 50).

stringOptionalin query

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.

stringOptionalin query

window start date YYYY-MM-DD; overrides days. Alone, the window is that single day.

stringOptionalin query

window end date YYYY-MM-DD, inclusive. Without from, the window starts today.

totalintegere.g.574
pageintegere.g.1
page_sizeintegere.g.50
pagesintegere.g.12
has_morebooleane.g.true
fromstringe.g."2026-11-27"
tostringe.g."2026-12-04"
categorynull
eventsobject[]17 fields
idstringe.g."50450293"
urlstringe.g."https://www.madrid.es/sites/v/index.jsp?vgnextchannel=ca9671ee4a9eb410VgnVCM100000171f5a0aRCRD&vgnextoid=469aeab2c5e31a10VgnVCM200000f921e388RCRD"
titlestringe.g."RESIDENCIAS PARA ARTISTAS VISUALES"
descriptionnull
startstringe.g."2020-01-01"
endstringe.g."2030-12-31"
start_datestringe.g."2020-01-01"
end_datestringe.g."2030-12-31"
timenull
recurrencenull
venueobject7 fields
namestringe.g."Matadero Madrid"
addressstringe.g."PLAZA LEGAZPI 8, 28045 MADRID"
postal_codestringe.g."28045"
districtstringe.g."Arganzuela"
neighborhoodstringe.g."Chopera"
latnumbere.g.40.39130985242181
lngnumbere.g.-3.6958028442054074
priceobject4 fields
minnull
maxnull
currencynull
textnull
freebooleane.g.false
categorynull
audiencenull
long_runningbooleane.g.true
organizerstringe.g."Matadero Madrid"
paginationobject3 fields
countintegere.g.50
has_morebooleane.g.true
next_cursorstringe.g."WzEsIjBlNzgzMjc4IixudWxsLDAseyJwYWdlIjoyfV0"
fetched_atstringe.g."2026-11-27T09:58:18.795Z"
ageintegere.g.0
Try itLive
GET
https://api.maviapi.com/v1/sites/madrid-cultural-agenda/events?days=7&page=1&page_size=50
Request
curl "https://api.maviapi.com/v1/sites/madrid-cultural-agenda/events?days=7&page=1&page_size=50" \
-H "Authorization: Bearer $MAVI_KEY"
Example1.3 KB
{
  "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.

How to connect
https://mcp.maviapi.com/mcp

Or 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 import

Paste 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 /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 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
    NameType / locationRequiredDescription
    daysinteger / queryNowindow from today (Madrid time) through today + days; 0 = today only. Ignored when from or to is given.
    pageinteger / queryNopage number, from 1.
    page_sizeinteger / queryNoevents per page, 1 to 200 (default 50).
    categorystring / queryNoactivity 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.
    fromstring / queryNowindow start date YYYY-MM-DD; overrides days. Alone, the window is that single day.
    tostring / queryNowindow end date YYYY-MM-DD, inclusive. Without from, the window starts today.
    Response fields
    FieldTypeDescription
    totalinteger
    pageinteger
    page_sizeinteger
    pagesinteger
    has_moreboolean
    fromstring
    tostring
    categorynull
    eventsobject[]
    events[].idstring
    events[].urlstring
    events[].titlestring
    events[].descriptionnull
    events[].startstring
    events[].endstring
    events[].start_datestring
    events[].end_datestring
    events[].timenull
    events[].recurrencenull
    events[].venueobject
    events[].venue.namestring
    events[].venue.addressstring
    events[].venue.postal_codestring
    events[].venue.districtstring
    events[].venue.neighborhoodstring
    events[].venue.latnumber
    events[].venue.lngnumber
    events[].priceobject
    events[].price.minnull
    events[].price.maxnull
    events[].price.currencynull
    events[].price.textnull
    events[].freeboolean
    events[].categorynull
    events[].audiencenull
    events[].long_runningboolean
    events[].organizerstring
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger

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.

ListCSV columns
EventsGET /eventsid, 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
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.

  • 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…