Web Scraping
Arslan
ArslanMar 12, 2026

Is web scraping legal? It depends on your access method and downstream use. Get the Green/Yellow/Red risk framework, a 7-jurisdiction matrix, and 2026 case law.

Is Web Scraping Legal? Avoid the Costly Mistakes

Are you building a data pipeline or a legal liability? Every day, engineering teams deploy automated crawlers under the false assumption that if a webpage loads in a browser, the data is free for the taking. This mistake destroys startups and triggers massive class-action lawsuits. Before you write a single line of code, you need a defensible compliance framework for web scraping.

Yes, web scraping can be legal when extracting publicly accessible, factual data for internal use. However, web scraping can become illegal if you bypass authentication barriers, breach explicit website Terms of Service, extract protected personal data, or mass-download copyrighted material to train commercial AI models. Your legal risk depends entirely on your access method and downstream data usage.

Irresponsible data extraction carries immediate real-world consequences. In April 2025, the Wikimedia Foundation reported a 50% bandwidth surge from scraper bots pulling multimedia content for AI models. Legitimate automation requires strict discipline.

This guide provides a definitive Green, Yellow, and Red compliance framework to evaluate your risk before deployment.

Key Takeaway: Stop viewing web scraping as a single legal event. A compliant pipeline must survive two distinct legal tests: how you acquire the data and what you do with it.

Many data engineers falsely assume "publicly available" means "legally unrestricted." Scraping carries two distinct legal layers.

  1. The Collection Layer: How did you get the data? Did you trespass on private servers? Did you bypass a CAPTCHA? Did you breach an explicit user agreement by scraping while logged in? Accessing data without logging in weakens certain breach-of-contract arguments. Bypassing a paywall practically guarantees liability.
  2. The Reuse Layer: What happens to the payload? Getting the data safely does not give you ownership. If your end use violates copyright laws, trains competing generative AI models, or resells protected personal profiles, you face severe legal exposure regardless of how cleanly you extracted it.

Guidance like the U.S. Copyright Office's Part 3 Generative AI Training report (pre-publication May 9, 2025) signals that taking copyrighted expression to train directly competing AI models creates substantial infringement risk.

The Green, Yellow, Red Compliance Framework

Sort every scraping job into a risk tier before you deploy. Green jobs ship with standard safeguards; Red jobs need counsel first.

Use the table below to triage a pipeline in seconds. Score the job by its riskiest attribute, not its average.

Risk TierAccess MethodData PayloadDownstream UseAction Before Deploy
Green (proceed)Public, logged-out pagesFactual fields (prices, specs, dates)Internal analytics, price monitoringStandard safeguards: rate limits, honest user-agent
Yellow (review)Public pages with weak browsewrap termsMixed facts and light expressionRepublished datasets, aggregation productsLegal review of terms and reuse; enforce data minimization
Red (stop)Behind login, paywalls, or bypassed controlsPersonal data, biometrics, copyrighted expressionCommercial AI training, direct resale, lead listsEngage counsel before any collection

The framework maps directly to the six operational factors below. A single Red attribute pushes the whole job into the Red tier.

The 6-Factor Web Scraping Legality Checklist

Score your crawler against these six operational factors before launch. A single failure in any category escalates your legal risk from negligible to severe.

Do not wait for an IP ban to evaluate your pipeline. Use this framework to assess your risk profile.

  • Access Method: Public, logged-out pages present the lowest risk. Authenticated spaces, paywalls, and API token environments trigger immediate contractual and anti-hacking laws.
  • Terms of Service (ToS): Did you form a contract? Creating an account or clicking "I Agree" legally binds you to the site's rules. Violating those terms transforms a standard extraction job into a direct breach of contract.
  • Data Payload Type: Factual fields like prices, dimensions, and dates carry lower copyright risk. Expressive content like articles, user reviews, and proprietary code carry high copyright risk.
  • Personal and Biometric Data: Scraping names, emails, faces, or voiceprints triggers strict regulatory frameworks. The Clearview AI settlement (valued by the court at about $51.75 million) showed that unconsented biometric scraping can create massive liability.
  • Downstream Use: Internal analytics and price monitoring rarely cause disputes. Building a direct competitor, reselling the raw database, or training commercial AI models heavily escalates exposure.
  • Operational Burden: Crawlers that send millions of concurrent requests degrade server performance. Aggressive traffic invites tort claims like "trespass to chattels."

Core Web Scraping Laws Governing Data Extraction

Web scraping compliance spans federal anti-hacking statutes, copyright protections, state privacy laws, and common-law contracts.

The CFAA and Unauthorized Access

The Computer Fraud and Abuse Act (CFAA) serves as the US federal anti-hacking statute. It penalizes accessing a computer "without authorization." While accessing public data generally avoids CFAA violations, bypassing authentication or breaching secure API endpoints firmly violates this law.

The Supreme Court narrowed the statute in Van Buren v. United States (2021). The Court held that a person "exceeds authorized access" only by obtaining information from areas of a computer that are off-limits. A mere Terms of Service breach is therefore not a CFAA crime. The statute requires bypassing an actual access control, not misusing access you already hold.

DMCA Anti-Circumvention

When a site uses technological measures to protect its content (CAPTCHAs, tokenized access, IP rate limits) and you engineer a workaround, you risk violating Section 1201 of the DMCA.

Copyright law protects original expression, not raw facts. Extracting a product's price or SKU is generally lower risk. Copying a detailed product description or proprietary imagery crosses into infringement.

Clickwrap vs. Browsewrap: Which Terms Actually Bind You

Not every posted policy forms an enforceable contract. Courts treat two agreement types very differently.

  • Clickwrap: The user ticks a box or clicks "I Agree" before proceeding. Courts strongly enforce these terms as binding contracts.
  • Browsewrap: The terms sit behind a footer link with no affirmative action. Courts often refuse to enforce them unless the site proves the user had actual or constructive knowledge.

Anonymous, logged-out scraping that never touches a clickwrap prompt weakens a site's breach-of-contract claim. If you never formed the contract, you cannot easily be held to it.

Global Privacy Laws (GDPR, CCPA, BIPA)

Personal data changes everything.

  • Scraping EU citizen data triggers the GDPR.
  • Extracting California consumer data triggers the CCPA.
  • Scraping facial recognition data without explicit consent triggers Illinois's severe BIPA statute.

The EU AI Act (2026)

The EU AI Act writes training-data transparency and a facial-scraping ban into law. This raises the stakes for AI builders who scrape at scale.

The EU AI Act adds obligations that go well beyond older copyright rules. General-purpose AI (GPAI) providers now face specific disclosure and copyright duties.

  • Training-data summary: GPAI providers must publish a summary of training-data sources, including the top 10% of domain names used. SMEs may report the top 5% or the top 1,000 domains.
  • Copyright opt-outs: Providers must respect opt-outs under the EU Copyright Directive's text-and-data-mining exception (Article 4) and describe their crawler behavior.
  • Output labeling: Providers must label AI-generated output.
  • Article 5 facial-scraping ban: The Act bans untargeted scraping of facial images from the web or CCTV to build facial-recognition databases. This writes the Clearview pattern into law.

Robots.txt Compliance Signals

Respecting robots.txt is standard good-faith engineering. It acts as an operational boundary. In jurisdictions like the EU, machine-readable opt-outs can also operate as formal rights reservations against text-and-data-mining for AI.

Landmark Web Scraping Cases Every Developer Should Know

Read legal precedents for their specific fact patterns. One ruling rarely answers every data collection scenario.

hiQ Labs v. LinkedIn (2022) — Core takeaway: The Ninth Circuit held that scraping publicly accessible data likely does not violate the CFAA. This is an important but narrow precedent. It protects against specific hacking claims but offers zero protection against copyright, privacy, or infrastructure burden lawsuits.

Meta v. Bright Data (N.D. Cal., 2024) — Core takeaway: Public, logged-off scraping falls outside logged-in Terms of Service. On January 23, 2024, Judge Edward M. Chen granted Bright Data summary judgment, holding that Meta's terms govern logged-in "use" only. Bright Data did not "use" Facebook when it scraped public logged-off pages after terminating its accounts. Meta dropped the suit in February 2024, reinforcing the hiQ line.

Van Buren v. United States (SCOTUS, 2021) — Core takeaway: A Terms of Service breach alone is not a CFAA crime. The Court held that "exceeds authorized access" covers obtaining off-limits information, not misusing otherwise-authorized access. Scrapers of public pages gained a strong federal shield against anti-hacking claims.

Thomson Reuters v. Ross Intelligence — Core takeaway: Downstream use matters. Ross used Westlaw headnotes to build a competing AI legal research tool. In February 2025, the court granted Thomson Reuters summary judgment on fair use for the headnotes at issue, underscoring how downstream AI training and direct commercial competition can sharply escalate copyright risk.

Power Ventures v. Facebook (9th Cir., 2016) — Core takeaway: A cease-and-desist letter can revoke authorization. The Ninth Circuit held that continued scraping after such a letter can constitute unauthorized access under the CFAA. This stricter, pre-hiQ view shows why ignoring a formal notice raises your exposure.

Ryanair DAC v. Booking Holdings Inc. — Core takeaway: Public logged-out access differs entirely from credentialed access. In July 2024, a Delaware jury found for Ryanair on a CFAA theory tied to the authenticated myRyanair environment; in January 2025, the court set aside the verdict because Ryanair did not prove the statute's $5,000 civil-loss threshold. The litigation still shows why credentialed access creates much higher risk.

Your legal risk fluctuates wildly depending on what your product actually does with the extracted information.

Low-Risk Use Cases

  • Price Monitoring: Extracting public pricing facts for market research is generally lower risk, provided you enforce rate limits and avoid logged-in states.
  • Internal Analytics: Keeping derived datasets internal for operational benchmarking is significantly safer than republishing them.

High-Risk Use Cases

  • AI Training Datasets: Scraping expressive content to train generative models heavily implicates copyright law. The May 2025 U.S. Copyright Office Part 3 report signals that using unlicensed material to generate competitive expressive outputs is unlikely to qualify as fair use.
  • Lead Generation: Scraping names, emails, and phone numbers triggers privacy frameworks (GDPR, CCPA) and often violates platform-specific anti-harvesting policies.
  • Direct Commercial Resale: Harvesting a site's proprietary data to build a direct substitute product invites aggressive litigation.

Data flows across borders. Understand the compliance rules of the state or country where your target data originates before you collect it.

Legal exposure shifts sharply by jurisdiction and by data category. The matrix below compares seven major jurisdictions across four common payload types.

JurisdictionPublic Business DataPublic PIIBehind-Login DataCopyrighted Expression
United StatesLow risk (hiQ, Van Buren)Medium (CCPA, BIPA on biometrics)High (CFAA, contract)High (fair-use disputes)
European UnionLow to mediumHigh (GDPR applies immediately)HighHigh (DSM Directive, AI Act)
United KingdomLow to mediumHigh (UK GDPR)HighHigh (UK CDPA)
CanadaLow to mediumMedium to high (PIPEDA)HighMedium to high
AustraliaLow to mediumMedium (Privacy Act)HighMedium to high
JapanLowMedium (APPI)HighLower (TDM exception)
BrazilLow to mediumHigh (LGPD)HighMedium to high

Two patterns hold across every jurisdiction: public personal data almost always raises privacy risk, and behind-login access almost always raises access risk.

Yes, generally. US legal analysis revolves around the CFAA for access violations, common law for contract breaches, and federal copyright law. State laws like California's CCPA and Illinois's BIPA heavily overlay these federal rules when personal data is involved.

The EU operates under highly restrictive frameworks. Scraping personal data triggers the GDPR immediately. The Digital Single Market (DSM) Directive lets rights holders reserve text-and-data-mining rights using machine-readable means. The EU AI Act adds GPAI training-data disclosure and the Article 5 facial-scraping ban on top of these rules.

Engineering Safeguards: Ensuring Web Scraping Compliance

Legal safety requires strict technical implementation. You must control request rates, minimize payloads, and maintain precise audit logs.

Pre-Scrape Configuration

  • Define the strictly required fields and drop all unnecessary data points.
  • Classify the data type (Fact, Expression, or PII).
  • Ensure your access relies solely on a logged-out state.

Execution Safeguards

  • Implement conservative rate limits and backoff logic.
  • Identify your bot honestly via clear user-agent strings.
  • Do not bypass technical controls or IP blocks.
  • Run regex filters to drop standard PII (emails, phone numbers) at the ingestion layer before the data ever hits your database.

Enforce Data Minimization With Schema-Defined Extraction

The strongest technical control is collecting less. Olostep's /parsers endpoint returns schema-defined, structured JSON, so you extract only the fields you name and never over-collect. Request the factual fields your use case needs, and the response omits everything else.

The request below asks for three factual fields from a public product page and nothing more.

bash
curl -X POST https://api.olostep.com/v1/parsers \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url_to_scrape": "https://example.com/products/widget-123",
    "schema": {
      "product_name": "string",
      "price": "number",
      "sku": "string"
    }
  }'

The endpoint returns clean JSON limited to the requested fields. No descriptions, reviews, or personal data enter your pipeline.

json
{
  "status": "completed",
  "data": {
    "product_name": "Stainless Steel Widget",
    "price": 24.99,
    "sku": "WID-123"
  }
}

For factual monitoring at scale, the /batches endpoint accepts 100 to 100k or more URLs and returns content in minutes. You can run wide, logged-out, facts-only jobs without building browser infrastructure yourself.

Auditability and Proof

In a legal dispute, you need documentation. Log the target robots.txt snapshot, the Terms of Service review date, your request configurations, and your automated deletion schedules. Schema-defined extraction helps here too: the schema itself is a written record of exactly which fields you collected.

How to Handle a Cease-and-Desist Letter

A cease-and-desist is a formal warning. Stop the operation immediately, preserve your logs, and assess your legal position objectively.

Ignoring a legal notice demonstrates willful disregard, escalating potential damages in court. Take the following steps:

  1. Pause the workflow: Halt the specific crawler mentioned in the letter immediately.
  2. Preserve evidence: Lock down your audit trails, request settings, internal review notes, and the state of the target's robots.txt at the time of extraction.
  3. Map the complaint: Run the complaint against the 6-factor framework above.
  4. Escalate to counsel: Never rely purely on engineering judgment if the dispute involves personal data, AI model training, or bypassed paywalls.

Public access mitigates hacking claims under the CFAA, but it does not grant universal immunity. You still face severe legal exposure if you extract copyrighted content, collect personal data, or create massive server disruption.

When is web scraping illegal?

Web scraping becomes illegal when you bypass authentication barriers, breach explicit user contracts, copy protected expressive content for commercial AI training, or extract protected biometric data without explicit user consent.

Can you legally scrape data for AI training?

Training AI on scraped data introduces massive copyright risk. While extracting factual points is generally safer, scraping expressive content like articles, books, or code to train commercial generative models is currently the subject of heavy litigation and regulatory scrutiny.

Are Terms of Service legally binding for scrapers?

It depends on the agreement type. Courts strongly enforce clickwrap terms, where you tick a box or click "I Agree." Browsewrap terms behind a footer link are far weaker and often unenforceable unless the site proves you knew about them.

Can web scraping be detected?

Yes. Sites detect scrapers through traffic-pattern analysis, browser fingerprinting, and request-rate tracking. Sudden request spikes, missing browser headers, and repetitive access from one IP range all flag automated traffic. Conservative rate limits, honest user-agent strings, and residential IP rotation reduce these signals.

Is ignoring robots.txt illegal?

Ignoring robots.txt is not a standalone federal crime in the US, but it serves as strong evidence of bad faith. In jurisdictions like the EU, machine-readable opt-outs can carry formal legal weight.

Final Takeaway: Responsible Automation Beats Risky Extraction

Is web scraping legal? Yes, provided you operate within strict, defensible boundaries. Publicly available data is a starting point, not a safe harbor.

To build sustainable web data pipelines, you must classify your access methods, segregate low-risk facts from high-risk expression, limit your collection payload, and maintain exhaustive audit logs of your operational behavior.

Disclaimer: This guide helps engineering and product teams assess compliance frameworks. It does not replace formal legal advice for high-risk data collection.

About the Author

Arslan Ali

Co-Founder, Olostep · San Francisco, CA

Arslan is the co-founder of Olostep, a web data infrastructure platform that helps developers and teams access, extract, and structure web data at scale. He works closely on the product and technology behind Olostep, with a focus on building reliable infrastructure for web scraping, search APIs, and structured web data.

Read more