Is OSINT legal in Spain? A GDPR and LOPDGDD (Spain's data protection act) guide for investigators
Updated November 11, 2026. Author: Manuel, security engineer.
OSINT, open-source intelligence research, is not prohibited in Spain. No law prevents anyone from consulting information that is publicly accessible. What is regulated is the processing of personal data obtained from those sources. As soon as a piece of data allows a person to be identified, the General Data Protection Regulation (GDPR) and Organic Law 3/2018 (the LOPDGDD) apply, even if the data was visible to anyone. Lawfulness is not decided by whether the data is public. It is decided by the legal basis, the purpose and the amount of data you collect.
This guide is written for OSINT analysts, investigative journalists and teams that need to know where the line is before they start. It is published by the team behind NODO. It is not legal advice. For a specific case, consult a qualified professional and the decisions of the supervisory authority.
Is OSINT prohibited in Spain?
No. Collecting information from open sources, such as a public profile, a company register, a news article or a social media post, is lawful in itself. The legal problem does not arise from looking; it arises from processing. Processing means collecting, storing, cross-referencing, analyzing or disseminating data about an identified or identifiable natural person.
When an investigation processes personal data, it falls within the European data protection framework and Organic Law 3/2018, on Personal Data Protection and Guarantee of Digital Rights. That the source is open does not exempt you from complying with that framework.
What changes when the data is personal data?
Personal data is any information about an identified or identifiable natural person: a name next to a city, an alias linked to an account, a license plate, a photograph. As soon as you collect such data and associate it with a person, you are processing personal data and take on obligations.
There is a stricter category. Special category data, such as health, ideology, trade union membership, sexual orientation, or biometric data used for identification, is subject to a reinforced regime: its processing is prohibited unless one of the exceptions set out in the regulation applies. Collecting one of these data types from an open source does not lift that prohibition.
What legal basis covers an OSINT investigation?
All processing requires a legal basis. For a private investigation, the usual basis is legitimate interest, set out in Article 6(1)(f) of the GDPR. It is not a catch-all. Before you rely on it, the European Data Protection Board requires a three-part assessment, as set out in its Guidelines 1/2024 on Article 6(1)(f):
- The interest you pursue is real, specific and lawful. A generic statement is not enough.
- The processing is necessary for that interest. If you can achieve the same aim by collecting less, processing more is not necessary.
- The interest does not fall below the rights and reasonable expectations of the person being investigated.
Organic Law 3/2018 adds, in its Article 19, a presumption that legitimate interest prevails in specified cases and subject to safeguards. That presumption can be rebutted and does not cover every form of processing. The supervisory authority is clear on one point: treating the investigator's interest as prevailing merely because the data is public is an error. The public origin of the data does not replace the balancing test, as stated in the opinion on the concept of legitimate interest published by the AEPD (Spanish Data Protection Agency).
Decision tree: from public data to lawful processing
This is the path to follow before adding a piece of data to a case file. Each step states the applicable legal basis or limit.
- Does the data identify, or could it identify, a natural person? If not, it is not personal data and the data protection framework does not apply. If so, continue.
- Is it special category data (health, ideology, trade union membership, sexual orientation, biometrics)? If it is, processing is prohibited unless an express exception under Article 9 of the GDPR applies. Without an exception, discard it. If not, continue.
- Do you have a specific and lawful purpose? Without a defined purpose there is no possible legal basis. With one, continue.
- Which legal basis do you apply? If the person has given valid consent, that is the basis. If not, for a private investigation the route is the legitimate interest of Article 6(1)(f), after the three-part assessment. If you act under a legal or contractual mandate, the basis is the one corresponding to that title.
- Do you collect only what is necessary? Apply data minimization. Discard anything that does not serve the purpose. Record why you retain each data item.
- Will you disseminate the result? Disseminating personal data is a new processing operation that requires its own legal basis and its own analysis. Disseminating in order to expose or harm someone is not covered by legitimate interest.
Where is the line between OSINT and doxxing?
The boundary lies not in the origin of the data but in its purpose and its dissemination. Lawful OSINT collects data from open sources for a legitimate purpose, on a legal basis, minimizing what it retains and without exposing the person. Doxxing collects and disseminates personal data in order to identify, single out or harm someone.
That dissemination may infringe data protection law and, depending on the case, fall under criminal offenses such as harassment, threats, or the discovery and disclosure of secrets under Article 197 of the Criminal Code. The same public data can appear in a lawful investigation and in an unlawful act. What changes is what you use it for and whether you expose it.
At NODO we start from a principle that we explain on our ethics page: nothing is investigated without a defined scope, and anything outside that scope is blocked by default.
What does the principle of minimization require?
Minimization, set out in Article 5(1)(c) of the GDPR, requires collecting only data that is adequate, relevant and limited to what is necessary for the purpose. In an OSINT investigation this translates into practical rules: define the purpose before you search, do not accumulate data just in case, discard irrelevant material as soon as you detect it, and record why you keep each item. An investigation that keeps everything it finds is harder to defend before the authority than one that can explain every data item.
Compliance in Spain is supervised by the AEPD. Processing without a valid legal basis, without a balancing assessment, or with excessive data exposes the investigator to administrative penalties, and unlawful dissemination may add civil or criminal liability. Documenting the investigation, its scope and its legal basis is the best defense.
Frequently asked questions
Can I collect public social media data without consent?
You can, if you have another valid legal basis, normally legitimate interest after passing the three-part assessment, and you respect purpose limitation and minimization. That a profile is public is not, on its own, enough to make the processing lawful.
Is legitimate interest a valid legal basis?
Yes. It is the usual basis for a private investigation, but it is not automatic. You must demonstrate a real and specific interest, that the processing is necessary, and that the rights of the person being investigated do not prevail.
Which authority supervises this in Spain?
The AEPD. It supervises compliance with the GDPR and Organic Law 3/2018 and imposes administrative penalties.
What legal risk do I face if I publish what I find?
Disclosure is a new processing operation with its own legal basis. Disclosing personal data in order to expose or harm someone may infringe data protection law and, depending on the case, constitute a criminal offense. Before publishing, review the purpose and the basis that supports it.
If you investigate with open sources and need each finding documented with signed evidence and a clear scope, create a Free account on TRACEZ.