In 2022, a court handed hiQ Labs a famous win for scraping public LinkedIn profiles. Eight months later, hiQ agreed to a $500,000 judgment and a permanent ban on scraping LinkedIn.
Same company. Same data. Two very different headlines.
That's the real answer to "is web scraping legal?" Scraping itself isn't banned in the US, the EU, the UK or India. But four separate bodies of law can still bite, and "the data was public" only answers one of them.
I've compared scraping tools like Firecrawl and Apify on this blog. For this guide, I read the rulings, the regulator guidance and the standards themselves.
Some links here are affiliate links. They don't change your price.

Is web scraping legal? The short answer
In most places, using software to read and copy publicly visible web pages is not illegal in itself. No major jurisdiction I looked at has a law that says "scraping is banned."
The risk comes from what surrounds the scraper.
How you got in. What you agreed to. What you copied. And whose data it was.
Most people get this wrong in one specific way. They treat "public" as a green light for everything. It's a green light for one question, the access question, and mostly in the US. It says little about contracts, copyright or privacy law.
So the useful question isn't "is scraping legal?" It's "which of the four layers does my project touch?"
Which laws actually apply when you scrape a website?
Think of a scraping project as passing through four checkpoints. Each one is a different area of law, with different courts and different penalties.

- Access: did you get past a gate you weren't allowed through? In the US, that's the Computer Fraud and Abuse Act (CFAA).
- Contract: did you accept terms of service that forbid automated collection, and then break them?
- Copyright and database rights: are you copying creative content, or a substantial part of a protected database?
- Personal data: does what you collect identify real people? Then GDPR, the UK GDPR or India's DPDP Act may apply.
A price tracker reading product pages touches mostly the first three layers. A lead-gen tool pulling names and emails touches all four, and the fourth is where regulators are most active right now.
Keep this model in mind. Every section below is one of these layers.
Is scraping public data legal in the US after hiQ and Meta v. Bright Data?
On the access layer, the US courts have moved in scrapers' favour. On the contract layer, the picture is mixed.
Start with Van Buren v. United States, decided by the Supreme Court on 3 June 2021. The Court read the CFAA's "exceeds authorized access" clause narrowly.
It asks whether you entered parts of a computer that were off-limits to you, not whether you misused information you were allowed to see. The Court called this a "gates-up-or-down" inquiry.

Then came hiQ Labs v. LinkedIn. On 18 April 2022, the Ninth Circuit said hiQ had raised a serious question about whether "without authorization" even applies to pages that need no login, even after LinkedIn told hiQ to stop. That was a ruling on a preliminary injunction, not a final verdict.
Here's the catch. The case didn't end there.
In November 2022, the district court found hiQ had breached LinkedIn's User Agreement, including through fake accounts. In December 2022, the parties settled with a $500,000 consent judgment and a permanent injunction against hiQ scraping LinkedIn. The CFAA argument helped hiQ. The contract claim is what finished it.
The second big case points the other way on contracts. In Meta v. Bright Data, decided on 23 January 2024, Judge Edward Chen granted Bright Data summary judgment on Meta's breach of contract claims. He read Facebook's and Instagram's terms as not covering logged-off scraping of publicly viewable data.
Put those two together and a pattern shows up. Logged-off scraping of public pages has fared well in US courts. Fake accounts and logged-in scraping, where you accepted terms, have not.
My take: if your scraper needs an account to work, you've moved from the safest lane to the riskiest one.
Do a website's terms of service make scraping illegal?
Breaking terms of service usually isn't a crime. It can still be a breach of contract, and that's what courts enforce.
The key question is whether you agreed to the terms at all. If you sign up, tick a box or log in, you've almost certainly accepted them. If you only visit a public page, whether "browsewrap" terms bind you is less certain, and the Meta ruling shows courts read ambiguous terms against the site that wrote them.
Europe adds a twist. In Ryanair v PR Aviation (15 January 2015), the Court of Justice of the EU looked at a flight data site that Ryanair's terms said couldn't be screen-scraped. The court held that when a database isn't protected by copyright or the special database right, the EU Database Directive doesn't stop the owner from restricting use by contract.
In plain English: a weakly protected database can end up with stronger contract protection, because the owner can lean on its terms instead.
What I would actually do: read the terms before you build, not after the cease-and-desist letter. If they ban automated access and you need an account, look for an official API first. My beginner's guide to APIs explains why an API is the sanctioned door into most platforms.
Does ignoring robots.txt make scraping illegal?
Not on its own, in most places. But ignoring it is getting harder to defend.
robots.txt is a plain text file where a site lists which paths it asks crawlers to avoid. The IETF standardised it as RFC 9309 in September 2022. The RFC is blunt: the rules are requests that crawlers are asked to honour, and they are "not a form of access authorization."
So why does it still matter? Three reasons.
- Evidence of intent. Ignoring a clear "Disallow" makes it hard to argue you were acting in good faith if a dispute starts.
- Privacy regulators use it. France's data protection authority, the CNIL, published guidance on 19 June 2025 saying anyone relying on legitimate interest to scrape for AI training must exclude sites that clearly object through robots.txt or CAPTCHA.
- Copyright opt-outs. The EU's DSM Copyright Directive, Article 4, allows text and data mining unless the rightholder has reserved it "in an appropriate manner, such as machine-readable means." The EU AI Act, Article 53, requires general-purpose AI model providers to identify and respect those reservations, with obligations applying from 2 August 2025.
Respecting robots.txt costs you a few pages. Ignoring it can cost you your best defence. That trade is easy.
What about personal data and GDPR?
This is the layer where public data gives you the least protection, and where the biggest fines have landed.
Under GDPR, any processing of personal data needs a lawful basis under Article 6. For scrapers, the only realistic one is usually legitimate interests, Article 6(1)(f). That needs a real purpose, real necessity, and a balancing test against the people whose data you take.
Then Article 14 applies. If you collect personal data without getting it from the person directly, you generally must tell them who you are and why, within a reasonable period and at the latest within one month. There is an exemption for impossible or disproportionate effort, but it still requires other measures, such as publishing the information.
Regulators have been clear about where they stand.
- The 2024 joint statement. In October 2024, 17 data protection authorities, including Canada's, issued a concluding joint statement on data scraping. It repeats that publicly accessible personal data is still covered by privacy law, and that a platform's permission to scrape can't by itself make the scraping lawful.
- The Dutch DPA. Its May 2024 guidance says scraping by private organisations and individuals is almost never allowed, except when it's very targeted.
- The UK ICO. Its December 2024 response on generative AI says legitimate interests is in practice the only lawful basis for training on scraped personal data, and it still has to pass all three tests.
- The CJEU. In October 2024 (case C-621/22), the EU's top court held that a commercial interest can count as a legitimate interest, as long as it's lawful and the processing is strictly necessary. That softens the Dutch DPA's stricter reading, but it doesn't remove the balancing test.
The cost of getting this wrong is not theoretical. In September 2024, the Dutch DPA fined Clearview AI €30.5 million for building a facial recognition database from scraped photos.
Skip this kind of project if you can't explain, in one sentence, why you need each personal field you collect. If a field doesn't serve the purpose, don't scrape it.
Is web scraping legal in India?
India has no law that bans scraping as such. The newer question is personal data.
The Digital Personal Data Protection Act, 2023 carves out one thing that matters to scrapers. Under Section 3(c)(ii), the Act doesn't apply to personal data that the person themselves made publicly available, or that someone published under a legal obligation.
That carve-out is narrower than it sounds. Data someone else posted about a person usually doesn't fit it, unless they were legally required to publish it. And it does nothing for data you collect from non-public sources.
Timing matters too. The DPDP Rules were notified in November 2025, and most obligations start 18 months later, in May 2027. Other Indian laws, like copyright and contract law, still apply in the meantime. If you collect data about people in the EU or UK, GDPR or the UK GDPR can apply on top.
How risky is my scraping project? A decision table
Here's the table I use to sort a project before writing a single line of code. It isn't a legal test. It's a way to see which layers you're touching and how much homework each one needs.
| Data you collect | How you access it | Layers touched | Relative risk |
|---|---|---|---|
| Product prices, specs, stock | Public pages, logged out, polite rate | Contract, maybe database rights | Lower |
| Facts from news or blogs | Public pages, logged out | Copyright if you republish text | Lower to medium |
| Full articles, images, video | Any | Copyright, TDM opt-outs | Medium to high |
| A large slice of one site's database | Public pages, high volume | Database rights, contract | Medium to high |
| Names, emails, profiles of people | Public pages, logged out | Personal data law, contract | High |
| Anything behind a login | Your account or fake accounts | Contract, access law, maybe privacy | High |
| Anything after a block or CAPTCHA | Bypassing technical measures | Access law, contract, privacy | Highest |
Two patterns stand out. Risk rises as data gets more personal, and it rises again as access gets less public. A logged-out price tracker and a logged-in profile harvester are not the same project, even if they use the same code.

What should I check before I scrape a site?
This is the checklist I run before any scraping job. It won't make a project legal. It tells me when to stop and ask someone who can give real legal advice.
- Can I see the data without logging in? If not, look for an official API or a licence.
- Did I accept terms that ban automated access? Read them, and save a dated copy.
- What does robots.txt say for my paths and my user agent? Respect it.
- Is there personal data in the pages? List every personal field and why I need it. Drop the rest.
- Am I copying creative content, or extracting facts? Facts are safer than republishing someone's work.
- Am I taking a large share of one site's database? That's where EU database rights live.
- Will I bypass a block, a CAPTCHA or a rate limit? That's the clearest stop sign on this list.
- Whose data is it, and where do they live? Privacy laws like GDPR can reach you even if your server sits elsewhere.
- Am I sending a reasonable request rate? Hammering a server creates evidence nobody wants.
If you hit two or more of the risky answers, that's the point to pay for a legal review. A short consult costs far less than defending a lawsuit.
Where do proxies and scraping tools fit in?
Tools don't change the legal answer. They change how easy it is to stay inside it, or to step outside it.
Take proxies. A residential proxy routes your requests through real household IPs, which is useful for checking localised prices or ads.
But using rotation to get past a site's deliberate block moves you into the highest-risk row of the table above. If you do buy proxies, check how the provider sources its IPs; I covered sourcing and consent in my residential proxy provider comparison.
Managed scrapers help in quieter ways. Firecrawl turns pages into clean markdown for AI apps, and my Firecrawl API examples show how to scope a crawl to only the URLs you need. Apify runs ready-made scrapers called Actors on a schedule, so you can control volume and timing. My Apify pricing breakdown explains what that costs.
Neither tool makes a project lawful. Both make it easier to collect less, more slowly, which is what every regulator above keeps asking for.
Frequently asked questions
Scraping isn't the risky part. Logins, personal data and ignored opt-outs are.
If your project sits in the lower rows of the table, the next decision is the tool. Pick one that makes it easy to collect less.


