The arrests came in seven Spanish regions with the detainees including high-level officials as well as politicians from Spain's ruling Popular Party, the United Left (IU) party, and the conservative Canarian coalition.
They were for arrested for their alleged involvement in a scheme which saw people taking cash and gifts in exchange for awarding parks and gardens maintenance contracts, according to Spain's El País newspaper.
Authorities now plan to charge the suspects with crimes including money laundering, tax fraud and forgery, Spain's interior ministry said in a statement.
The raids came at the end of a 15-month investigation and stemmed from earlier investigations into a former senior town planning official in the southern city of Seville.
He is suspected of receiving gifts including cash and vehicles from an environmental services company which had a "network of corrupt officials who helped the win contracts".
The raids on Tuesday also come just two weeks after another corruption crackdown saw another Spanish judge formally accuse 26 people of fraud and bribery.
Among those in custody in relation to that case is the former Madrid secretary general for Spain's ruling Popular Party, Francisco Granados.
Judge Velasco sent Granados to prison with no possibility of bail while he investigates the politician in connection with money laundering, organised crime and misuse of public funds, among other offenses.
The case saw Spanish Prime Minister Mariano Rajoy apologize in parliament.