Web scraping isn't illegal in itself, and whether a given scrape is legal depends on the data it collects, the country the people and the scraper are in, and what the output is used for. If a page loads while you're logged out, does that mean you're free to copy, store, and sell everything on it? That's the gap where many scrapers get caught, because easy access answers only one legal question, and privacy, copyright, and contract law ask different ones.
Table of Contents
- The Short Answer by Country and Data Type
- How US Courts Treat Scraping Public Pages
- When GDPR Applies to Scraped Personal Data
- Other Countries and Laws to Check
- Terms of Service and robots.txt Explained
- Which Uses of Scraped Data Carry the Most Risk
- Polite Scraping Practices That Lower Your Risk
- Using Audit Trails and Price Quotes to Limit Exposure
- Decide Your Risk Before You Run a Scraper
The Short Answer by Country and Data Type
Web scraping is not illegal in itself. For any specific job, legality turns on three things, the type of data, the country where you and the people in the data sit, and what you do with the output. A page that's safe to read can still produce a dataset that's unsafe to publish or sell.
That's why asking Is web scraping legal about an entire website rarely gives a useful answer. One site can contain public prices, copyrighted reviews, and staff profiles on the same domain. You need to judge each field and each use, not label the whole domain legal or illegal.
How to read this table
Find the row that matches your situation first. Then check the exposure column before you run anything, because the main risk often sits outside the law that governs access.
| Situation | Typical legal position | Main exposure |
|---|---|---|
| US, public page with no login | Generally not a CFAA violation under the Ninth Circuit's hiQ v. LinkedIn ruling | Contract terms, copyright and state-law claims can still apply |
| US, page behind a login or password | Higher risk, since bypassing access controls is the core problem | Unauthorized-access claims and breach of terms |
| EU or UK, personal data | Lawful only with a lawful basis under GDPR or UK GDPR and transparency | Public visibility does not remove privacy obligations |
| EU or UK, non-personal facts such as prices or specifications | Generally lower risk | Database rights and website terms |
| Any country, copying protected text or images | Copyright risk | Reuse of expression rather than facts |
The exposure column names the main risk, not every risk. A US price scrape, for example, might clear the access question and still breach terms you accepted. An EU scrape of non-personal facts avoids most privacy duties, but it doesn't erase copyright or database rules.
Practical rule: Match your row, then ask what you'll do with the output. Internal analysis of prices and public resale of personal profiles sit at opposite ends of the risk scale, even when both start on public pages.
Two cautions apply to every row. First, public doesn't mean freely usable, it only describes how the page can be reached. Second, this article is general information, not legal advice, and the sections below explain each row so you can have a focused conversation with a lawyer when the stakes justify one.
How US Courts Treat Scraping Public Pages
Think of an open shop door and a locked office door. US computer access law cares mostly about which door you used. A page anyone can open in a normal browser is different, in the eyes of the Computer Fraud and Abuse Act (CFAA), from a page that demands credentials first.

The two cases that set the current US position
The CFAA targets access "without authorization", so courts had to decide whether visiting a public page against the owner's wishes counts. The Supreme Court narrowed the statute first. As the Ninth Circuit opinion in hiQ Labs v. LinkedIn records, the 2021 decision in Van Buren v. United States required a narrower interpretation of unauthorized access, and on April 18, 2022, the Ninth Circuit reaffirmed that collecting information from publicly accessible webpages generally does not violate the CFAA, even after a cease-and-desist notice.
The court's logic is plain. When a site is open to anyone with an ordinary web browser and has no authentication barrier, reading it isn't equivalent to "breaking and entering" a computer system. The owner objecting doesn't, by itself, turn public access into hacking under that one federal statute.
What hiQ doesn't give you
The ruling is narrower than many summaries suggest, and readers often overread it. Keep these limits in view:
- No blanket right to scrape: The decision addressed one federal anti-hacking statute, not every claim a site owner could bring.
- Other claims survive: Breach of contract, copyright, trademark, privacy, trespass to chattels, and state-law claims can still apply to the same scrape.
- Barriers still matter: The ruling doesn't make bypassing passwords, technical barriers, or access controls lawful.
- Geography matters: It's a Ninth Circuit decision, so don't assume every US court will reason the same way on different facts.
Say a retailer shows a price list to logged-out visitors. Collecting those prices is the kind of public access hiQ treated leniently under the CFAA. Now change one fact, the same list sits in a members-only directory and your scraper logs in with borrowed credentials or dodges a technical block. You've crossed from the open door to the locked one, and the analysis changes with it.
Before any US run, apply two questions to your exact target page. Is it open to anyone without credentials, and is there any barrier your scraper would need to get past? If the second answer is yes, stop and reassess rather than engineering around the barrier. Public data is materially safer under federal hacking law than restricted data, but safe access still doesn't grant unrestricted commercial reuse.
When GDPR Applies to Scraped Personal Data
EU and UK law ask a different first question. The GDPR, and the UK GDPR as the UK's parallel regime, don't start with whether a page is public. They start with whether you're processing personal data, meaning information that can reasonably be linked to an identifiable person.
A name alone might not identify anyone, but a name with an email address, a phone number, a photo, or a job history usually does. The European Data Protection Board guidance on web scraping states that GDPR-covered scraping can include collecting, storing, organizing, and retrieving personal data such as names, photographs, and contact details, so the duties begin at collection, not at publication.
Three questions your team must answer first
First, what's your lawful basis under Article 6? You need one before you collect, and public posting isn't the same as consent. Many organizations consider legitimate interest under Article 6(1)(f), but that requires a documented balancing assessment weighing your purpose against people's rights and reasonable expectations. It doesn't override competing rights or incompatible purposes, so write the assessment down rather than asserting it later.
Second, are you collecting only what the purpose needs? Purpose limitation and data minimization mean you define the purpose first, then take the fewest fields that serve it. If you're mapping companies, you probably don't need personal mobile numbers. Teams that want to sidestep this problem entirely can prepare datasets without EU personal data by excluding identifying fields at the design stage.
Third, can affected people be told, and can you act on their rights? Transparency duties may require informing individuals about the processing, and you'll need working routes for objection and deletion requests. That only functions if you can find a person's records across your raw files, enriched tables, and backups.
Public visibility doesn't remove privacy obligations in the EU or UK. A profile page anyone can read still contains personal data the moment you store and organize it.
Some data needs even more care. Special-category data, such as health information or political opinions, requires an extra condition under Article 9 on top of an Article 6 basis. If your scrape might sweep in those fields incidentally, filter them out at collection rather than deleting them weeks later.
Contrast two jobs. Scraping weather readings or product specifications involves no identifiable person, so GDPR and UK GDPR largely fall away. Compiling staff profiles for a sales list involves names, roles, photos, and contact details, so every duty above applies in full. The EDPB also recommends using reliable sources, recording timestamps, and validating scraped data, which supports the accuracy principle and helps when someone challenges a record. When a person later asks for deletion, your source and timestamp records are what let you locate every copy and prove you removed it.
Other Countries and Laws to Check
A single scrape can touch several legal systems at once. The relevant law may follow where each affected person lives, where your business operates, and where the output is used, so a US company scraping Brazilian profiles for Canadian customers has three sets of rules to consider, not one.
National privacy laws you may meet
- Canada's PIPEDA: Governs how private-sector organizations collect, use, and disclose personal information in commercial activity, generally around consent, identified purposes, and safeguards.
- Australia's Privacy Act 1988: Sets privacy principles for handling personal information, including collection notices and limits on use and disclosure.
- Brazil's LGPD: Requires a legal basis for processing personal data and gives individuals rights over their information, in a framework closer to the GDPR model.
- Japan's APPI: Regulates businesses handling personal information, with rules on purpose specification, security, and transfers to third parties.
- India's Digital Personal Data Protection Act 2023: Centers on consent and notice for digital personal data, with duties for the organizations that determine how it's processed.
Copyright and database rights also differ by country. Some systems protect only original expression, while others protect the investment behind a compiled collection of facts, which can make copying a whole structured catalog riskier than taking scattered individual values.
Use a short checking routine for each new source. List every country where the data subjects, your operator, and your users sit, then find each national data protection authority's guidance. Note the rules on consent or other legal bases and on cross-border transfer, and record which rule you checked and when. Where the position is unclear, get local legal advice before running the scraper, not after the dataset is built.
Terms of Service and robots.txt Explained
These two controls look similar, both are text files that say what a site allows, but they work through different legal routes. Confusing them leads teams to treat a contract as a suggestion, or a suggestion as a statute.
Terms of service are a contract question
Terms of service can form a contract between you and the site operator. Breaching them can create a civil claim even where computer access law doesn't apply, which is why a scrape can pass the CFAA question and still fail on contract grounds.
Two things decide most disputes. Did you accept the terms, through a click-through agreement or by using the site after clear notice? And does the wording cover automated access, scraping, or commercial reuse? A ban you clicked past when creating an account is far harder to argue with than a footer link you never saw, though neither situation is automatic.
Say a marketplace bans scraping in its terms but sells a paid API with the same data. That API offer matters, because the owner can point to a licensed route you chose to bypass. Site owners face the mirror-image problem, which is why guides on protect your Shopify store content pair clear terms with technical controls rather than relying on wording alone.
robots.txt is an instruction, not a law
A robots.txt file is a machine-readable request to crawlers, not a statute by itself. Still, ignoring it can be used as evidence that you knew the limits and proceeded anyway, and it often signals where the owner will enforce terms or technical blocks.
Reading one takes a minute:
- User-agent: Names which crawlers the following rules apply to, with a wildcard covering everyone.
- Disallow: Lists paths crawlers are asked not to fetch, such as search results or account areas.
- Crawl-delay: Requests a minimum pause between requests, where the site supports it.
Say a retailer disallows /search but allows product pages. The sensible reading is that product data is open to polite crawling while the expensive search endpoint isn't, so you build your URL list another way. Record the file you checked, the terms version you read, and the date, so the decision can be defended later if the site changes its rules or challenges your run.
Which Uses of Scraped Data Carry the Most Risk
Collection is only half the story. A scrape can be acceptable to run and still risky to publish, sell, or feed into a model, because separate legal regimes attach to the output. A National Law Review analysis of AI scraping disputes makes the point directly, public-data scraping may avoid an unauthorized-access claim in some US cases, while copyright, contract, privacy, database, or consumer-protection claims remain possible.
Risk by use, lowest to highest
| Use of scraped data | Main risk | What to check |
|---|---|---|
| Factual fields such as prices or stock levels | Lower | Website terms and database rights |
| Reproducing articles, reviews or images | High | Copyright and licence terms |
| Building profiles of named people | High | GDPR or local privacy law |
| Training an AI model | Medium to high | Purpose, licence and any personal data |
| Reselling a dataset | High | Contracts, database rights and GDPR if personal data is included |
The dividing line in the first two rows is facts versus expression. A price is a fact, nobody owns the number itself. A full review text, a product photo, or a written description is protected expression, so reproducing it needs a licence or a solid exception. Extracting the rating from a review and republishing the review are different acts with different exposure.
Profiles and resale raise the stakes because they multiply who is affected. Building profiles of named people triggers privacy duties for every person included, and reselling a dataset passes your compliance problems to a buyer who'll expect warranties you may not be able to give. In the EU and UK, database rights can also protect the structure of a compiled dataset, so copying the whole organized collection can infringe even when each individual fact is free to use.
AI training sits in the middle of the table because it mixes everything. Training on factual fields is one thing, training on expressive text, images, or personal data is another, and the purpose you declared at collection may not cover model training at all. Purpose limitation means a dataset gathered for price monitoring doesn't automatically become lawful training material.
Sorting question: If someone else reused this output the way you plan to, would it harm the site, its owner, or the people it describes? If yes, check the relevant law before that use, not after.
Extracting factual fields, reproducing expressive content, building profiles, training an AI system, selling a dataset, and making automated decisions each present materially different risks. Sort your use into the table based on its riskiest feature rather than its average one.
Polite Scraping Practices That Lower Your Risk
Good manners and good compliance overlap more than expected. Slow, identified, limited crawling is less likely to harm a site, less likely to trigger blocks, and easier to defend if the owner complains.

The seven-step checklist
- Check robots.txt: Read the User-agent rules, Disallow paths, and any Crawl-delay before the first request, so your crawler starts inside the owner's stated boundaries.
- Read the terms: Look specifically for clauses on automated access and commercial reuse, and save a dated copy of what you read.
- Set a rate limit: Start at one request per second per domain and slow down when the site responds sluggishly, because a crawler that degrades a site invites harm-based claims.
- Identify your bot: Use an honest user agent with a real contact address, so an operator can reach you instead of just blocking or suing you.
- Minimize fields: Collect only the fields your purpose needs and drop personal fields you don't, which cuts privacy exposure at the source.
- Log the run: Record URLs, times, account state, and restrictions observed, so you can show what happened.
- Set a retention period: Decide in advance when raw data gets deleted, and delete it on schedule rather than keeping everything forever.
Two habits support the whole list. Cache pages so you never fetch the same URL repeatedly for the same job, and schedule large runs outside the site's peak traffic hours where you can. Both reduce load, which is the harm site owners most often point to first.
Never bypass logins, CAPTCHAs, paywalls, or IP blocks to keep a job moving. A block is the site enforcing a boundary, and rotating addresses to defeat it converts a polite crawl into the barrier problem US courts treat seriously. If a site objects, by email, block, or letter, pause the run, review your records, and respond in writing before deciding whether any narrower version of the job can continue. Stopping promptly is itself evidence of good faith, and it preserves options that plowing ahead would destroy.
Using Audit Trails and Price Quotes to Limit Exposure
Rules tell you what you meant to do. Records show what you did, and in any dispute the second matters more. A defensible run file holds the source URL, time of access, whether the page was public or behind a login, which restrictions were observed, the fields collected, and who approved the use.

The strongest version is an append-only log where each record links to the one before it. Any edit breaks the chain, so the history can't be rewritten without detection, and a run can be replayed step by step. That turns "we think the page was public" into a verifiable sequence a regulator, partner, or court can inspect.
Quote-before-run adds a checkpoint at the other end. The scope and cost of a call are shown before it executes, so a team can stop a job that's out of scope, larger than intended, or aimed at the wrong source while stopping is still free. We built looot as one example of this pattern, a pay-per-call data layer for AI agents that displays the price before each run and records inputs, providers, and outcomes in a linked ledger. Our terms also prohibit illegal scraping, bypassing rate limits, reselling access without an agreement, and interfering with the gateway, providers, or other customers, because a shared gateway only stays usable if everyone respects those boundaries.
Be clear about the limit, though. Logs and quotes show good faith and make decisions reviewable, and that linked record is the most practical defence a team controls. They do not make an unlawful scrape lawful.
Decide Your Risk Before You Run a Scraper
Run every new job through three gates, in order, and treat the result as a decision rather than a legal opinion.
Gate one, personal data. Does the target include personal information? If yes, complete a documented GDPR, UK GDPR, or local privacy assessment for the relevant country before running.
Gate two, access controls. Is the target behind a login, password, CAPTCHA, or other access control? If yes, stop. That is a no-go, not a technical puzzle to solve.
Gate three, commercial output. Is the output for commercial resale, publication, or AI training? If yes, check contracts, copyright, and database rights first, and remember that even winning a dispute leaves practical fights such as collecting money after winning a lawsuit, so avoiding the dispute is worth the early paperwork.
If all three gates clear and the terms allow automated access, proceed with the polite practices and keep a written record. Scraping at scale on looot starts from $0.0035 per call, so a small test costs little. Your first action today is a simple list, each target source with its robots.txt status, terms status, data type, and intended use, then one small, logged, quoted test run before you scale. Rules change by country, this article is general information and not legal advice, and any personal data or commercial resale deserves a lawyer's review in each relevant country.
When you're ready to run that first logged test, looot gives your AI agents one key for thousands of data operations, with the price quoted before every call and each run written to a verifiable ledger you can audit later. Start with one small, in-scope job, check the record it produces, and scale only when the paperwork looks as clean as the data.



