A text and data mining exception is a rule in copyright law that allows the reproduction of protected works for automated analysis, without the rightsholder’s permission, so that software can extract patterns, trends and correlations from large collections of text, images, sound or data. In tech regulation it has become the main legal basis for training AI models in the European Union and several other jurisdictions.
Text and data mining (TDM) requires copying because analysis software must load, normalize and store works before it can process them. Without an exception, every such copy could infringe the exclusive reproduction right. The exception removes that obstacle under defined conditions, most importantly lawful access to the material and, for commercial mining, respect for the rightsholder’s opt-out.
How the EU text and data mining exceptions work
The EU framework rests on Articles 3 and 4 of the DSM Copyright Directive (Directive (EU) 2019/790), transposed into the national laws of all member states. The directive defines text and data mining as any automated analytical technique that analyzes digital text and data to generate information such as patterns, trends and correlations. The two articles create two different exceptions with different beneficiaries.
| Feature | Article 3 exception | Article 4 exception |
|---|---|---|
| Beneficiaries | Research organizations and cultural heritage institutions | Anyone, including companies |
| Purpose | Scientific research only | Any purpose, including commercial AI |
| Rightsholder opt-out | Not possible | Possible by express reservation |
| Override by contract | Not allowed | Reservation acts as a limit |
| Retention of copies | With appropriate security, for research and verification | Only as long as necessary for mining |
Both exceptions require lawful access, which means the miner must be entitled to read the material in the first place, for example through a subscription, an open web page or a license. Circumventing paywalls or using pirated copies does not satisfy this condition, regardless of the purpose of the mining.
The opt-out and machine-readable reservation
Under Article 4, rightsholders may reserve their works from mining, and for content made publicly available online the reservation must be expressed in an appropriate manner, such as machine-readable means. This TDM opt-out turns the commercial exception into a default permission that each rightsholder can withdraw.
In practice, publishers use robots.txt directives aimed at AI crawlers, metadata standards such as the TDM Reservation Protocol, terms of service and HTTP headers. Legal uncertainty remains about whether a reservation written only in natural-language terms of service counts as machine-readable; courts and commentators have taken different positions, and the issue has not been settled at EU level.
| Method | Machine readability | Practical limitation |
|---|---|---|
| robots.txt rules | High for known crawlers | Applies per crawler name, not per use |
| TDM reservation metadata | High where supported | Not yet universally recognized by tools |
| Terms of service text | Disputed | Requires interpretation by software |
| Contract or license clause | Low | Binds only the contracting parties |
Link to the AI Act and training transparency
The EU AI Act connects directly to the exception. Providers of general-purpose AI models must put in place a copyright compliance policy that identifies and respects Article 4 reservations, and must publish a sufficiently detailed summary of the content used for training. These duties apply to models placed on the EU market regardless of where training took place.
This creates an important practical point: the exception covers the act of copying for analysis, but it does not automatically decide whether a model’s outputs infringe. If a model memorizes and reproduces substantial parts of a work, that output can still infringe the reproduction or communication right, which is a separate legal question from the legality of training.
How other jurisdictions treat text and data mining
Approaches to mining differ widely, which matters for AI developers that train in one country and offer models in another. Some jurisdictions have broad statutory exceptions, others limit them to non-commercial research, and the United States relies on the general fair use doctrine instead of a dedicated rule.
| Jurisdiction | Legal basis | Scope |
|---|---|---|
| European Union | DSM Copyright Directive, Articles 3 and 4 | Research without opt-out, all uses with opt-out |
| United Kingdom | Section 29A of the 1988 copyright act | Non-commercial research only |
| Japan | Article 30-4 of the copyright act | Broad, excluding uses that enjoy the expression |
| Singapore | Computational data analysis exception | Broad, cannot be overridden by contract |
| United States | Fair use, decided case by case | Uncertain, subject of ongoing litigation |
Because of these differences, training location does not settle liability. A model trained lawfully in one country may still face claims where it is distributed, and the AI Act explicitly extends the EU opt-out duty to providers outside the Union.
Common misconceptions and compliance risks
The exception is often described as a blanket permission for AI training, which it is not. Its conditions are cumulative, and failing any one of them means the copying falls back under the exclusive right.
| Misconception | Legal reality | Practical consequence |
|---|---|---|
| Anything public may be mined | Opt-outs must be respected for commercial mining | Crawlers must read reservations |
| Research status covers a spin-off | Article 3 excludes bodies under decisive commercial influence | Commercial partners need Article 4 |
| Pirated datasets are acceptable for research | Lawful access is required | Source provenance must be documented |
| Lawful training means lawful outputs | Outputs are assessed separately | Filters against regurgitation are needed |
A sound compliance approach combines crawler-level opt-out detection, dataset provenance records, retention limits and, where content value is high, AI training licensing agreements that go beyond what the exception allows.
In plain words
Copyright normally says you need permission to copy someone else’s work. Computers that study huge amounts of text or pictures have to make copies just to read them. The text and data mining exception is a legal permission slip for that kind of copying, as long as the goal is analysis rather than republishing the works.
In the European Union there are two versions. Scientists at universities and archives can mine almost freely. Everyone else, including AI companies, can mine too, but creators can say no by attaching a clear signal to their work. If that signal is there, a commercial company must leave the work out or ask for a license.
A real-world example
A European startup is building a language model for legal drafting and plans to crawl about two million public web pages from law firms, courts and legal publishers. Before training, its engineers run every domain through a reservation checker that reads robots.txt rules and TDM reservation metadata.
Roughly a fifth of the publisher domains carry a valid reservation, so those pages are excluded from the training set, while court decisions and government pages remain. For two commercial legal databases the startup negotiates paid licenses instead of relying on the exception. It documents lawful access, deletes raw copies after preprocessing and prepares the training content summary required for general-purpose models.
The outcome is a training dataset the company can defend in front of rightsholders and regulators, because each source is covered either by the Article 4 exception or by a license.