Legal Considerations for Web Scraping: A Practitioner’s Guide to Staying Compliant in 2026

Web scraping has quietly become one of the most consequential tools in modern data operations. It powers price-comparison engines, feeds market-intelligence platforms, supports academic research, and increasingly trains the AI systems reshaping entire industries. For every legitimate use case, though, there’s a legal risk that practitioners routinely underestimate, and the gap between “this data is public” and “this data is legally safe to collect” is where most scraping operations get into trouble.

The question “is web scraping legal?” is the wrong framing. The better question is under what conditions it’s legal, and which specific legal regime governs the data, the method, and the jurisdiction involved. There is no single yes-or-no answer. It’s a matrix of computer-crime statutes, privacy law, intellectual property regimes, and contract law, and each one behaves differently depending on where your servers sit, where your data subjects live, and how you technically obtained access. This guide walks through that matrix the way a practitioner needs to see it, not as a summary of court cases, but as a framework for making defensible decisions.

Key Takeaways

  • Publicly accessible data is generally scrapeable in the United States under the Computer Fraud and Abuse Act, provided you don’t bypass authentication or technical access controls.
  • Personal data triggers GDPR, CCPA, Indonesia’s UU PDP, and similar privacy regimes regardless of whether the data is publicly visible on the page.
  • Browsewrap Terms of Service are largely unenforceable against anonymous scrapers in US courts, but the moment you create an account, you enter a binding contract that can be enforced against you.
  • Copyright protects creative expression, not raw facts, but the EU’s sui generis database right can still protect the structure and investment behind a data collection, even when the underlying facts are unprotected.
  • Machine-readable opt-outs, including robots.txt directives and HTML metadata tags, now carry real legal weight under the EU AI Act’s copyright provisions, and ignoring them is increasingly used as evidence of bad faith in litigation.
  • Cookie replay and session-hijacking techniques to bypass login walls sit in a high-risk legal zone touching the CFAA, the DMCA’s anti-circumvention provisions, and basic contract law.
  • The landscape is shifting quickly: AI training-data litigation, expanding privacy regimes, and new platform-side technical countermeasures are all active in 2026, and several of the theories discussed below are still being tested in court rather than settled.
  • Documentation, rate discipline, and technical restraint remain your strongest practical defense if your scraping activity is ever challenged.

The Four Pillars of Scraping Law

Understanding scraping legality means analyzing four distinct legal pillars at once. Most practitioners fixate on just one, usually the CFAA in the US, and get blindsided by the other three.

1. Computer Fraud and Abuse Act (CFAA) – The US Gatekeeper

The CFAA is a 1986 anti-hacking statute that prohibits “unauthorized access” to computer systems. For years, platforms leaned on this law aggressively, arguing that violating a website’s Terms of Service was itself unauthorized access under federal criminal law. That interpretation created a real chilling effect on legitimate data work.

The turning point was hiQ Labs v. LinkedIn. HiQ scraped public LinkedIn profiles to build workforce-analytics products. LinkedIn sent a cease-and-desist letter and blocked hiQ’s IP ranges, framing the conduct as a CFAA violation. HiQ sued for injunctive relief, and in 2022 the Ninth Circuit Court of Appeals held that scraping publicly available data is not “unauthorized access” under the CFAA simply because a platform objects to it. That holding remains the clearest statement in US law that public-data scraping is not, on its own, a federal crime. It’s worth being precise about how the case actually ended, though: after the CFAA ruling, hiQ and LinkedIn reached a private settlement in which hiQ conceded it had breached LinkedIn’s contractual terms, and hiQ ultimately shut down its data business. The lesson isn’t “hiQ won.” It’s that the CFAA and contract law are separate battles, and you can win one while losing the other.

That CFAA reasoning was tested again in Meta Platforms v. Bright Data (N.D. Cal., 2024). This case turned on contract interpretation, not the CFAA: Meta’s Terms of Service prohibited automated data collection by “users” of Facebook and Instagram, and the court had to decide whether an entity scraping public, logged-out pages counted as a “user” bound by that contract. Judge Chen ruled that it did not: scraping conducted without logging in doesn’t constitute “use” of the platform under the Terms, so Bright Data hadn’t breached the contract by collecting public data while logged out.

What this means in practice: if data is visible to an anonymous visitor without logging in, scraping it in the US is generally not a CFAA violation. The moment you bypass a login wall, a CAPTCHA, an IP block, or a hard rate limit, you move into contested “unauthorized access” territory. The line courts draw is technical, not contractual.

When the CFAA isn’t your primary risk: if you’re scraping data as a beginner behind a login using credentials you’re authorized to hold, your exposure shifts to contract law and privacy law, not the CFAA. The statute is largely irrelevant for internal data extraction or API-based collection carried out with explicit permission.

2. Privacy Regulations – The Global Constraint

While the CFAA governs access, privacy law governs the data itself, and this is where most scraping operations create liability without realizing it, because visibility and legality are not the same thing.

GDPR (European Union). The GDPR applies to any processing of an EU resident’s personal data, regardless of where the scraper or its servers are located. “Personal data” is defined broadly: names, email addresses, IP addresses, photos, job titles, and even data that can be re-identified through aggregation. Scraping personal data requires a lawful basis under the regulation, and the options realistically available to scrapers are narrow. Legitimate interest is often claimed for business-intelligence use cases, but it requires a documented balancing test weighed against the data subject’s rights, not just an internal assumption that the use is reasonable. Consent is nearly impossible to obtain at scale for scraped data. Public interest is limited to journalism, academic research, and defined legal obligations. France’s CNIL fined the LinkedIn-data tool KASPR €240,000 in December 2024 for collecting contact details users had deliberately restricted to first- and second-degree connections, along with related retention and transparency failures. The message from that decision is direct: data being visible on a page does not mean the platform’s own visibility controls have been legally waived.

CCPA/CPRA (California). California’s privacy statutes grant residents rights over their personal information, including the right to know what’s collected and the right to request deletion. Scraping California residents’ personal data without disclosure creates compliance exposure and potential enforcement action, even absent a data breach.

Indonesia’s Personal Data Protection Law (UU PDP). Indonesia’s UU PDP, enacted in 2022, applies extraterritorially to any entity processing an Indonesian resident’s personal data, regardless of where the scraping happens. The definition of personal data is broad, covering names, phone numbers, email addresses, national ID numbers, and biometric data, which means scraping public directories, social profiles, or business listings can trigger full compliance obligations. Processing requires a lawful basis, and for commercial databases built at scale, “legitimate interest” is difficult to sustain because the law requires a documented balancing test showing the data subject’s rights don’t outweigh the processor’s interest. The penalty structure is severe and dual-tracked: administrative fines reach up to 2% of an organization’s annual revenue, and criminal exposure includes imprisonment and substantial corporate fines for offenses involving misuse or falsification of personal data. Because reported figures for the exact criminal fine range vary across secondary sources, treat any specific rupiah figure as directional and verify the current range against the statute or a local counsel’s summary before relying on it for a compliance decision. Cross-border transfer is a separate obligation entirely: moving scraped Indonesian personal data onto servers outside the country requires an adequacy mechanism or standard contractual clauses, and failing to establish one is its own violation, independent of how the data was collected.

The critical insight that trips people up: privacy law applies based on the data subject’s location, not the scraper’s location or the server’s location. Scraping EU residents’ data from a US-hosted server while operating out of Asia still triggers GDPR. Scraping Indonesian users’ data from a Singapore-hosted server while your team sits in Europe still triggers UU PDP.

When privacy law genuinely doesn’t apply: purely factual, non-personal data, product prices, stock levels, weather readings, sits outside privacy regulation entirely. That’s a large part of why price-comparison engines operate with comparatively low legal risk.

3. Intellectual Property – The Hidden Minefield

Copyright. Copyright protects original creative expression, not facts. You can’t copyright the statement that a laptop costs $999, but you can copyright a detailed product review, a photograph, or an original product description built around that fact. In the US, fair use may shield limited scraping for research, commentary, or transformative purposes. In the UK, non-commercial text and data mining is explicitly permitted under Section 29A of the Copyright, Designs and Patents Act 1988.

Database rights (EU/UK). This is the trap most US-based teams miss entirely. The EU’s sui generis database right protects collections where there has been substantial investment in obtaining, verifying, or presenting the data, independent of whether any individual record is creatively original. Systematically extracting a substantial portion of a protected database, think price-comparison sites, property portals, or job boards, can infringe this right even when no single listing is copyrightable on its own.

Machine-readable opt-outs and the EU AI Act. The legal weight of these signals shifted meaningfully once the EU AI Act’s GPAI provider obligations under Article 53 took effect in August 2025. Those provisions require general-purpose AI model providers to implement policies respecting rights holders’ express reservations for text and data mining. It’s worth being precise here: the AI Act as a whole doesn’t become fully applicable until August 2026, but the copyright and TDM-related obligations for GPAI providers have already been in force for roughly a year, and they’re the part of the Act most relevant to this discussion.

Platforms are now deploying these reservations in three concrete forms. Custom robots.txt rules target named AI crawlers directly, for example disallowing GPTBot, PerplexityBot, or Google-Extended while leaving standard search indexing untouched. If you want to see exactly how these directives are structured and parsed correctly, our robots.txt guide for scrapers walks through the syntax in detail. HTML metadata tags such as <meta name="robots" content="noai, noimageai"> embed the same reservation directly in page markup, and some publishers are experimenting with X-Robots-Tag: noai HTTP headers as a protocol-level signal.

Why does ignoring these signals matter more now than it used to? Three reasons converge. General-purpose AI providers must be able to demonstrate that their training pipelines respect these opt-outs under the AI Act, so a scraper feeding a training pipeline that ignores them creates direct exposure for whoever deploys the resulting model. Separately, the DMCA’s Section 1201 anti-circumvention provisions are being tested in active litigation as a theory for treating these signals as protected “technological measures” rather than a voluntary courtesy; Reddit v. Perplexity AI, filed in the Southern District of New York in October 2025, alleges exactly this, that Perplexity and associated data-scraping partners evaded rate limits and anti-bot measures to collect Reddit content at scale. That theory has not been decided by any court, and practitioners should treat it as an open legal question, not settled law, until a ruling comes down. Finally, under both US and EU copyright frameworks, demonstrable willfulness increases statutory exposure substantially, and ignoring an explicit machine-readable reservation is exactly the kind of fact pattern that supports a willfulness finding.

Practical implication: build parser logic that checks for AI-specific user-agent rules, not just the generic wildcard, and route your collection away from disallowed paths. Masquerading a crawler as a standard browser while deliberately ignoring a platform-specific disallow rule for that same crawler is no longer just poor etiquette; it’s a documented, deliberate choice a court could point to later.

4. Contract Law – Terms of Service

Terms of Service are contracts between a website and its users, and their enforceability against a scraper depends entirely on whether the scraper actually agreed to them. Browsewrap terms, displayed on a page without requiring affirmative agreement, are generally unenforceable against anonymous scrapers in the US, consistent with the reasoning in Meta v. Bright Data. Clickwrap terms, the kind you affirmatively accept when creating an account, are a different story entirely: once you log in, you’re bound by the contract, and scraping in breach of it exposes you to a straightforward breach-of-contract claim.

Session replay and cookie replay: the high-risk bypass. A technique that sits squarely at the intersection of contract law and computer-crime statutes deserves its own warning. The pattern is simple: a human logs into a site through a normal browser, exports the resulting session cookies, and imports them into an automated script, whether that’s a Python-based scraper, a headless-browser pipeline, or a custom request library, so the script can access authenticated pages without ever performing its own login. Understanding how HTTP cookies actually function makes clear why this is risky rather than clever: the platform authorized a human, in a browser, to hold that session, not an automated process making thousands of requests per hour.

This matters legally on several fronts at once. Courts, including the Ninth Circuit’s United States v. Nosal line of cases, have held that using someone else’s valid credentials to bypass an access control can violate the CFAA even when the credential holder consented, because the platform’s authorization ran to a specific person and context, not to whoever ends up holding the session. If the platform maintains any technical measure to distinguish human from automated traffic, behavioral analysis, CAPTCHA, device fingerprinting, replaying a stolen session past those controls edges toward DMCA anti-circumvention exposure as well. And because the human operator likely accepted clickwrap terms prohibiting automated use, running that same session through a script creates a direct contractual nexus, even when the underlying terms are otherwise unenforceable against anonymous visitors.

The practical rule: if the data you need sits behind a login, negotiate API access or a data license instead. Don’t try to bridge that gap with an exported session. It’s one of the few areas in scraping law where there is no meaningful gray zone.

The Jurisdiction Matrix: Where the Rules Diverge

JurisdictionComputer-Crime ExposurePrivacy LawDatabase RightsToS Enforceability
United StatesPublic scraping generally lawful; bypassing authentication is high-riskCCPA/CPRA (state-level)No general sui generis rightBrowsewrap weak; clickwrap enforceable
European UnionVaries by member stateGDPR (strict, extraterritorial)Strong sui generis database rightGenerally stronger enforceability
United KingdomSimilar framework to pre-Brexit EUUK GDPR + Data Protection Act 2018Retained EU-derived database rightStrong
IndonesiaCybercrime provisions under UU ITEUU PDP (extraterritorial, corporate liability, administrative fines up to 2% of annual revenue, plus criminal exposure)Copyright ActModerate to strong
AustraliaNo dedicated scraping statutePrivacy Act 1988Unclear/limitedToS may create a duty of confidence
CanadaCriminal Code fraud provisionsPIPEDA (federal)Copyright ActModerate

Most real scraping disputes touch more than one jurisdiction simultaneously. A US-based company scraping EU residents’ data from servers hosted in Ireland faces US contract law, EU privacy law, and potentially EU database rights all at once. An Indonesian user’s data collected by a team in Singapore and stored on US cloud infrastructure triggers UU PDP, its cross-border transfer requirements, and potentially US state privacy statutes too.

Landmark Cases That Shaped the Landscape

CaseYearJurisdictionHolding
hiQ Labs v. LinkedIn2017–20229th Cir. (US)Scraping public data isn’t “unauthorized access” under the CFAA; case later settled with hiQ conceding a ToS breach
Meta Platforms v. Bright Data2024N.D. Cal. (US)Logged-out scraping of public data doesn’t constitute “use” under Meta’s Terms of Service; no breach found
Clearview AI (multiple regulators)2022–2024Netherlands, Italy, Greece, France, UKPublic photos aren’t free to harvest under GDPR; combined EU fines exceed €90M; UK’s separate fine was later overturned on jurisdictional grounds
KASPR — CNIL decision2024FranceScraping restricted-visibility LinkedIn contact data without a lawful basis violates GDPR; €240,000 fine
Reddit, Inc. v. Perplexity AI et al.2025–ongoingS.D.N.Y. (US)Testing whether circumventing rate limits and anti-bot measures violates DMCA Section 1201; unresolved

The pattern across these cases is consistent: purely public data is increasingly treated as legally accessible, personal data remains heavily protected regardless of visibility, and deliberate technical circumvention of access controls is the fastest way to escalate a civil dispute into something far more serious.

Common Mistakes Practitioners Make

Assuming “public” means “unregulated.” This is the single most expensive misconception in the field. A LinkedIn profile being visible to any logged-in user doesn’t mean scraping it at scale for a lead-generation database is exempt from GDPR; the KASPR decision exists specifically because that assumption failed.

Treating robots.txt as optional. It isn’t legally binding in most jurisdictions on its own, but ignoring it functions as evidence of bad faith in civil litigation, and it signals a broader lack of technical discipline. If a team can’t be bothered to respect basic crawling directives, rate limiting and data minimization are usually missing too. AI-specific robots.txt rules now carry additional weight under the EU AI Act’s copyright provisions.

Scraping behind a login without legal review. Creating an account puts you inside a contract. If the Terms prohibit scraping, you’re now exposed to breach-of-contract claims, injunctive relief, and attorney’s fees, a materially different risk profile than anonymous public scraping.

Collecting personal data “just in case.” GDPR’s data-minimization principle requires collecting only what’s necessary at the point of collection, not filtering it out later. Harvesting names, emails, and photos speculatively is a violation the moment it happens, and the same logic applies under UU PDP and the CCPA.

Ignoring server impact. Aggressive request volume that measurably degrades a service for real users can support a CFAA damage claim if losses exceed the statutory threshold, or a tortious interference claim, and it reliably provokes the exact anti-bot countermeasures that make an operation unsustainable. Understanding how rate limiting actually works on the target’s side helps avoid crossing that line by accident.

Hardcoding a generic user-agent to dodge AI-specific blocks. With platforms now deploying crawler-specific disallow rules, presenting a scraper as a standard browser while deliberately bypassing a targeted directive for that scraper’s real identity is a decision a court can point to as evidence of intent, not a neutral technical choice.

Practical Compliance Framework

Run through this before launching any scraping project, not after something goes wrong.

Pre-flight checklist

  • Classify the data: public or authenticated, personal or non-personal, factual or creative.
  • Map the jurisdictions involved: your location, the server’s location, and the location of the data subjects.
  • Read the actual Terms of Service: is scraping prohibited, and does accessing the data require an account?
  • Audit robots.txt for both the generic wildcard rules and any AI-specific crawler directives.
  • Check page-level metadata for noai tags or emerging TDM reservation signals.
  • Document your lawful basis in writing if personal data is involved, before collection begins, not afterward.
  • Implement conservative rate limiting; a good starting discipline is treating HTTP 429 responses as a hard signal to back off rather than a puzzle to route around.
  • Identify your collection tool with a transparent, contactable user-agent string rather than impersonating a browser.
  • Explicitly prohibit cookie replay and session export in your team’s engineering policy, in writing.
  • Extract only the fields you actually need; filter personal data at the point of collection.
  • Log URLs, timestamps, volumes, and the legal rationale for each collection run.
  • For anything high-stakes, get a written legal opinion before you scale it.

Expert Insights: What the Cases Reveal About Platform Strategy

Platforms don’t oppose scraping uniformly. They oppose scraping that threatens their business model or exposes them to liability. LinkedIn fought hiQ because hiQ was building a competing analytics product directly on top of LinkedIn’s data graph. Meta fought Bright Data over the same underlying tension. Reddit is fighting Perplexity because AI training-data scraping threatens Reddit’s own data-licensing revenue.

The pattern that emerges: platforms tolerate, and sometimes actively encourage, scraping that drives traffic to them or complements their ecosystem, while they litigate hardest against scraping that competes with their core product or enables a direct competitor. If your project competes directly with a target platform’s own paid data offering, expect resistance regardless of how technically compliant you are. If you’re building a derivative analysis tool, a comparison service, or a research application, the legal path tends to be considerably clearer.

AI training-data litigation. Content platforms and individual creators are increasingly suing AI companies over scraped copyrighted works and personal images. Reddit v. Perplexity AI is the case to watch on whether circumventing rate limits and anti-bot systems triggers DMCA liability, but it remains unresolved, and practitioners should treat the underlying legal theory as untested rather than settled.

The EU AI Act’s TDM provisions. GPAI providers have been required, since August 2025, to demonstrate that their training-data collection respects machine-readable copyright reservations. Untargeted facial-recognition scraping is separately and explicitly banned under the Act. If your collection pipeline feeds any AI system, building an opt-out parser into your architecture now is no longer optional groundwork, it’s a live compliance requirement.

Technical countermeasures becoming legal theories. Platforms are pairing sophisticated anti-bot defenses, CAPTCHA, behavioral analysis, browser and device fingerprinting, with lawsuits alleging that circumventing those defenses violates the DMCA. That shifts the legal battleground from ordinary contract disputes toward anti-circumvention claims carrying statutory damages, a meaningfully higher-stakes environment than a simple ToS breach.

Can I be sued for scraping public data? Yes, though the strongest legal theories against you are weaker than platforms often claim. In the US, scraping genuinely public data doesn’t violate the CFAA. You can still face copyright claims, EU database-rights claims, or a breach-of-contract claim if you agreed to Terms that prohibit it. The risk is real but lower than for authenticated scraping.

What is the penalty for illegal web scraping? It depends entirely on which law is violated. GDPR violations can reach €20 million or 4% of global annual revenue, whichever is higher. Indonesia’s UU PDP carries administrative fines up to 2% of annual revenue, plus separate criminal exposure for willful misuse or falsification of personal data, figures that vary by source, so verify current amounts against the statute before relying on a specific number. CFAA violations carry fines and potential imprisonment for unauthorized access, though this is rare for genuinely benign scraping. Willful copyright infringement can reach $150,000 per work in the US. Contract breaches typically result in injunctive relief, damages, and attorney’s fees rather than criminal exposure.

Does robots.txt have legal force? Not on its own; it’s a technical convention, not a statute. But courts increasingly treat ignoring it as evidence of bad faith, and AI-specific directives now carry real weight under the EU AI Act’s copyright provisions for GPAI providers. Honor it as a compliance baseline regardless of its formal legal status.

Is scraping for price comparison legal? Generally, yes, when you’re collecting factual data like prices and availability from public pages without bypassing authentication. Avoid lifting product descriptions, images, or reviews, which may carry copyright protection. In the EU, be cautious about extracting a substantial portion of a competitor’s catalog given database rights, and respect AI-specific opt-outs if the data will feed a model.

Can I scrape social media data? It depends on what and how. Public posts are technically accessible, but personal data still triggers GDPR, CCPA, or UU PDP depending on the data subject. Scraping for lead generation or surveillance-style use cases is high-risk; aggregate trend analysis with proper anonymization is comparatively lower-risk. Never scrape private messages, and never use cookie replay to reach content behind a login.

What’s the difference between scraping and API access? API access is contractual and permissioned from the outset: the provider sets the rate limits, the available fields, and the usage terms up front. Scraping is unilateral extraction without that negotiated relationship. APIs are almost always legally safer, though sometimes more limited or costly; scraping offers more flexibility at the cost of materially higher legal exposure.

Is cookie replay ever legally defensible? Almost never in a commercial context. The only scenario where it’s even arguable is when you’re the sole account holder, the Terms don’t prohibit automated access, and the data belongs to you alone. Even then, most platforms’ anti-bot systems are specifically designed to distinguish human sessions from automated ones, and bypassing that distinction creates CFAA and DMCA exposure that isn’t worth the convenience.

Conclusion

The legal considerations around web scraping aren’t a barrier to innovation; they’re the framework that makes a data operation sustainable rather than a liability waiting to surface. The practitioners who do this well aren’t the ones avoiding the law, they’re the ones who understand it precisely enough to design their pipelines around it from the start.

The core principles hold up well: collect public data, respect technical access controls, minimize personal-data collection, honor robots.txt and machine-readable opt-outs, ban cookie replay outright, and document your reasoning as you go. The genuine complexity shows up at the intersections, when EU privacy law meets a US-drafted contract, when database rights overlap with a fair-use argument, when AI training turns simple data collection into model development, or when Indonesia’s corporate liability framework runs into a scraping pipeline built on cloud infrastructure in another country entirely.

In 2026, the ground is still moving. GPAI providers have been operating under the EU AI Act’s copyright obligations for about a year, Indonesia’s UU PDP enforcement is maturing, and the DMCA anti-circumvention theory being tested in Reddit v. Perplexity could reshape how courts treat technical bypass techniques once it’s actually decided. None of that is settled yet, which is exactly why documentation and technical restraint matter more than ever: build on the four pillars of access, data, contract, and jurisdiction, keep your compliance rationale in writing, and treat legal review as an engineering requirement rather than something you bolt on after a cease-and-desist letter arrives.

Leave a Comment