You need a visa for Cook Islands if you have a Spanish passport
Visa options for Cook Islands
Visa on arrival for a maximum of 31 days
Travellers need a visa to visit Cook Islands for Business or Tourism. Travellers can get a visa on arrival in Cook Islands at the port of entry, such as an international airport or border crossing.