---
title: "Is web scraping legal? A practical guide for 2026"
description: "Public data, terms of service, GDPR and CCPA, copyright and robots.txt: what makes web scraping legal or risky, with a practical checklist for teams."
url: https://scrapecrate.com/blog/is-web-scraping-legal
markdown: https://scrapecrate.com/blog/is-web-scraping-legal.md
---

# Is web scraping legal? What developers need to know

Public data, terms of service, GDPR and CCPA, copyright and robots.txt: what makes web scraping legal or risky, with a practical checklist for teams.

Published November 29, 2026 · 8 min read

"Is web scraping legal?" is one of the first questions every team asks before building on scraped data, and the honest answer is: it depends on what you scrape, how you scrape it and what you do with it. Reading public web pages with a program is, in general, not illegal. Plenty of legitimate businesses run on it, from search engines to price comparison sites to academic research. But several bodies of law can still apply to a scraping project, and a few habits make the difference between a defensible project and a risky one.

This guide walks through the questions that matter in practice. It is general information written for developers and product teams, **not legal advice**: laws differ by country and change over time, and for anything high stakes you should talk to a lawyer who knows your jurisdiction.

## The four questions that decide most cases

Almost every scraping question comes down to four things:

1. **Access.** Is the data publicly reachable, or did you have to log in, pay, or get around a technical barrier to see it?
2. **Content.** Is it facts, personal data, or creative work protected by copyright or database rights?
3. **Method.** Did you respect the site's stated rules and load, or did you hammer it with requests?
4. **Use.** Are you analysing it internally, or republishing it, selling it, or using it to contact people?

Low risk on all four (public, factual, polite, internal analysis) is where most market research, price monitoring and review analysis sits. Risk grows with every answer that moves the other way.

## Public pages versus logged-in data

The clearest line in most jurisdictions is between public pages and data behind authentication. Pages anyone can open without an account are the safest ground. Courts in the United States, in the long running dispute between a professional network and a data analytics company over public profiles, took the view that scraping publicly accessible pages is not "unauthorised access" under the federal computer crime law, while other claims, such as breach of contract, remained open.

Data behind a login is different. To log in you usually accept terms of service, and those terms often forbid automated access. Bypassing a paywall, a CAPTCHA or an IP block, or using someone else's credentials, moves a project from "reading the web" towards "breaking in", which is where criminal and civil liability start to look real.

A practical rule: **only collect what a visitor without an account could see**. That is also how the ScrapeCrate APIs work: they read public pages and public listings, never content behind a user's login.

## Terms of service

Most websites forbid scraping in their terms. Whether those terms bind you depends on whether you agreed to them. A "browsewrap" link in the footer is weaker than a "clickwrap" box you ticked when you created an account. If you have an account on a site and its terms forbid automated access, scraping it with that account is a contract problem even when the data is public.

Terms also matter for what you do afterwards. Many platforms allow viewing but restrict commercial reuse or redistribution. Read the terms of the sources you rely on most, and be more careful the more your product depends on a single source.

## Personal data: GDPR, CCPA and friends

This is where most real-world risk lives. A name, a username, a photo, a review signed with a handle, a phone number of a sole trader: all of these can be personal data. Under the EU and UK GDPR, **public personal data is still personal data**. Collecting it needs a lawful basis (for scraping, usually legitimate interests, backed by a written balancing test), a specific purpose, minimisation, a retention limit and a way to honour objections and access requests. Data protection authorities have fined companies that built large databases of scraped profiles and faces without any of this.

In the United States, California's CCPA and similar state laws give consumers rights over their personal information and require notices, though they treat publicly available information more leniently than GDPR does. Other countries, from Brazil to Canada, have their own rules.

What this means in practice:

- **Prefer aggregates.** Sentiment per month, average rating per location and the top complaints in reviews need no names. Drop author fields you do not use.
- **Business data is lower risk than people data.** A restaurant's address and opening hours from [Google Maps](https://scrapecrate.com/blog/how-to-scrape-google-maps.md) are not the same as the reviewers' profiles.
- **Do not republish personal data next to its context.** Quoting a review in an internal report is very different from building a public page about the reviewer.
- **Be careful with outreach.** Scraping contact details to send cold emails touches marketing and e-privacy rules on top of GDPR. Our [lead generation guide](https://scrapecrate.com/blog/lead-generation-scraper.md) focuses on business listings for that reason.
- **Never collect special categories** (health, religion, politics, sexual orientation) unless you have specific legal grounds and advice.

## Copyright and database rights

Facts are not protected by copyright: a price, a rating, an opening time or a view count belongs to nobody. Expression is: an article, a photo, a video and the text of a long review can all be protected. Scraping protected content for internal analysis is treated more leniently than copying it into your own product.

Two regimes deserve a mention:

- **The EU database right** protects databases built with substantial investment. Extracting a substantial part of one, or repeatedly extracting small parts that add up, can infringe it even if each item is a fact.
- **Text and data mining exceptions.** EU law allows text and data mining of lawfully accessible content, for research and, for commercial purposes, unless the rights holder has reserved those rights in a machine-readable way, robots.txt being the usual example. In the US, the same ground is argued under fair use, and several cases about training AI models on scraped content are still working their way through the courts.

If you are building a dataset for an LLM, keep the source URL of every document, honour opt-outs and avoid storing more of the original text than you need. Our guide to [scraping for LLM and RAG](https://scrapecrate.com/blog/web-scraping-for-llm-rag.md) shows how to keep that provenance.

## robots.txt and polite scraping

robots.txt is a plain text file where a site says which paths automated clients should not visit. It is not a law in most countries, but it is the site owner's stated wish and, under the EU mining rules above, a recognised way to reserve rights. Ignoring it rarely helps you if anything goes wrong.

The same goes for load. Sending thousands of requests a second can degrade a site for its real users, and in some jurisdictions overloading a server has been treated as trespass to chattels or as an attack. Polite scraping means:

- reasonable request rates and backoff on errors,
- caching, so you never fetch the same page twice without reason,
- an identifiable user agent when you crawl from your own infrastructure,
- stopping when the site clearly asks you to.

Using a managed API moves the operational part of this off your plate: the provider handles rates, retries and caching across all its users. It does not move the legal responsibility for what you collect and how you use it, which stays with you. Our [terms](https://scrapecrate.com/terms.md) and [privacy policy](https://scrapecrate.com/privacy.md) describe what we do on our side.

## A practical checklist

Before you start a scraping project, write down the answers to these questions. If you cannot, that is your signal to slow down.

1. **What exactly do we collect, and why?** List the fields and the business purpose for each.
2. **Is every source public?** No logins, no paywalls, no bypassing of blocks.
3. **Do we hold an account on the source?** If yes, read its terms on automated access.
4. **Is any of it personal data?** If yes: lawful basis, minimisation, retention period, how we handle objections and access requests.
5. **Can we use aggregates instead?** Drop names and handles you do not need.
6. **Is any of it copyrighted content?** Store only what the analysis needs, keep the source and do not republish it wholesale.
7. **Do we respect robots.txt and reasonable rates?**
8. **Where is the data stored and who can see it?** Access control and deletion are part of compliance.
9. **What happens if a source or a person asks us to stop?** Have an answer before they ask.

Most projects that analyse public business data, reviews in aggregate, search results, ads or public posts pass this checklist without trouble. The ones that do not usually fail on question 4.

## Where scraping is clearly fine, and where it is not

Generally low risk: price and product monitoring, analysing reviews of your own and competitors' products in aggregate, tracking [ads in public ad libraries](https://scrapecrate.com/blog/facebook-ad-library-api.md), collecting [Google search results](https://scrapecrate.com/blog/google-search-api) for SEO, reading public business listings, summarising public videos and posts for research.

Generally high risk: scraping behind a login, collecting profiles of individuals at scale, harvesting emails for unsolicited marketing, republishing copyrighted content, building facial recognition datasets, and anything designed to get around a site's technical protections.

If you want to compare providers on how they handle these issues, our guide to the [best web scraping API](https://scrapecrate.com/blog/best-web-scraping-api.md) lists the questions worth asking.

Ready to build on public data the careful way? [Create a free account](https://scrapecrate.com/auth/sign-up), read the [documentation](https://scrapecrate.com/docs.md) and start with the 100 free credits of the month.

## Frequently asked questions

**Is web scraping illegal?**

Not as such. Reading publicly available pages with a program is generally lawful in most jurisdictions. What can make a project unlawful is what you collect (personal or copyrighted data), how you get it (bypassing a login or a technical block) and what you do with it afterwards.

**Is scraping public data always allowed?**

Public is not the same as free to use. Public personal data is still personal data under GDPR, copyrighted text is still copyrighted, and a site's terms may bind you if you accepted them. Public means you can usually read it; reuse needs its own check.

**Do I have to follow robots.txt?**

In most countries robots.txt is not a law, but it states the site owner's wishes, and ignoring it weakens your position if a dispute ever happens. Under the EU copyright rules on text and data mining it is also one of the recognised ways to reserve rights. Respecting it is the safe default.

**Can I scrape personal data for lead generation?**

Business data such as a company's name, address, phone and website is usually low risk. Data about individuals needs a lawful basis under GDPR, a clear purpose, minimisation and a way to honour objections. Get advice before you email people you scraped.

**Does using a scraping API make me compliant?**

No. An API handles the technical side, polite request rates and maintenance, but you remain responsible for what you collect and how you use it. Our terms and privacy policy describe what we do on our side.

## Try it with free credits every month

One API key for every source in this guide. No card needed, and only successful calls are billed.

[Create a free account](https://scrapecrate.com/auth/sign-up) [Read the docs](https://scrapecrate.com/docs.md)

## Related guides

- [How to choose the best web scraping API What makes a web scraping API good in 2026, how per-request, credit, bandwidth and compute pricing compare, and when one API for every source wins.](https://scrapecrate.com/blog/best-web-scraping-api.md)
- [Build a lead generation scraper with Google Maps, websites and reviews A lead generation scraper in Python and JavaScript, from Google Maps search to each business's website and reviews, with costs per 1,000 leads.](https://scrapecrate.com/blog/lead-generation-scraper.md)
- [Web scraping for LLMs, from web pages to a RAG index Turn web pages into clean Markdown and YouTube videos into timestamped chunks, then embed them for retrieval. A full RAG ingestion pipeline in Python.](https://scrapecrate.com/blog/web-scraping-for-llm-rag.md)

[← All guides](https://scrapecrate.com/blog.md)
