Foreign workers who legally reside in Spain have the right to the benefit under the same conditions as workers who are Spanish nationals.
Find out the requirements in the answer to the question ‘As a self-employed worker, which situations would give me a right to unemployment benefits?’.