Skip to content

Is web scraping legal? What the law says, with the cases that matter

By the DataImpulse team · 25 Nov 2026 · 6 min read

Collecting public web pages is generally lawful. The risk comes from four places: how you get access, what you agreed to, whose personal data it is, and what you do with the copy.

Web scraping is not illegal in itself. Reading public web pages with a program is, in most places, as lawful as reading them with a browser. What can be unlawful is how you gain access, what you promised when you signed up, whose personal data you collect, and what you do with the copy.

This guide walks through those four areas with the primary sources. It is general information and not legal advice. Rules differ between countries, and a project with real money or personal data at stake deserves a lawyer.

The four questions that decide it

Almost every scraping dispute turns on one or more of these.

  1. Access. Did you get past a barrier you were not allowed through?
  2. Contract. Did you agree to terms that forbid what you did?
  3. Personal data. Does the data describe identifiable people?
  4. Use. Did you copy protected content, or harm the site by collecting it?

A project that reads public pages, without logging in, at a gentle rate, for facts and not for people's personal details, is on the safest ground on all four.

Access: public pages and computer misuse laws

In the United States the main statute is the Computer Fraud and Abuse Act, 18 U.S.C. 1030, which makes it an offence to access a computer without authorization or to exceed authorized access.

Two decisions shape how it applies to scraping. In Van Buren v. United States, decided in 2021, the Supreme Court held that a person exceeds authorized access when they obtain information from particular areas of a computer, such as files, folders or databases, that are off limits to them. It does not cover someone who has access and uses it for an improper purpose. That narrowed the law toward a question of gates: was the area open to you or not?

In hiQ Labs v. LinkedIn, decided in 2022, the Ninth Circuit Court of Appeals upheld a preliminary order that stopped LinkedIn from blocking a company that collected public member profiles. The court concluded that there were serious questions about whether the concept of access without authorization applies at all to pages that anyone can view without a login.

Read that result carefully. It was a ruling on a preliminary order in one circuit, not a final declaration that scraping is legal. In later proceedings the district court found that hiQ had breached LinkedIn's user agreement, and the case ended in a settlement. Access law was only one of the four questions.

The practical line is the login. Collecting pages that are open to the public is very different from using an account, a leaked credential or a technical trick to reach what is not public. Other countries have their own computer misuse laws with the same basic shape.

Contract: terms of service

A site's terms often prohibit automated collection. Whether those terms bind you depends on whether you agreed to them.

If you created an account and ticked a box, you agreed. Scraping from inside that account in breach of the terms is a contract problem, and it is the basis on which sites most often win.

Terms that are merely linked at the bottom of a page, with nothing to click, are weaker, and courts have been reluctant to enforce terms a visitor never saw. Weaker is not the same as absent. A cease and desist letter removes any doubt that you know the site objects, and continuing after one changes your position considerably.

Personal data: where most real risk sits

Data about identifiable people is regulated even when it is public. This surprises teams more than anything else in this area.

Under the European Union's General Data Protection Regulation, collecting personal data is processing, and processing needs a lawful basis, a defined purpose and respect for people's rights to be informed, to object and to have data erased. A name, a profile photo, an email address or a username on a public page are all personal data. Being public does not make them free to collect and reuse.

Similar rules exist elsewhere, including state privacy laws in the United States. Regulators have fined companies for building databases from scraped public profiles and photographs.

The lesson for a project is to avoid personal data unless you need it, collect the minimum when you do, and document why you are allowed to. Prices, product specifications, stock levels and published statistics do not carry this problem.

Facts are not protected by copyright. In Feist v. Rural Telephone the United States Supreme Court held that facts are not original and so cannot be copyrighted, though a creative selection or arrangement of them can be. A price, a temperature and an address are facts.

Articles, reviews, photographs and descriptions are protected expression. Copying them in bulk and republishing them is infringement in most countries, whatever the method of copying. Extracting facts from a page is different from reproducing the page.

The European Union adds a separate right for databases. Under the Database Directive, the maker of a database built with substantial investment can object to extraction of a substantial part of it, even where the individual entries are plain facts.

What robots.txt means

A robots.txt file states which parts of a site its owner would like crawlers to avoid. The standard that defines it, RFC 9309, says plainly that the rules are not a form of access authorization. The file is a request, not a lock, and not a contract.

It still matters. Following it is the clearest evidence that you acted in good faith, and ignoring it is the first thing the other side will point to. Treat it as a rule you follow.

Harm to the site

Separate from all of the above, a collector that overloads a server can be liable for the damage, and sustained heavy traffic is the usual trigger for a site to act at all. Rate is under your control. A few requests a second, spread out, with pauses at night for small sites, avoids the problem and usually avoids attention.

A checklist before you start

  • Is the data visible without logging in? If not, stop and read the terms you accepted.
  • Does it include personal data? If so, define the purpose and legal basis, or leave it out.
  • Are you taking facts, or copying text and images?
  • Have you read robots.txt and the terms?
  • Is there an official API, feed or licence that provides the same data?
  • Is your request rate low enough that the site would not notice?
  • Do you identify your client honestly, with a way to contact you?
  • Will you stop if the site asks you to?

Where proxies fit

A proxy changes the address your requests come from. It does not change what the law or a site's terms allow. Collection that is lawful directly is lawful through a proxy, and collection that is not stays unlawful.

Proxies have legitimate jobs in this work: seeing pages as they appear in another country, spreading a polite crawl so that no single address carries all of it, and keeping collection separate from an office connection. Using them to return after a site has told you to stop is a different matter, and it weakens your position on every question above.

For the practical side, see avoiding blocks responsibly, the web scraping use case and types of CAPTCHA, which explains what a site is telling you when it challenges your traffic. How to buy residential proxies covers what to ask a provider about where its addresses come from.

Try it yourself

Create an account, add funds from US$1 and order a proxy in the country you need.

Keep reading