Handles API

Guide

Social media scraping: methods, limits and APIs

Social media scraping is the automated collection of public data from social platforms: profiles, follower counts and posts. There are four methods: parsing HTML or JSON, headless browsers, official APIs and data APIs. Most platform terms prohibit automated collection, so the method you pick sets both your maintenance load and your risk.

Updated by the Handles API team

What social media scraping is

Social media scraping is a program reading public pages or endpoints of a social platform and turning what it finds into structured data. It is the opposite of using a feature the platform built for you, which is what an official API is.

Three kinds of data are usually collected. Profiles carry the handle, name, bio, verification state and category. Counters carry followers, following, posts and likes, and become useful when you store them daily. Posts carry text, publication time, links, media and engagement counts.

Everything in this guide concerns public data. Private and protected accounts, direct messages and anything behind a login of someone else's are out of scope, and so are personal email addresses.

The four methods compared

There are four ways to get public social data, and they trade effort against stability. As of November 2026 the pattern is the same on every platform: the more the method depends on the platform's web pages, the more often it breaks.

MethodHow it worksBreaks whenCostBest for
HTML or JSON parsingRequest pages or internal endpoints and parse the responseMarkup or endpoints change, a login wall or bot challenge appears, an IP is blockedFree code, plus proxies and upkeepA small one-off job
Headless browserDrive Playwright or Puppeteer and read the rendered pagePage layout changes, the platform detects automation, sessions expireCompute, proxies and maintenance timePages that need JavaScript to render
Official APIRegister an app and call the platform's documented endpointsRarely; access rules and prices change by announcementFree, metered or approval-based, depends on the platformPosting, user-authorized data, anything the platform sanctions
Data APISend one key to a service that returns public data as JSONThe provider repairs it; you see a changed field or a 503Credits, plans from $29 a monthPublic profiles and counters across platforms
Methods are general patterns, not a ranking. Each platform's terms still apply to how you collect.

The first two put the maintenance on you. The last two move it to a platform or a provider, at the price of less flexibility: you get the fields they expose and no others.

Platform by platform: what you can use

Each platform offers a different official route, and the gaps between them are the reason people scrape. The table lists what the official API gives, whether logged-out visitors hit a login wall, and what Handles API covers.

PlatformOfficial APILogin wallHandles API catalogLive read
XPay-per-use reads: $0.005 per post, $0.010 per user (X API pricing)Yes, for most pages and searchesAbout 33.0M accountsYes, 2 credits
InstagramBusiness and Creator accounts only; Business Discovery reads other professional accounts; Basic Display closed 4 December 2024 (Instagram Platform)Often, for logged-out visitorsAbout 53K accountsNo, switched off for now
TikTokResearch API for eligible academic and non-profit researchers; Display API returns only the authorizing user's own data (TikTok Research API)Bot challenges and sign-in promptsAbout 27K accountsCatalog only
YouTubeYouTube Data API v3, default quota of 10,000 units a day (quota costs)No, public channel pages load logged outAbout 97K accountsCatalog only
TelegramBot API and TDLib, built for bots and clientsNo, public channels can be viewed without an accountAbout 3.7M accountsYes, 2 credits, channel read
BlueskyAT Protocol, an open protocol for posting and authenticated readsNo, public profiles are readable without an accountAbout 4.2M accountsCatalog only
TwitchHelix API, needs a registered app and tokenNo, public channel pages load logged outAbout 1.9M accountsCatalog only
KickDeveloper tools for apps that channels authorizeNo, public channel pages load logged outAbout 852K accountsCatalog only
LinkedInOfficial APIs cover sign-in, posting and partner programsYes, for most profile viewsCompany records, by slug or domainYes, capped at four calls a minute
The login wall column is a general observation for logged-out visitors, and platforms change it without notice. Catalog sizes are estimates and not every account that exists is in them. A catalog read costs 1 credit.

Platform-specific guides go deeper: Twitter scraper, Instagram scraper and TikTok scraper. For YouTube, the YouTube Data API guide covers keys and quota. Per-platform field lists are on the platforms docs page.

Staying inside the rules

Major platforms prohibit automated collection in their terms, and public availability does not change that. X states that “crawling or scraping the Services in any form, for any purpose without our prior written consent is expressly prohibited” (X Terms of Service). TikTok's terms bar use of “automated scripts to collect information from or otherwise interact with the Services” (TikTok Terms of Service). Instagram's say “You can't attempt to create accounts or access or collect information in unauthorized ways” (Instagram Terms).

  • Public data only. Never collect private or protected content, and never use someone else's login to reach it.
  • Minimize personal data. Store the fields you need and delete the rest. Public personal data is still personal data.
  • Keep the rate low. Spread requests out. Hammering a platform is a fast way to get blocked and can disrupt the service.
  • Read robots.txt and the terms. They tell you what the operator allows, and the terms bind you even where robots.txt is silent.
  • Know your data protection duties. In 2023 twelve data protection authorities stated that publicly accessible personal information “is still subject to data protection and privacy laws in most jurisdictions” (joint statement). Under GDPR you need a lawful basis, and you may owe people notice.

Using an API moves the collection off your servers, it does not remove your own obligations under GDPR or similar laws. The court cases and regulator statements are in Is web scraping legal?

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

When an API is cheaper than scraping

A scraper is cheapest for a small one-off job and gets more expensive each time it has to run on a schedule. The cost is not the first script; it is the upkeep after every change a platform makes.

  • Maintenance. Selectors, endpoints and request signatures change, and someone has to notice and repair.
  • Proxies. Platforms can block data center IPs and heavy repeat traffic, so you end up paying for rotating addresses.
  • Accounts. Where a login is needed, you need accounts, and accounts get suspended.
  • Monitoring. A scraper fails quietly, returning empty pages that look like results, until you add checks.

A data API replaces those lines with one metered price. A catalog read costs 1 credit and a live read 2 credits, and the table shows the cost per 1,000 reads on each paid plan. The free trial is 100 credits once, no card.

PlanMonthly priceCredits1,000 catalog reads1,000 live reads
Handles API Starter$2915,000$1.93$3.87
Handles API Pro$9975,000$1.32$2.64
Handles API Business$299300,000$1.00$1.99
Handles API Scale$7991,200,000$0.67$1.33
Plan price divided by included credits. A catalog read costs 1 credit, a live read 2 credits. The Free trial is 100 credits once, no card.

An API has limits too. The catalog is partial, Instagram live reads are off, and some platforms have no follower lists. Check the limits on each platform page before you choose.

Find a handle on every platform with one request

The people lookup endpoint takes one handle and searches all the catalogs for it, returning each match with evidence of whether the accounts share an owner. It costs 1 credit and is read from the catalog, not from the platforms.

curl "https://api.handlesapi.com/v1/people/lookup?handle=nasa" \
  -H "Authorization: Bearer $HANDLES_API_KEY"
200 OK98 ms · 1 credit
{
  "data": {
    "entries": [
      {
        "handle": "nasa",
        "profiles": [
          {
            "platform": "instagram",
            "object": "account",
            "id": "528817151",
            "handle": "nasa",
            "name": "NASA",
            "audience": 104444295,
            "audience_metric": "followers",
            "verified": true,
            "engagement_rate": 0.3433,
            "language": "en",
            "category": "politics",
            "url": "https://instagram.com/nasa",
            "record": {
              "user_id": "528817151",
              "handle": "nasa",
              "full_name": "NASA",
              "follower_count": 104444295,
              "verified": true,
              "category": "politics",
              "language": "en",
              "avatar_url": "https://scontent-iad3-2.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_11520681590296412...",
              "engagement_rate": 0.3433
            }
          },
          {
            "platform": "x",
            "object": "account",
            "id": "11348282",
            "handle": "NASA",
            "name": "NASA",
            "audience": 92086821,
            "audience_metric": "followers",
            "verified": false,
            "engagement_rate": null,
            "language": "en",
            "category": "science",
            "url": "https://x.com/NASA",
            "record": {
              "user_id": "11348282",
              "username": "NASA",
              "name": "NASA",
              "followers_count": 92086821,
              "is_verified": false,
              "language": "en",
              "category": "science"
            }
          }
        ],
        "totals": {
          "platforms": 6,
          "audience": 215774389,
          "largest_platform": "instagram"
        },
        "match": {
          "found_on": [
            "instagram",
            "x"
          ],
          "verified_on": [
            "instagram",
            "tiktok"
          ],
          "names": [
            "nasa",
            "user3890627351453"
          ],
          "names_agree": false
        }
      }
    ],
    "unavailable": []
  },
  "meta": {
    "source": "catalog:cross_platform",
    "page": {
      "limit": 1,
      "next_cursor": null,
      "count": 6
    },
    "request_id": "req_7ed263f1410ea3d5",
    "generated_at": "2026-11-26T13:54:54.182Z",
    "took_ms": 20
  }
}

Real response from the live API, captured Nov 26, 2026. Long strings and arrays are shortened.

Filter a catalog

Each platform catalog can also be listed with filters such as min_followers, country, language and category. This request lists X accounts with at least one million followers. Lists use cursor pagination. To find a username across networks without code, use the free username search.

curl "https://api.handlesapi.com/v1/directory/x?min_followers=1000000&limit=3" \
  -H "Authorization: Bearer $HANDLES_API_KEY"
200 OK74 ms · 1 credit
{
  "data": [
    {
      "user_id": "44196397",
      "username": "elonmusk",
      "name": "Elon Musk",
      "description": "https://t.co/ZdBx5WABYx",
      "followers_count": 239804602,
      "following_count": 1429,
      "statuses_count": 112882,
      "media_count": 4788,
      "favourites_count": 260169,
      "url": "https://x.com/elonmusk",
      "is_verified": false,
      "is_blue_verified": true,
      "verified_type": null,
      "is_automated": false,
      "location": null,
      "photo_url": "https://pbs.twimg.com/profile_images/2122506092437504001/NSS4RHyZ_400x400.jpg",
      "banner_url": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
      "account_created_at": "2009-06-02 20:12:29+00",
      "language": "en",
      "country": null,
      "category": null,
      "citation_score": 97790,
      "tier": "S",
      "status": "active",
      "is_nsfw": false,
      "last_seen": "2026-11-26 13:53:24.643921+00",
      "weekly_growth": -705137
    }
  ],
  "meta": {
    "page": {
      "limit": 3,
      "next_cursor": "eyJzIjoiZm9sbG93ZXJzIiwibyI6ImRlc2MiLCJrIjoiMTU1NjU5MjEzIiwidiI6MTE0MzQzNTk3fQ.pTEIlV94SqlKwbI_Kg...",
      "count": 3
    },
    "source": "catalog",
    "request_id": "req_c3f291d93d0008b6",
    "generated_at": "2026-11-26T13:54:54.256Z",
    "took_ms": 29
  }
}

Real response from the live API, captured Nov 26, 2026. Long strings and arrays are shortened.

Keys are secrets for your server, never for a browser. Plans are on the pricing page, and live X endpoints need the scrape:live scope, which keys do not get by default.

Frequently asked questions

What is social media scraping?
Social media scraping is the automated collection of public data from social platforms, such as profile details, follower counts and posts. It is done by parsing web pages, driving a browser, calling an official API or using a data API. This guide covers public data only: nothing private, protected or behind a follower approval.
Is social media scraping legal?
It depends on the platform, the data, the country and how you collect it. US courts have treated unauthorized-access law and contract claims as separate questions, platform terms often prohibit scraping, and data protection law can apply to public personal data. This is general information, not legal advice; ask a lawyer about your own project.
Which social platforms offer an official API for public data?
Every major platform has some official API, but access differs. X sells pay-per-use reads, YouTube Data API v3 works with a daily quota, Instagram's API is for Business and Creator accounts, and TikTok's Research API is limited to eligible researchers. Others are built for apps that users authorize.
What data can I collect from public profiles?
Typically the handle, display name, bio, verification status, follower and following counts, post counts and a creator category. From posts you can read text, time, links and engagement counts such as likes and views. Private accounts, direct messages and personal email addresses are not public data and are out of scope.
Is an API cheaper than building a scraper?
For a one-off job, a scraper can cost less. For daily collection, the API usually wins once you count proxies, account supply, repairs after each platform change and the hours spent on them. Compare your expected monthly reads with the cost per 1,000 reads in the plan table on this page.
Can I scrape private accounts?
No, and you should not try. A private or protected account shares its content only with approved followers, so collecting it means getting around an access control. Handles API returns public data only, never private or protected content.