Last updated
ChangelogBarcelona Cultural Agenda API
HealthyRead-onlyCultural events in Barcelona from the city's open agenda: concerts, exhibitions, shows and workshops in a date window, with venue, timetable, price, ticket link and public page. Generated from opendata-ajuntament.barcelona.cat.
/events5 credits per callEvents
Cultural events in Barcelona whose date range overlaps a window (events already running when the window starts are included; events with no end date are left out), 50 per page, ordered by start date then id, with the total for the window and whether another page exists. Each event carries its timetable (as text and as table rows), venue address and coordinates, prices parsed from the timetable, and, read from the event's public page on guia.barcelona.cat, the venue name, image, ticket and sign-up links and status ("scheduled", "cancelled", "postponed", "suspended", "sold_out", "full", "rescheduled" or "changed"; null with the other page fields when the page could not be read; `enriched` counts the rows that have it). Times are local Barcelona time. `long_running` is true for events running more than 31 days.
Authorization: Bearer <key> on every request.Parameters
window length in days counted from `from` (default today, Barcelona time); ignored when `to` is given.
window start, YYYY-MM-DD; default today in Barcelona.
window end, YYYY-MM-DD, inclusive; overrides `days`.
page of 50 events, starting at 1.
Response fields
frome.g."2026-11-27"toe.g."2026-12-27"pagee.g.1page_sizee.g.50totale.g.3152has_moree.g.trueenrichede.g.50events
ide.g."99400747710"urle.g."https://guia.barcelona.cat/ca/detall/taller-familiar-construccio-de-menjadores-per-a-ocells_99400747710.html"titlee.g."Taller familiar: \" Construcció de menjadores per a ocells\""starte.g."2007-03-03T17:30:00"ende.g."2027-03-03T18:30:00"start_timee.g."17:30"end_timee.g."18:30"dates_notetimetablee.g."3 març: de 17.30 h a 18.30 h"schedule
dayse.g."3 març"hourse.g."de 17.30 h a 18.30 h"pricee.g."Gratuit"notese.g."Cal inscripció prèvia Places limitades"venue
namee.g."Centre Cívic La Sagrera La Barraca"addresse.g."Carrer de Martí Molins, 29"neighborhoode.g."la Sagrera"districte.g."Sant Andreu"zipe.g."08027"towne.g."Barcelona"late.g.41.42397425702554lnge.g.2.1891508567064406price
mine.g.0maxe.g.0currencye.g."EUR"texte.g."Gratuit"price_mine.g.0price_maxe.g.0freee.g.trueticket_urlregistration_urle.g."http://ajuntament.barcelona.cat/ccivics/lasagrera"imagestatuse.g."scheduled"status_textlong_runninge.g.trueupdated_ate.g."2026-11-19T12:37:10"pagination
counte.g.50has_moree.g.truenext_cursore.g."WzEsIjBlNzgzMjc4IixudWxsLDAseyJwYWdlIjoyfV0"fetched_ate.g."2026-11-27T10:09:52.318Z"agee.g.0curl "https://api.maviapi.com/v1/sites/barcelona-agenda/events?days=30&page=1" \-H "Authorization: Bearer $MAVI_KEY"
{
"from": "2026-11-27",
"to": "2026-12-27",
"page": 1,
"page_size": 50,
"total": 3152,
"has_more": true,
"enriched": 50,
"events": [
{
"id": "99400747710",
"url": "https://guia.barcelona.cat/ca/detall/taller-familiar-construccio-de-menjadores-per-a-ocells_99400747710.html",
"title": "Taller familiar: \" Construcció de menjadores per a ocells\"",
"start": "2007-03-03T17:30:00",
"end": "2027-03-03T18:30:00",
"start_time": "17:30",
"end_time": "18:30",
"dates_note": null,
"timetable": "3 març: de 17.30 h a 18.30 h",
"schedule": [
{
"days": "3 març",
"hours": "de 17.30 h a 18.30 h",
"price": "Gratuit",
"notes": "Cal inscripció prèvia Places limitades"
}
],
"venue": {
"name": "Centre Cívic La Sagrera La Barraca",
"address": "Carrer de Martí Molins, 29",
"neighborhood": "la Sagrera",
"district": "Sant Andreu",
"zip": "08027",
"town": "Barcelona",
"lat": 41.42397425702554,
"lng": 2.1891508567064406
},
"price": {
"min": 0,
"max": 0,
"currency": "EUR",
"text": "Gratuit"
},
"price_min": 0,
"price_max": 0,
"free": true,
"ticket_url": null,
"registration_url": "http://ajuntament.barcelona.cat/ccivics/lasagrera",
"image": null,
"status": "scheduled",
"status_text": null,
"long_running": true,
"updated_at": "2026-11-19T12:37:10"
}
],
"pagination": {
"count": 50,
"has_more": true,
"next_cursor": "WzEsIjBlNzgzMjc4IixudWxsLDAseyJwYWdlIjoyfV0"
},
"fetched_at": "2026-11-27T10:09:52.318Z",
"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 Barcelona 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 Barcelona Cultural Agenda API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=barcelona-agenda -- npx -y '@maviapi/mcp'Import Barcelona 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/barcelona-agenda/openapi.json - Postman
https://api.maviapi.com/v1/apis/barcelona-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 Barcelona Cultural Agenda API
Choose a starting endpoint
- Events
GET /eventsCultural events in Barcelona whose date range overlaps a window (events already running when the window starts are included; events with no end date are left out), 50 per page, ordered by start date then id, with the total for the window and whether another page exists. Each event carries its timetable (as text and as table rows), venue address and coordinates, prices parsed from the timetable, and, read from the event's public page on guia.barcelona.cat, the venue name, image, ticket and sign-up links and status ("scheduled", "cancelled", "postponed", "suspended", "sold_out", "full", "rescheduled" or "changed"; null with the other page fields when the page could not be read; `enriched` counts the rows that have it). Times are local Barcelona time. `long_running` is true for events running more than 31 days.
Parameters and response fields for GET /events
Request parameters Name Type / location Required Description days integer / query No window length in days counted from `from` (default today, Barcelona time); ignored when `to` is given. from string / query No window start, YYYY-MM-DD; default today in Barcelona. to string / query No window end, YYYY-MM-DD, inclusive; overrides `days`. page integer / query No page of 50 events, starting at 1. Response fields Field Type Description from string to string page integer page_size integer total integer has_more boolean enriched integer events object[] events[].id string events[].url string events[].title string events[].start string events[].end string events[].start_time string events[].end_time string events[].dates_note null events[].timetable string events[].schedule object[] events[].schedule[].days string events[].schedule[].hours string events[].schedule[].price string events[].schedule[].notes string events[].venue object events[].venue.name string events[].venue.address string events[].venue.neighborhood string events[].venue.district string events[].venue.zip string events[].venue.town string events[].venue.lat number events[].venue.lng number events[].price object events[].price.min integer events[].price.max integer events[].price.currency string events[].price.text string events[].price_min integer events[].price_max integer events[].free boolean events[].ticket_url null events[].registration_url string events[].image null events[].status string events[].status_text null events[].long_running boolean events[].updated_at string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer
Export Barcelona 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, start, end, start_time, end_time, dates_note, timetable, schedule, venue, price, price_min, price_max, free, ticket_url, registration_url, image, status, status_text, long_running, updated_at |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
Barcelona Cultural Agenda API questions
What you get, what it costs and how to call it.
Is there an official Barcelona Cultural Agenda API?
This Barcelona Cultural Agenda API is not official. It is an independent, hosted API from maviapi for the public data on opendata-ajuntament.barcelona.cat, and it is not made, endorsed or supported by Barcelona Cultural Agenda. Whether Barcelona Cultural Agenda offers a developer API of its own is a question for Barcelona 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 Barcelona Cultural Agenda API?
The Barcelona Cultural Agenda API has one endpoint. It returns JSON with the parameters and fields documented above:
- GET
/events: Cultural events in Barcelona whose date range overlaps a window (events already running when the window starts are included; events with no end date are left…
How much does the Barcelona 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 Barcelona 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/barcelona-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 Barcelona Cultural Agenda data as JSON?
Each way to get Barcelona 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 opendata-ajuntament.barcelona.cat 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 Barcelona 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 opendata-ajuntament.barcelona.cat changes its layout?
Your code does not change. maviapi keeps the Barcelona Cultural Agenda API working when opendata-ajuntament.barcelona.cat 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 Barcelona 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…