A taxi from the city center to the airport costs around 35 euro. I would suggest avoiding the local taxi companies and getting a Cabify cab instead. You’ll get better service for the same price or less.
If you want to travel to the airport in your own car, this is another convenient option, since there are numerous parking options.
Aena General Parking
The most expensive option but probably the safest and most convenient is to leave the car in the airport’s own official parking. For a 4 and a half day stay (4 days and 6 hours to be exact) I was charged €53 to park in the General T1. This is by booking in advance through the web interface. According to the same site, parking without booking would cost €114.50 as it just goes by the hourly rate. If I understand correctly unused hours will be refunded when you exit the parking. The parking is located in a building annexed to the airport terminal T1, and you can just walk to the terminal in 4 minutes – no hassle whatsoever.
PROCEDURE FOR USE OF THE CAR PARK:
On entering the car park:
Take a ticket as you enter the car park. IMPORTANT: Please, wait in front of the barrier until the Automatic Number Plate Recognition recognises your vehicle and a ticket will be issued automatically. YOU MUST NOT PRESS THE BUTTON. If you press the button, the ATM will charge you the normal price and not the reservation price. Proceed into the car park and park your car in any available parking space.
On your return:
When you return to the car park, please go to the ATMs to make the payment. If you have any problems, please use the Customer Service integrated in the ATMs. Amount calculated based on the stay booked. If the actual stay of the vehicle is different, this amount may vary.
You can purchase this parking on the official site or on elParking or Parkvia. elParking offers free cancellation up to 24h before the reservation starts.