Catalonia charges between 0,45 Euro and 2,25 Euro in tourist tax per person, per night. The rate depends on the type of establishment you stay at (e.g. hotel, Airbnb or other apartment).
If you stay in Barcelona city you pay a higher tax rate than in the rest of Catalonia.
Here are the details you need, including who the tourist tax applies to.