Skip to content

Last updated

Changelog

Barcelona Cultural Agenda API

HealthyRead-only

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

Base URL
https://api.maviapi.com/v1/sites/barcelona-agenda
1
Endpoints
1 h ago
Last verified
100%
Uptime / 7d
1860ms
p50 latency
GET/events5 credits per call

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

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

window length in days counted from `from` (default today, Barcelona time); ignored when `to` is given.

stringOptionalin query

window start, YYYY-MM-DD; default today in Barcelona.

stringOptionalin query

window end, YYYY-MM-DD, inclusive; overrides `days`.

integerOptionalin query

page of 50 events, starting at 1.

fromstringe.g."2026-11-27"
tostringe.g."2026-12-27"
pageintegere.g.1
page_sizeintegere.g.50
totalintegere.g.3152
has_morebooleane.g.true
enrichedintegere.g.50
eventsobject[]22 fields
idstringe.g."99400747710"
urlstringe.g."https://guia.barcelona.cat/ca/detall/taller-familiar-construccio-de-menjadores-per-a-ocells_99400747710.html"
titlestringe.g."Taller familiar: \" Construcció de menjadores per a ocells\""
startstringe.g."2007-03-03T17:30:00"
endstringe.g."2027-03-03T18:30:00"
start_timestringe.g."17:30"
end_timestringe.g."18:30"
dates_notenull
timetablestringe.g."3 març: de 17.30 h a 18.30 h"
scheduleobject[]4 fields
daysstringe.g."3 març"
hoursstringe.g."de 17.30 h a 18.30 h"
pricestringe.g."Gratuit"
notesstringe.g."Cal inscripció prèvia Places limitades"
venueobject8 fields
namestringe.g."Centre Cívic La Sagrera La Barraca"
addressstringe.g."Carrer de Martí Molins, 29"
neighborhoodstringe.g."la Sagrera"
districtstringe.g."Sant Andreu"
zipstringe.g."08027"
townstringe.g."Barcelona"
latnumbere.g.41.42397425702554
lngnumbere.g.2.1891508567064406
priceobject4 fields
minintegere.g.0
maxintegere.g.0
currencystringe.g."EUR"
textstringe.g."Gratuit"
price_minintegere.g.0
price_maxintegere.g.0
freebooleane.g.true
ticket_urlnull
registration_urlstringe.g."http://ajuntament.barcelona.cat/ccivics/lasagrera"
imagenull
statusstringe.g."scheduled"
status_textnull
long_runningbooleane.g.true
updated_atstringe.g."2026-11-19T12:37:10"
paginationobject3 fields
countintegere.g.50
has_morebooleane.g.true
next_cursorstringe.g."WzEsIjBlNzgzMjc4IixudWxsLDAseyJwYWdlIjoyfV0"
fetched_atstringe.g."2026-11-27T10:09:52.318Z"
ageintegere.g.0
Try itLive
GET
https://api.maviapi.com/v1/sites/barcelona-agenda/events?days=30&page=1
Request
curl "https://api.maviapi.com/v1/sites/barcelona-agenda/events?days=30&page=1" \
-H "Authorization: Bearer $MAVI_KEY"
Example1.7 KB
{
  "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.

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

Or 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 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/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 /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 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
    NameType / locationRequiredDescription
    daysinteger / queryNowindow length in days counted from `from` (default today, Barcelona time); ignored when `to` is given.
    fromstring / queryNowindow start, YYYY-MM-DD; default today in Barcelona.
    tostring / queryNowindow end, YYYY-MM-DD, inclusive; overrides `days`.
    pageinteger / queryNopage of 50 events, starting at 1.
    Response fields
    FieldTypeDescription
    fromstring
    tostring
    pageinteger
    page_sizeinteger
    totalinteger
    has_moreboolean
    enrichedinteger
    eventsobject[]
    events[].idstring
    events[].urlstring
    events[].titlestring
    events[].startstring
    events[].endstring
    events[].start_timestring
    events[].end_timestring
    events[].dates_notenull
    events[].timetablestring
    events[].scheduleobject[]
    events[].schedule[].daysstring
    events[].schedule[].hoursstring
    events[].schedule[].pricestring
    events[].schedule[].notesstring
    events[].venueobject
    events[].venue.namestring
    events[].venue.addressstring
    events[].venue.neighborhoodstring
    events[].venue.districtstring
    events[].venue.zipstring
    events[].venue.townstring
    events[].venue.latnumber
    events[].venue.lngnumber
    events[].priceobject
    events[].price.mininteger
    events[].price.maxinteger
    events[].price.currencystring
    events[].price.textstring
    events[].price_mininteger
    events[].price_maxinteger
    events[].freeboolean
    events[].ticket_urlnull
    events[].registration_urlstring
    events[].imagenull
    events[].statusstring
    events[].status_textnull
    events[].long_runningboolean
    events[].updated_atstring
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger

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.

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

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