Best way to travel from Madrid to San Sebastian ?
If on public transport, I´d take the bus. Fast, cheap, efficient, safe, clean, WC, headphones for movies, wifi...
Don't be afraid of the bus system in Spain. The rail structure is not as well developed in Spain as the rest of Europe so an excellent bus system has evolved in Spain and it is super cheap. We probably use more buses than trains when in Spain.
Bus (or coach, sorry, I´m Basque and "bus" is the common word for this means of transport over here) takes approx 5 hours and a half, on a good highway, compared to 4h and a half drive on a car, so I´d say it seems a very good option. The Basque part is mountainous, but roads are in excellent condition. I back the idea of spending a night somewhere on the way (Burgos?).
I agree that you should not underestimate the bus/coach system in Spain. But for this trip my choice would be the train. More comfortable than the coach and a bit faster. Will also be a bit faster when the Venta de Baños-Burgos high speed line is opened (planned this year).
Trains are excellent in Spain, no doubt, but most trains on this route take you first to Zaragoza and you have to switch trains there, and it may take from 6 to 7 hours total time. The best option is the direct route on the ALVIA train, but if I´m not wrong there´s only one per day. An excellent choice, if schedule fits.
It also depends where you are starting from. If you are coming from the airport, then there are direct buses from there too, making it a very good choice!
And yes, besides the morning Alvia train, other connections take at least as long as the bus, and cost more.
If you want to stop and see places between the two cities, then rent a car. If going directly from point A to B, follow the others’ advice.
Thank you very much for the excellent recommendations that I received. Also, regarding my Feedback original question, did anybody consider taking a local connecting flight from Madrid to San Sebastian? Could this be feasible?
Donostia-San Sebastian airport is 20 miles from the city, in Hondarribia, and linked by bus to SS (a small city, 180,000h). It offers just a few flights per day and they are quite expensive, so if you want to get there by plane I´d suggest a flight to Bilbao (many per day) and then bus (1,5h) to SS.