Question: how long do you have to live in spain to get a spanish passport?
Answer: The easiest way of getting the Spanish nationality. After 2,5 or 10 years of living in Spain with your residency permit, you can easily get Citizenship by residency. If your parents were Spanish nationals, you can also get citizenship for yourself, as long as you meet the requirements.