Spain
AI behavior law: bot and agent disclosure, crawler and training-data rules, automated-agent transactions, and algorithmic decision-making.
Summary
Spain presents medium risk for commercial web scraping. Código Penal art. 197 bis criminalises unauthorised access to or remaining in a computer information system by bypassing security measures, regardless of intent (unlike some EU peers, no specific "fraudulent intent" element beyond acting without authorisation). Art. 197 bis has not been authoritatively applied to public-page scraping in published case law, but ToS violations combined with bypassing technical barriers create clear exposure. Spain transposed DSM Directive 2019/790 via Real Decreto-ley 24/2021, amending the Texto Refundido de la Ley de Propiedad Intelectual (TRLPI) to add arts. 67-bis (research TDM) and 67-ter (commercial TDM with machine-readable opt-out). Commercial TDM is lawful where no machine-readable reservation has been made. The AEPD actively enforces GDPR against large-scale personal-data collection, including from public sources; enforcement has grown substantially since 2022 (367 fines totalling €29.8 million in 2023). Spain retains the full EU sui generis database right (TRLPI arts. 133-137). The Ley de Servicios de la Sociedad de la Información y de Comercio Electrónico (LSSI, Law 34/2002, last updated by RDL 9/2024) regulates electronic services generally but does not specifically address scraping. No scraping-specific statute; law_specificity reflects the general-law framework typical of EU member states.
Automated-access legality
Carried forward from the crawler-law index. Governs whether automated clients may access public websites in this jurisdiction.
| Dimension | Value |
|---|---|
| Authorization test | security mechanism bypass |
| Public-page carve-out | unsettled |
| Terms-of-service browsewrap enforceable | notice dependent |
| Terms-of-service clickwrap enforceable | yes |
| Copyright exception model | tdm dual track |
| Text and data mining — commercial status | with optout |
| Text and data mining — opt-out mechanism | robots txt |
| robots.txt legal weight | evidentiary |
| AI training-specific law | binding |
| Privacy regime | GDPR |
| Trespass to chattels | not recognized |
Last reviewed: 2026-05-23. Confidence: high. Fast-moving area — verify before relying. Not legal advice.