Legal guide23 min read

Is Web Scraping Legal? US, EU and UK Rules (2026)

Short answer

Scraping publicly available web pages is generally legal in the US, the EU and the UK, including for a commercial product built on facts, but how you access the data and what you do with it can still break a contract, copyright, database right or privacy law. In the US, Van Buren v. United States (2021) reads the federal anti-hacking law (CFAA) as a question of whether you entered an area that is off limits to you, and in hiQ Labs v. LinkedIn (9th Cir. 2022) the court found serious questions as to whether the law reaches pages open to the general public at all. In the EU and UK, the GDPR and the database right are the main limits. ProxyField sells residential proxies for lawful public-data collection from $1.95/GB; start with the Easy Trial: 1 GB for $2.95.

residential IPs
412M+
from, traffic never expires
$1.95/GB
Easy Trial
1 GB for $2.95
At a glance
QuestionShort answer
Public pages, no loginGenerally legal in the US, EU and UK; respect the terms you accepted and keep your request rate low
Behind a login or after a blockHigh risk: computer-misuse law (CFAA in the US, Computer Misuse Act in the UK) and contract claims
Personal dataThe GDPR and the UK GDPR apply, whatever the source
Copying content or a database wholesaleCopyright and database right risk
Building a commercial product on scraped factsGenerally lawful; the risk is in the source's terms, copied text and photos, a substantial part of a database and personal data
Ignoring robots.txtNot illegal by itself (RFC 9309: "not a form of access authorization"), but it weakens a good-faith position, and the CNIL lists excluding sites that object as one measure
On this page 16 sections
  1. Is web scraping legal? The short answer
  2. Is it legal to scrape publicly available data?
  3. Do you legally have to follow robots.txt?
  4. United States: the CFAA, hiQ v. LinkedIn and Van Buren
  5. European Union: GDPR, the database right and contract
  6. United Kingdom: Computer Misuse Act, UK GDPR and the ICO statement
  7. Other countries
  8. Is web scraping legal for commercial use?
  9. Prices, fares, tickets and jobs: common commercial cases
  10. Is it legal to get past CAPTCHAs, Cloudflare or other anti-bot systems?
  11. Web scraping legal issues: can you get sued?
  12. Do hackers use web scraping?
  13. How to scrape with less legal risk: a 7-point checklist
  14. Where ProxyField stands
  15. Web scraping law FAQ
  16. Sources

Do you legally have to follow robots.txt?

No law makes robots.txt binding on its own: RFC 9309, the IETF standard published in September 2022, says its rules "are not a form of access authorization". Ignoring it still costs you: it shows what the site owner asks of crawlers, ignoring it weakens a good-faith position in a contract or access dispute, and in the EU the CNIL lists excluding sites that object to scraping as one of the measures for scraping under legitimate interests (CNIL focus sheet).

robots.txt …What RFC 9309 says
Is a request to crawlersYes; it is not access control and does not replace the site's terms of use
MatchingThe longest matching rule wins; on a tie, Allow wins; no matching rule means allowed
Missing file (4xx, such as 404)The crawler may access any page
Server error (5xx) or unreachableThe crawler must assume everything is disallowed
CachingCrawlers should not use a cached copy for more than 24 hours

A 3-line file that asks every crawler to stay out of /checkout/:

User-agent: *
Disallow: /checkout/
Allow: /

To test a URL from Python before you fetch it, use the standard library: RobotFileParser("https://example.com/robots.txt"), then .read() and .can_fetch(user_agent, url); the Python web scraping tutorial runs this check before every page. Terms, robots.txt and APIs together: how to check if scraping is allowed.

Sources 18 U.S.C. § 1030; Van Buren v. United States; hiQ Labs v. LinkedIn, 9th Cir. 2022; GDPR, Regulation (EU) 2016/679; Database Directive 96/9/EC.

United States: the CFAA, hiQ v. LinkedIn and Van Buren

In the US, scraping public pages is hard to fit under the federal anti-hacking law after Van Buren and hiQ, but contract and copyright claims remain. The CFAA question is whether you passed a gate; the contract question is whether you agreed not to scrape.

What the CFAA says

The Computer Fraud and Abuse Act, 18 U.S.C. § 1030, punishes accessing a computer "without authorization" or in a way that "exceeds authorized access" and obtaining information. It is a criminal statute, and subsection (g) also lets anyone who suffers damage or loss from a violation bring a civil suit.

Van Buren v. United States (2021): gates up or down

On June 3, 2021, the Supreme Court read the CFAA narrowly in Van Buren v. United States, decided 6-3 in an opinion by Justice Barrett. A person "exceeds authorized access" when they enter parts of a computer, such as files, folders or databases, that are off limits to them. Misusing information you were entitled to reach is not enough. The Court described this as a "gates-up-or-down inquiry": either you can enter an area of the system or you cannot. It did not decide whether a gate has to be technical, such as a password, or can also be set by a contract or policy.

hiQ Labs v. LinkedIn (9th Cir. 2022)

On April 18, 2022, after the Supreme Court sent the case back in light of Van Buren, the Ninth Circuit again upheld the preliminary injunction that stopped LinkedIn from blocking hiQ (opinion, No. 17-16783). hiQ scraped LinkedIn profiles that anyone could view without logging in. The court held that hiQ had raised serious questions that this was not access "without authorization" under the CFAA, even after LinkedIn sent a cease-and-desist letter and blocked it, reasoning that "authorization is only required for password-protected sites or sites that otherwise prevent the general public from viewing the information."

The ruling has two limits. First, it is a ruling on a preliminary injunction, and it binds courts in the Ninth Circuit only. Second, hiQ later lost on contract: in November 2022 the district court ruled that hiQ had breached LinkedIn's User Agreement, through its scraping and through fake profiles, and in December 2022 the case ended in a consent judgment against hiQ (district court docket, No. 3:17-cv-03301). The CFAA win did not make the scraping risk-free.

DOJ charging policy (Justice Manual 9-48.000)

Federal prosecutors follow the Justice Department's CFAA charging policy, Justice Manual 9-48.000, revised in May 2022 after Van Buren. It says good-faith security research should not be charged, and that breaking an access restriction found only in a contract or terms of service is not, by itself, enough for federal criminal charges. It is internal policy: it does not bind civil suits or state law.

Contract claims and a 2024 ruling on platform terms

Contract is now the main US risk for scraping public pages, and it depends on whether you are bound by the terms. In January 2024, a federal court in the Northern District of California held that a social media company's terms did not stop a data company from scraping public data while logged out (order granting summary judgment, No. 3:23-cv-00077). The court read the terms as governing account holders using the platform while logged in.

The lesson cuts both ways. A scraper that logs in has accepted the terms, as hiQ's contract loss shows. New rulings as they come: web scraping legal news.

ClaimStatute or caseWhen it bitesPrimary source
Unauthorized access (criminal or civil)CFAA, 18 U.S.C. § 1030You get past a login, password or other gate18 U.S.C. § 1030
"Exceeds authorized access"Van Buren (2021)You enter areas of a system that are off limits to youSupreme Court opinion
CFAA claim over public pageshiQ v. LinkedIn (9th Cir. 2022)Serious questions as to whether it reaches pages anyone can view (preliminary injunction, Ninth Circuit)Ninth Circuit opinion
Breach of contractSite terms; the hiQ district court rulingYou accepted terms that forbid scraping, for example by creating an accounthiQ docket
Federal prosecution for ToS-only breachesDOJ Justice Manual 9-48.000Not charged on a terms violation aloneJustice Manual 9-48.000
Circumventing access controls on copyrighted works17 U.S.C. § 1201You break a technical measure that protects a work17 U.S.C. § 1201

Sources 18 U.S.C. § 1030; Van Buren v. United States; hiQ Labs v. LinkedIn, 9th Cir. 2022; hiQ district court docket; Justice Manual 9-48.000; N.D. Cal. No. 3:23-cv-00077, Dkt. 181.

European Union: GDPR, the database right and contract

In the EU, scraping public pages is not illegal as such, but the GDPR applies to any personal data you collect, and the database right protects investment in databases.

The GDPR covers public personal data. Regulation (EU) 2016/679 applies to any processing of personal data, wherever you found it. You need a lawful basis under Article 6, and the principles the EDPB lists apply: lawfulness, fairness and transparency, purpose limitation and data minimization among them. France's regulator, the CNIL, published a focus sheet on web scraping under the legitimate-interests basis. It sets measures such as defining what you collect in advance, excluding some categories of data, deleting irrelevant data and excluding sites that object to scraping. It also notes that scraping can be barred by other rules, such as terms of use based on the database right or copyright.

The database right protects the investment, not the facts. The Database Directive 96/9/EC gives the maker of a database a sui generis right to prevent the extraction or reuse of all or a substantial part of its contents. In British Horseracing Board v William Hill (C-203/02), decided on November 9, 2004, the Court of Justice held that the protected investment is in obtaining, verifying and presenting existing materials, not in creating the data. It also held that taking a substantial part needs the maker's permission even when the database is open to the public.

Site terms can bind where the database right does not. In Ryanair v PR Aviation (C-30/14), decided on January 15, 2015, the Court held that the Directive does not stop the maker of a database protected by neither copyright nor the database right from limiting its use by contract, subject to national law. The case was about an airline's flight data and a price-comparison site.

Member states add their own rules on top; country by country in web scraping law in the UK and EU.

Sources GDPR; EDPB basic principles; CNIL focus sheet on web scraping; Directive 96/9/EC; C-203/02; C-30/14.

United Kingdom: Computer Misuse Act, UK GDPR and the ICO statement

In the UK, scraping public pages is generally legal, but unauthorized access is a crime, personal data falls under the UK GDPR, and the database right still applies.

Computer Misuse Act 1990. Section 1 makes it an offense to cause a computer to perform any function with intent to secure access to any program or data, when that access is unauthorized and you know it. Using someone else's login, or entering areas the site does not open to you, is where this risk sits.

UK GDPR and the ICO's joint statement. In August 2023, the UK Information Commissioner's Office and 11 other data protection authorities published a joint statement on data scraping. It says publicly accessible personal information is still covered by data protection and privacy law in most jurisdictions. It also tells social media companies and other sites to protect the personal data they host against unlawful scraping, for example with rate limits and bot detection.

Database right and copyright. The UK keeps its own database right. GOV.UK guidance says it protects substantial investment in obtaining, verifying or presenting a database's contents, with no originality needed. Original content is protected under Part I of the Copyright, Designs and Patents Act 1988.

Sources Computer Misuse Act 1990, s.1; ICO joint statement on data scraping; GOV.UK database rights; CDPA 1988, Part I.

Other countries

No single global rule decides whether web scraping is legal. Most countries apply the same four bodies of law: contract, copyright, privacy and computer-misuse law, in the same way as the US, the EU and the UK.

Sources ICO joint statement.

Prices, fares, tickets and jobs: common commercial cases

Reading published prices, fares, ticket prices and job ads is generally lawful; the risk comes from site terms, the EU and UK database right, personal data and, for tickets, getting around purchase controls.

Price scraping and price monitoring

Price scraping is usually legal, because prices are facts. The risk sits in the site's terms, if you accepted them, and in the EU and UK in taking a substantial part of a retailer's database (BHB v William Hill). Monitoring a set of products is a different act from copying a whole catalog. For the product side, see price scraping with the Web Scraping API.

Airfares and travel sites

Airline fares are facts too, but airlines enforce their website terms. In Ryanair v PR Aviation, the EU's top court held that the Database Directive does not stop an airline from restricting the use of its flight data by contract where neither copyright nor the database right protects it. Reading published fares for comparison is lower risk than automating bookings.

Ticket prices

The US BOTS Act targets getting around ticket-purchase controls, not reading prices. Per the FTC's page on the Better Online Ticket Sales Act, the 2016 law prohibits circumventing a security measure, access control system or other technological control that a ticket issuer uses to enforce posted purchase limits or to keep its online purchasing order rules intact. Reading published prices is a different act.

Job sites

Job-data scraping is the context of the best-known US case: hiQ scraped public LinkedIn profiles for workforce analytics (Ninth Circuit opinion). Public job ads are generally lower risk. Candidate profiles are personal data, so the GDPR and the UK GDPR apply to them in Europe, and hiQ's later contract loss shows what accepted terms can do.

CaseMain riskPrimary source
Price monitoringSite terms; EU and UK database rightC-203/02
AirfaresAirline terms enforced as contractC-30/14
Ticket pricesCircumventing purchase controls (BOTS Act)FTC, BOTS Act
Job ads and profilesPersonal data; accepted termshiQ v. LinkedIn

Sources C-203/02; C-30/14; FTC, BOTS Act; hiQ v. LinkedIn.

Do hackers use web scraping?

Yes, attackers use scraping to collect names, emails and phone numbers for phishing, identity fraud and unwanted marketing. The ICO's joint statement lists these harms, from targeted cyberattacks and identity fraud to monitoring, profiling and surveillance of individuals. The same technique, used to collect public prices or for research, is lawful. What separates the two is the type of data and the purpose, not the code.

Sources ICO joint statement on data scraping.

Where ProxyField stands

"For permitted business use ProxyField provides infrastructure for working with public data. Follow applicable laws and website rules."

The ProxyField acceptable use policy, in summary: "You may use ProxyField for collecting public web data, price and SEO monitoring, ad verification, testing, market research, managing your own or your clients' social media and marketplace accounts (one IP per account), and similar lawful work. You may not use it to send spam or open mail ports, spread malware, attack systems (DDoS, password guessing, scanning without permission), commit fraud (including phishing, ad and click fraud, fake accounts or engagement), access data behind logins you are not entitled to, infringe intellectual property or break the law. Some site categories are restricted to protect the network, including financial and government services. Reselling is allowed only through our reseller program."

On verification (KYC): "No identity verification for ordinary purchases, including crypto: sign up with an email address and buy. We may ask for verification if an account shows signs of abuse or breaks our Acceptable Use Policy, and we verify every reseller before wholesale access."

Abuse reports go to [email protected]. For the infrastructure side of lawful collection, see proxies for web scraping.

Web scraping law FAQ

Is web scraping illegal in the US?

Probably not under the federal anti-hacking law, for public pages: Van Buren v. United States (2021) limited the CFAA to entering areas of a computer that are off limits to you, and the Ninth Circuit applied that to public profiles in hiQ v. LinkedIn. Contract and copyright claims remain: hiQ itself later lost on LinkedIn's User Agreement.

What does the CFAA mean for companies that scrape public websites in the US?

Since Van Buren, the CFAA turns on whether you entered an area that is off limits to you, so scraping pages anyone can view is hard to charge or sue under it. Logins you are not entitled to and barriers a site puts up against you are where CFAA risk returns, and the DOJ's charging policy (Justice Manual 9-48.000) is separate from civil suits.

Is data scraping illegal?

Not in itself. Data scraping, screen scraping and web scraping are judged the same way: the law looks at what you accessed and what you did with the data, not at the technique. It turns illegal or actionable when you get past a login or block without authorization, break terms you accepted, process personal data without a lawful basis, or copy protected content or a substantial part of a database.

Which privacy laws apply to web scraping?

In the EU the GDPR, and in the UK the UK GDPR: public personal data is still personal data and needs a lawful basis, with principles such as data minimization. In 2023, 12 data protection authorities, including the UK's ICO, said so in a joint statement on scraping.

What if a website's terms of use prohibit scraping or automated data collection?

Then scraping that site is a contract risk, and how big depends on whether you agreed to the terms. If you created an account or clicked to accept them, a ban on automated data collection is likely to bind you, as hiQ's contract loss on LinkedIn's User Agreement shows. In the EU, Ryanair v PR Aviation (2015) lets a site limit the use of unprotected data by contract. Read the clause before you start.

Do I legally have to follow robots.txt when scraping?

No law makes robots.txt binding as such: RFC 9309 (2022) says its rules "are not a form of access authorization", and a missing file (4xx) means no rules. It still matters: it shows what the site owner asks of crawlers, ignoring it weakens a good-faith position in a dispute, and France's CNIL lists excluding sites that object to scraping as one possible measure under the GDPR.

How do I know if web scraping is allowed on a site?

Read the site's terms of use (usually under acceptable use or prohibited conduct) and its robots.txt, and look for an official API or data license. If the data sits behind a login, or the site has blocked you, treat it as not allowed without permission.

Show 9 more questionsShow fewer questions

Do hackers use web scraping?

Yes. Attackers scrape names, emails and phone numbers for phishing, identity fraud and unwanted marketing, and the ICO's joint statement on data scraping, signed by 12 data protection authorities in 2023, lists these harms. Lawful scraping differs in the data and the purpose: collecting public prices or research data is not the same act as harvesting personal details for an attack.

Can I get sued for web scraping?

Yes. Most claims are for breach of terms or copyright; in Europe, regulators can also fine misuse of personal data, as the CNIL did in a scraping case reported by the EDPB. Most disputes start with an IP block or a cease-and-desist letter rather than a lawsuit.

Sources

  1. hiQ Labs v. LinkedIn, 9th Cir., April 18, 2022 cdn.ca9.uscourts.gov/datastore/opinions/2022/04/18/17-16783.pdf
  2. hiQ Labs v. LinkedIn, N.D. Cal. No. 3:17-cv-03301, docket dockets.justia.com/docket/california/candce/3:2017cv03301/312704
  3. Van Buren v. United States, 593 U.S. (2021) www.supremecourt.gov/opinions/20pdf/19-783_k53l.pdf
  4. 18 U.S.C. § 1030 (CFAA) www.law.cornell.edu/uscode/text/18/1030
  5. DOJ Justice Manual 9-48.000 www.justice.gov/jm/jm-9-48000-computer-fraud
  6. N.D. Cal. No. 3:23-cv-00077, order granting summary judgment (Dkt. 181) docs.justia.com/cases/federal/district-courts/california/candce/3:2023cv00077/406956/181
  7. 17 U.S.C. § 1201 www.law.cornell.edu/uscode/text/17/1201
  8. US Copyright Office, FAQ "What does copyright protect?" www.copyright.gov/help/faq/faq-protect.html
  9. FTC, Better Online Ticket Sales Act www.ftc.gov/legal-library/browse/statutes/better-online-ticket-sales-act
  10. GDPR, Regulation (EU) 2016/679 eur-lex.europa.eu/eli/reg/2016/679
  11. EDPB, basic principles www.edpb.europa.eu/topics/key-gdpr-concepts/basic-principles_en
  12. CNIL, legitimate interests focus sheet on web scraping www.cnil.fr/en/legal-basis-legitimate-interests-focus-sheet-measures-implement-case-data-collection-web-scraping
  13. EDPB news, CNIL fine in a data-scraping case www.edpb.europa.eu/news/news/2025/data-scraping-french-supervisory-authority-fined-kaspr-eu240-000_en
  14. Database Directive 96/9/EC eur-lex.europa.eu/eli/dir/1996/9/oj/eng
  15. CJEU C-203/02, British Horseracing Board v William Hill eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62002CJ0203
  16. CJEU C-30/14, Ryanair v PR Aviation eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62014CJ0030
  17. Computer Misuse Act 1990, s.1 www.legislation.gov.uk/ukpga/1990/18/section/1
  18. ICO and others, joint statement on data scraping (August 2023) ico.org.uk/media/about-the-ico/documents/4026232/joint-statement-data-scraping-202308.pdf
  19. GOV.UK, sui generis database rights www.gov.uk/guidance/sui-generis-database-rights
  20. Copyright, Designs and Patents Act 1988, Part I www.legislation.gov.uk/ukpga/1988/48/part/I
  21. RFC 9309, Robots Exclusion Protocol www.rfc-editor.org/rfc/rfc9309.html
  22. Cloudflare, sample terms developers.cloudflare.com/bots/reference/sample-terms/

This is not legal advice. Laws and court decisions change, and the primary sources linked on this page are the authority.

Easy Trial: 1 GB for $2.95.

Try for the price of 1 GB, no subscription, traffic never expires.