Barcelona Cultura
Open Data

The Barcelona Cultural Data Observatory makes available to you the cultural data and indicators on the city of Barcelona. You can consult all this information in the various areas of the website and if you are an advanced user you can also access an API and process the data to suit your needs.

API documentation

You’ll find the available indicators in this XML document:

http://dades.eicub.net/doc

For example, to obtain the data on museum visitors, just go to the following URL:

http://dades.eicub.net/api/1/museusexposicions-visitants

which will return you a JSON with all the data on the visitors to the city’s museums.

Data filtering

You can filter the data of any of the fields of the result. If you click:

http://dades.eicub.net/api/1/museusexposicions-visitants?Equipament=La Virreina Centre de la Imatge

you’ll see the data on the visitors to the facility La Virreina Centre de la Imatge.

You can also combine filters. For instance, if you add the year to the preceding instruction:

http://dades.eicub.net/api/1/museusexposicions-visitants?Equipament=La Virreina Centre de la Imatge&Any=2013

you’ll get the data on La Virreina Centre de la Imatge for the year 2013.

Output formats

If you add the format parameter to the instruction, you can select the format in which you wish to download the data. You can choose between JSON, XML and CSV.

For example, if you click:

http://dades.eicub.net/api/1/biblioteques-prestecs?format=xml

you can download the data on library loans in XML format.

Or if you go to:

http://dades.eicub.net/api/1/festivals-assistents?Any=2015&format=csv

you can download the data on the city festivals for the year 2015 in a CSV file.