Handles API

Guide

Is web scraping legal? What the courts and regulators say

US courts have so far not treated scraping publicly available data as a Computer Fraud and Abuse Act violation, but contract (terms of service), copyright and data protection risks are separate. In the EU and UK, personal data is protected even when it is public. Your case depends on the data, the method and the country.

Updated by the Handles API team

The short answer

This page is general information, not legal advice. Laws differ by country; talk to a lawyer about your own project.

Whether scraping is lawful has no yes or no answer, because several different laws apply at once. In the US, the Ninth Circuit said in hiQ v. LinkedIn that the computer crime law does not reach public websites, yet hiQ still lost on contract and paid a settlement.

In Europe the central question is different: whether you are collecting personal data and on what legal basis. This guide covers the four questions that decide most cases, the US decisions, the European rules, and what platforms write in their terms. For how scraping methods compare technically, see social media scraping.

The four questions that decide it

Four separate legal questions apply to any scraping project, and passing one does not answer the others.

1. Computer access law (CFAA)

The Computer Fraud and Abuse Act is the main US federal computer crime law, and its question is whether you accessed a computer without authorization. In Van Buren v. United States, the Supreme Court read it as a "gates-up-or-down inquiry".

2. Contract and terms of service

A site's terms are a contract, and breaking them can create a civil claim even where no crime is involved. hiQ's fate in 2022 is the standard example, covered below.

3. Copyright and database rights

Posts, photos and videos can be protected by copyright, so what you copy and how you reuse it matters. The EU also protects databases with a separate database right.

4. Personal data and GDPR

If the data relates to an identifiable person, privacy law applies whether or not the data is public. That is the question developers most often skip, and the one regulators are most active on.

US court cases

The US cases that matter most for scraping run from 2019 to 2024, and the hiQ timeline shows why a court win on one question does not settle the rest.

DateCaseWhat happened
2019hiQ Labs v. LinkedInThe Ninth Circuit first ruled in a preliminary injunction fight over hiQ's scraping of public LinkedIn profiles, in hiQ's favor.
3 June 2021Van Buren v. United States, No. 19-783The Supreme Court ruled 6-3 and described CFAA liability as a gates-up-or-down inquiry. It did not directly rule on what "without authorization" means.
2021hiQ Labs v. LinkedInThe Supreme Court sent the case back to the Ninth Circuit to reconsider in light of Van Buren.
18 April 2022hiQ Labs v. LinkedIn, 31 F.4th 1180The panel again upheld the preliminary injunction. This was an early-stage ruling, not a final judgment.
November 2022hiQ Labs v. LinkedInThe district court held that hiQ breached the LinkedIn User Agreement by scraping and by using fake accounts.
December 2022hiQ and LinkedIn settlementA consent judgment of $500,000 against hiQ and a permanent injunction. A settlement carries no precedent value.
23 January 2024Meta Platforms v. Bright DataJudge Edward Chen denied Meta's summary judgment motion, finding the terms did not bar scraping public data while logged off. Meta dropped the remaining claim on 23 February 2024.
9 May 2024X Corp. v. Bright DataJudge William Alsup dismissed X's complaint for failure to state a claim. In November 2024 an amended complaint was partly allowed, so the case is still going.
Dates and holdings from the court documents linked in each row. Case summaries are simplified.

The Ninth Circuit wrote that "the concept of 'without authorization' does not apply to public websites", and that the opposite rule risked "information monopolies that would disserve the public interest". But hiQ ultimately lost on contract. Criminal access law and contract are separate risks.

Two limits on the Meta ruling: it turned on how Meta's terms were worded at the time, and Instagram's current terms cover automated collection whether or not you are logged in. In the X case, the court reasoned that X's claim would give it "de facto copyright ownership". Do not read either result as a clear win for scrapers.

Europe and the UK: public is not the same as free to use

Regulators in Europe and elsewhere treat personal data as protected even when it is publicly visible. On 24 August 2023, 12 data protection authorities, including the UK ICO, Canada's OPC and Australia's OAIC, issued a joint statement. It says:

  • "Personal information that is publicly accessible is still subject to data protection and privacy laws in most jurisdictions."
  • "Mass data scraping of personal information can constitute a reportable data breach in many jurisdictions."

A follow-up statement in October 2024 had 17 authorities. Under the GDPR you need a legal basis for processing, listed in Article 6. Article 14 says you must inform people when you obtain their data from somewhere other than themselves, with an exception where that would take "disproportionate effort".

Enforcement is real. The Dutch authority fined Clearview AI 30.5 million euros over its collection of images for facial recognition, announced on 3 September 2024.

What the platforms' terms say

Platform terms are where most scraping disputes start, and the main platforms restrict automated collection in plain words.

PlatformWhat the terms say
X Terms of Service"crawling or scraping the Services in any form, for any purpose without our prior written consent is expressly prohibited"
TikTok Terms of Service"use automated scripts to collect information from or otherwise interact with the Services"
Instagram Terms"You can't attempt to create accounts or access or collect information in unauthorized ways."
Meta's Automated Data Collection Terms"You may not access or collect data from our Products using automated means (without our prior permission)"
Excerpts quoted from the linked pages as of November 2026. Read the full terms before relying on them.

Is scraping Instagram, Twitter or LinkedIn legal?

Each of the three platforms people ask about most has a case that bears on the answer, though none settles it. The same questions apply to TikTok, covered in the TikTok scraper guide.

Instagram

Meta v. Bright Data went Bright Data's way on the terms as written then, but Instagram's terms now restrict collecting information in unauthorized ways. For the technical side, see the Instagram scraper guide.

Twitter (X)

X's terms prohibit scraping without written consent, and X Corp. v. Bright Data has not ended. See the Twitter scraper guide for the methods.

LinkedIn

LinkedIn is the hiQ case: a win on computer access at the injunction stage, then a loss on the User Agreement. See the LinkedIn API page for what we serve.

A practical checklist

A defensible scraping project starts with a short list of habits, and none of them is a guarantee.

  • Collect only publicly available data. Do not log in, and do not create fake accounts to get access.
  • Keep request rates low and honor robots.txt. It is a signal site owners use, and it avoids loading their servers.
  • Minimize personal data. Collect the fields you need and nothing more.
  • Write down your purpose and your legal basis before you collect.
  • Set a retention period and delete data when it expires.
  • Respond to removal and erasure requests against your own copy.
  • Read the terms of service of each site you collect from.
  • Ask a lawyer who knows your country and your use case.

Where Handles API fits

Handles API is a read-only API that returns public social media data, and it cannot make your use of that data lawful on its own. It does not return private or protected content, and it does not send messages, post, like or follow. It is an independent service with no affiliation with the platforms.

The acceptable use policy forbids using the data for harassment, surveillance, doxxing, spam and selling personal data, and it says you are responsible for complying with platform terms and the law where you and the people concerned are located. Anyone can ask us to remove a public account through the data removal page. That removes records from our catalog, not copies customers already received. More in the privacy policy.

Using an API moves the collection off your servers, but it does not remove your own obligations under GDPR or similar laws.

Frequently asked questions

Is web scraping legal in the US?
There is no single answer. US courts have held that reading a public website is not access "without authorization" under the main federal computer crime law, but that finding came at an early stage of one case. Contract, copyright and privacy claims are separate, and the outcome depends on the facts.
Is it legal to scrape public data?
Public does not mean free of rules. In the US, a public page has not been treated as protected by the computer crime law, yet terms of service and copyright can still apply. In the EU and UK, personal data stays protected by data protection law even when anyone can see it.
Is scraping Instagram legal?
A 2024 court ruling went against Meta on its terms as they were then worded, and Meta dropped the rest of the case. Instagram's current terms prohibit collecting information in unauthorized ways. That is a contract risk, and personal data rules may apply as well. Ask a lawyer before you start.
Is scraping Twitter (X) legal?
X's terms prohibit scraping without written consent. A 2024 federal ruling dismissed X's claims against a scraping company, mainly on copyright preemption grounds, but the case continued after an amended complaint. The terms, copyright and privacy questions remain open for you.
Does GDPR apply to public data?
Yes, when the data relates to an identifiable person. Regulators in many countries have said that publicly accessible personal information is still subject to data protection and privacy laws. You generally need a lawful basis, and you may owe people information about how you use their data.
What did hiQ v. LinkedIn decide?
In 2022 the Ninth Circuit upheld a preliminary injunction for hiQ, saying the concept of "without authorization" does not apply to public websites. That was a ruling at the injunction stage. Later in 2022 a court found hiQ had breached LinkedIn's User Agreement, and the case ended in a settlement.
Can I get sued for scraping?
Yes. Even when criminal liability is unlikely, a platform can bring a contract claim over its terms, and hiQ ended up with a $500,000 settlement judgment. Privacy regulators can also fine organizations that collect personal data without a lawful basis. How likely any of this is depends on your project.