Glossary

Is web scraping legal?

Web scraping is often legal for public, non-personal data, but terms of service, access controls, copyright and privacy law can make a specific case unlawful.

Web scraping is legal in many situations, particularly when you collect publicly available, non-personal information without bypassing any access controls. It can become unlawful depending on what you collect, how you get it and what you do with it afterwards. Breaching a site's terms, getting past a login or a technical block, copying copyrighted material, or processing personal data without a lawful basis can each create liability, and the rules differ between the US, the EU, the UK and elsewhere.

This page is general information for engineers and product teams, not legal advice. Case law in this area moves quickly and depends heavily on the facts, so any decision about a specific product or data source belongs with your own legal counsel. What follows is a map of the main questions they are likely to ask, with sources you can check.

The factors that decide most cases

Most disputes about web scraping turn on a small set of questions. The table summarises where risk tends to be lower and higher; real cases combine several rows.

Factor

Usually lower risk

Usually higher risk

Access

Public pages anyone can load without an account

Pages behind a login, a paywall or a technical block you got around

Content

Facts such as prices, opening hours or product specifications

Copyrighted text, images or video reproduced at length; personal data

Method

Polite request rates, honest identification, respecting robots.txt

Heavy load on the site, disguised traffic, solving CAPTCHAs

Terms

No account and no agreement to the site’s terms

An account whose accepted terms prohibit scraping

Use

Internal analysis, research, price comparison

Republishing content, building a substitute product, selling personal profiles

Two points run through all of them. First, “public” is not a blanket permission: public personal data is still personal data, and public creative work is still under copyright. Second, how you access a site matters as much as what you take. Getting past a CAPTCHA, rotating through residential proxies to evade a block, or ignoring a cease-and-desist letter all make your position weaker.

United States

The main federal statute is the Computer Fraud and Abuse Act (CFAA), which prohibits accessing a computer “without authorization” or in excess of authorised access. For years, sites argued that scraping in breach of their terms met that test. Two developments narrowed it. In Van Buren v. United States (2021), the Supreme Court read “exceeds authorized access” narrowly and warned against turning every breach of a computer-use policy into a crime. In hiQ Labs v. LinkedIn, the Ninth Circuit held in 2019, and reaffirmed in April 2022 after the Van Buren decision, that scraping data from publicly accessible profiles was unlikely to be access “without authorization” under the CFAA. Fenwick’s summary of the 2022 ruling sets out the reasoning.

That case did not end in a clean win for scraping. Back in the district court, LinkedIn prevailed on contract claims, including hiQ’s use of contractors to create fake accounts to collect logged-in data, and the parties agreed a permanent injunction in December 2022. Farella Braun + Martel’s review of the later rulings explains the outcome. The lesson most lawyers draw is that the CFAA risk for public data has fallen while contract risk has not.

Contract questions came up again in Meta Platforms v. Bright Data. In January 2024 a federal court in California ruled that Meta’s terms did not bar Bright Data from scraping public Facebook and Instagram data while logged out, as TechCrunch reported. The distinction between logged-in and logged-out collection, and whether the scraper ever agreed to the terms, did much of the work.

Copyright is a separate issue. Facts are not protected by copyright in the US, so a list of prices or specifications is generally free to collect, but the creative expression in articles, photographs and video is protected. Reproducing it at length, or republishing it, can infringe regardless of how it was collected. Older claims such as trespass to chattels can also apply when scraping places a real burden on a site’s servers.

European Union and United Kingdom

In Europe the biggest constraint is usually data protection. Under the GDPR, information about an identifiable person is personal data whether or not it was published on a public page. Scraping names, profile details, photos or contact information therefore needs a lawful basis, typically legitimate interests, plus transparency towards the people concerned and limits on what you keep and for how long. Several European data protection authorities have fined Clearview AI for scraping facial images from the web to build a recognition database, which shows how seriously regulators treat bulk collection of personal data. The GDPR for AI and right to be forgotten entries cover the obligations that follow once you hold such data.

Databases have their own protection. The EU database right protects collections that required substantial investment, and extracting a substantial part of one can infringe even if the individual entries are facts. Copyright also applies to the content itself. The EU’s 2019 copyright directive created text and data mining exceptions: one for research organisations, and a broader one that applies unless the rights holder has reserved its rights in a machine-readable way, for example in robots.txt or site metadata. The UK has a narrower text and data mining exception limited to non-commercial research, and its Computer Misuse Act covers unauthorised access in a similar spirit to the CFAA.

Terms of service and accounts

Across jurisdictions, the strongest claims against scrapers tend to be contractual. Terms that a visitor never agreed to, sometimes called browsewrap, are harder to enforce than terms a user accepted when creating an account, known as clickwrap. Once you log in, you have usually agreed to the site’s rules, and scraping behind that login is where most successful claims have landed. Creating fake accounts to collect data, as in the hiQ case, adds deception to the breach.

Practical signals of the owner’s wishes also matter. A robots.txt disallow rule, rate limiting, a CAPTCHA, an IP block or a cease-and-desist letter all tell you the site does not consent to automated collection. Continuing after such a signal makes it harder to argue you acted in good faith, and in some jurisdictions makes access claims more likely to succeed. Anti-bot detection systems record these interactions, so the evidence usually exists.

Personal data needs extra care

If a scraper collects anything about identifiable people, treat it as a data protection project, not only an engineering one. Decide what personal fields you need and drop the rest at collection time. Document your lawful basis, set a data retention period, and be ready to answer access and deletion requests. Keep the data isolated, encrypted and auditable, which is where controls such as data isolation and an audit trail help. Sensitive categories such as health, religion or political views carry stricter rules everywhere.

Scraping for AI models and agents

Collecting web content to train or ground AI systems has added new questions. Several copyright lawsuits against AI developers over training data are still working through the courts in the US and elsewhere, and outcomes so far are mixed. Site owners increasingly publish machine-readable opt-outs, such as robots.txt rules for named AI crawlers, and some publish an llms.txt file pointing AI tools to content they are happy to share.

Agents that fetch pages on a user’s behalf sit somewhere between a browser and a crawler. Fetching a page a user asked about, at the user’s request, resembles ordinary browsing more than bulk collection does. Storing that content indefinitely, combining it across many users or republishing it brings back the usual copyright and data protection questions. Browser agents that log in with a user’s credentials also inherit the terms that user accepted.

A practical way to reduce risk

Teams that scrape responsibly tend to follow the same habits. They prefer an official API or data licence when one exists, as the comparison of web scraping vs API describes. They collect only public pages and never get around logins, paywalls or challenges. They identify their web crawler with an honest user agent, read robots.txt, and slow down on HTTP 429 responses. They collect facts rather than copying creative work, keep personal data to a minimum, set retention limits, and keep a record of what they collected, from where and why. And they stop and talk to the site owner when asked. None of this guarantees a particular outcome, but each habit removes a common basis for a claim.

Where Exabase fits

Exabase fetches public URLs that you or your agent submit and turns them into structured data. Exabase Extract renders JavaScript and returns page content as text chunks or Markdown, and the web scraper and website to Markdown tools use the same pipeline. Exabase does not log in to sites on your behalf, solve CAPTCHAs or rotate proxies, and the Link Preview API returns only what a public request receives, so pages behind a login or paywall return the login page’s metadata or an error.

Exabase also gives you controls that make responsible handling easier. Files submitted to Extract are retained for one day and then deleted, as the extraction guide explains. Content you choose to keep can live in separate Bases, each isolated from the others, so data from one source, client or project stays apart. Data is encrypted in transit and at rest with AES-256, and the Scale plan on the pricing page includes a zero data retention policy; the zero data retention entry explains what such policies cover. Exabase is the infrastructure layer: it does not make any particular use of scraped data lawful, and the decision about what to collect and how to use it stays with you and your legal team.

For tool choices, the best web scraping API roundup and the comparisons with Firecrawl and Bright Data explain how different services handle access and data. The file extraction solution describes the extraction side in more depth, and the post on the security questions your AI product will be asked covers what buyers ask about data handling.

Related concepts

Screen scraping and headless browser automation are the techniques most often at issue in disputes. Web archiving is a related practice with its own legal deposit and preservation rules in some countries. Data residency matters when scraped personal data crosses borders, and LLM-ready data describes the cleaned output most AI teams are after.

Frequently asked questions

Is web scraping illegal?

No, web scraping is not illegal in itself. Collecting public, non-personal information without bypassing access controls is lawful in many jurisdictions. Liability usually comes from breaching accepted terms, getting around technical blocks, infringing copyright or mishandling personal data.

Is it legal to scrape data that is publicly available?

Often, but not always. US courts have held that scraping public pages is unlikely to breach the CFAA, yet contract, copyright and privacy claims can still apply. In the EU and UK, public personal data remains subject to data protection law.

Can a website’s terms of service stop me from scraping?

They can, especially if you created an account and accepted them. Courts have been more willing to enforce terms a user agreed to than terms posted on a page nobody accepted, and logged-in scraping carries more contract risk than logged-out collection.

Does robots.txt have legal force?

Robots.txt is a voluntary standard rather than a law, but ignoring it weakens a claim that you acted in good faith. In the EU, a machine-readable reservation such as a robots.txt rule can also opt content out of the commercial text and data mining exception.

Is it legal to scrape personal data?

Scraping personal data is legal only with a lawful basis under data protection laws such as the GDPR, along with transparency, minimisation and retention limits. Regulators have fined companies for bulk scraping of personal data, so treat it as a compliance project.

Can I scrape websites to train an AI model?

It depends on the jurisdiction, the content and any opt-outs. Several copyright cases about AI training data are still unresolved, and EU law lets rights holders reserve their content from commercial text and data mining. Take legal advice before building a training set from scraped content.

Does using Exabase make my scraping compliant?

No. Exabase fetches public pages you submit and turns them into structured data through Extract, with retention and isolation controls, but whether a given use is lawful depends on your sources, your purpose and your jurisdiction. Route that decision to your legal team.

Related pages: Web scraping, Robots.txt, CAPTCHA, Residential proxies, GDPR for AI, Web scraping vs API, Exabase Extract, File extraction, Best web scraping API

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.