Do you know “bicing”?
It’s a new public transportation inBarcelona city. Some friends from other countries asked me if they can use them. I’m afraid the answer is “NO”. That’s a shame but they are only for residents.
To use this bike, you have to register by internet( bicing website) and pay 24 euros/year with the credit/debit card. You can use 5am to 0am from Sunday to Thursday, and Friday and Saturday you can use them for 24 hours. Once you take the bike, you can use it during 2 hours. If you use more than 2 hours, you have to pay extra charge.
and there are some hotels or hostals they offer bike rental like, Barcelona Apartments