Health and health insurance
How do I get a PCR test or an antigen test?
If you are a European citizen or have a NIE / TIE (identification number for foreign residents), you will be taken care of by the social security services and they will give you one of the tests in case you have symptoms of COVID-19.
Under no circumstances does Social Security provide this service for travel both inside and outside Spain. PCR tests or antigen tests for these cases are not funded by the public health system.
In Barcelona there are several places that provide PCR tests that are valid for travel 24 hours a day, every day of the year. Check here where you can find one.

