Tutorial

How to Scrape TikTok Data in 2026

|11 min read

TikTok is the fastest-growing content platform with over a billion active users. Whether you are tracking viral trends, analyzing influencer metrics, or researching content strategies, scraping TikTok gives you data that no public API fully exposes. Here are two approaches.

Why scrape TikTok?

TikTok's algorithm-driven discovery makes it uniquely valuable for market research:

1

Trend analysis

Track trending hashtags, sounds, and content formats before they peak. Get ahead of viral cycles.

2

Influencer metrics

Analyze follower counts, engagement rates, and posting frequency to evaluate creator partnerships.

3

Content research

Study what works in your niche — video lengths, hooks, hashtag combos, and posting schedules.

4

Competitive intelligence

Monitor competitor brand accounts, track their content strategy, and measure their growth trajectory.

The challenge

TikTok is one of the hardest platforms to scrape. The entire interface is a single-page React application that loads content dynamically. API requests are signed with device-specific tokens, and the platform uses advanced fingerprinting to detect automation. Simple HTTP requests return empty shells with no content.

Method 1: DIY with Puppeteer

Spin up a headless browser, navigate to a creator profile, and extract video data:

scraper.js
#E8A0BF">const puppeteer = #E8A0BF">require(#A8D4A0">'puppeteer');

(#E8A0BF">async () => {
  #E8A0BF">const browser = #E8A0BF">await puppeteer.#87CEEB">launch({ headless: #A8D4A0">'new' });
  #E8A0BF">const page = #E8A0BF">await browser.#87CEEB">newPage();

  #E8A0BF">await page.setUserAgent(
    #A8D4A0">'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ' +
    #A8D4A0">'AppleWebKit/537.36 (KHTML, like Gecko) ' +
    #A8D4A0">'Chrome/124.0.0.0 Safari/537.36'
  );

  #E8A0BF">await page.#87CEEB">goto(
    #A8D4A0">'https://www.tiktok.com/@charlidamelio',
    { waitUntil: #A8D4A0">'networkidle2', timeout: 30000 }
  );

  // TikTok requires waiting #E8A0BF">for JS hydration
  #E8A0BF">await page.#87CEEB">waitForSelector(#A8D4A0">'[data-e2e=#A8D4A0">"user-post-item"]', { timeout: 15000 });

  #E8A0BF">const videos = #E8A0BF">await page.#87CEEB">$$eval(#A8D4A0">'[data-e2e=#A8D4A0">"user-post-item"]', nodes =>
    nodes.slice(0, 10).map(n => ({
      desc: n.#87CEEB">querySelector(#A8D4A0">'[data-e2e=#A8D4A0">"user-post-item#FFB347">-desc"]')?.innerText,
      views: n.#87CEEB">querySelector(#A8D4A0">'strong[data-e2e=#A8D4A0">"video-views"]')?.innerText,
      link: n.#87CEEB">querySelector(#A8D4A0">'a')?.href,
    }))
  );

  console.#87CEEB">log(videos);
  #E8A0BF">await browser.#87CEEB">close();
})();

Pain points

  • !TikTok detects headless browsers via canvas fingerprinting and WebGL probing
  • !Content loads via infinite scroll — you need complex scroll-and-wait logic
  • !Data attributes change frequently as TikTok deploys multiple times daily
  • !Login walls appear after a few page views from the same IP
  • !Video view counts are loaded asynchronously and may not be in the DOM when you scrape
  • !Geographic restrictions mean different content per region — you need geo-specific proxies

Method 2: SnapRender API

Skip the browser headaches. SnapRender renders TikTok pages in a real browser session and returns the data you need:

Render as markdown

Get a TikTok profile as clean markdown — ideal for AI analysis pipelines.

render.py
#E8A0BF">import requests

# Render a TikTok profile #E8A0BF">as markdown
render = requests.#87CEEB">post(
    #A8D4A0">"https://api.snaprender.dev/v1/render",
    headers={#A8D4A0">"x-api-key": #A8D4A0">"sr_live_YOUR_KEY"},
    json={
        #A8D4A0">"url": #A8D4A0">"https://www.tiktok.com/@charlidamelio",
        #A8D4A0">"format": #A8D4A0">"markdown",
        #A8D4A0">"use_flaresolverr": #E8A0BF">True
    }
)
#E8A0BF">print(render.#87CEEB">json()[#A8D4A0">"data"][#A8D4A0">"markdown"])

Extract structured data

Pull follower counts, engagement metrics, and video stats as JSON.

extract.py
#E8A0BF">import requests

# Extract structured creator + video data
extract = requests.#87CEEB">post(
    #A8D4A0">"https://api.snaprender.dev/v1/extract",
    headers={#A8D4A0">"x-api-key": #A8D4A0">"sr_live_YOUR_KEY"},
    json={
        #A8D4A0">"url": #A8D4A0">"https://www.tiktok.com/@charlidamelio",
        #A8D4A0">"use_flaresolverr": #E8A0BF">True,
        #A8D4A0">"selectors": {
            #A8D4A0">"username": #A8D4A0">"h1[data-e2e=#A8D4A0">'user-title']",
            #A8D4A0">"followers": #A8D4A0">"strong[data-e2e=#A8D4A0">'followers-count']",
            #A8D4A0">"likes": #A8D4A0">"strong[data-e2e=#A8D4A0">'likes-count']",
            #A8D4A0">"video_views": #A8D4A0">"strong[data-e2e=#A8D4A0">'video-views']"
        }
    }
)
#E8A0BF">print(extract.#87CEEB">json())

Example response

response.json
{
  #A8D4A0">"status": #A8D4A0">"success",
  #A8D4A0">"data": {
    #A8D4A0">"username": #A8D4A0">"charlidamelio",
    #A8D4A0">"followers": #A8D4A0">"155.2M",
    #A8D4A0">"likes": #A8D4A0">"11.6B",
    #A8D4A0">"video_views": [#A8D4A0">"12.4M", #A8D4A0">"8.7M", #A8D4A0">"5.2M", #A8D4A0">"3.1M", ...]
  },
  #A8D4A0">"url": #A8D4A0">"https://www.tiktok.com/@charlidamelio",
  #A8D4A0">"elapsed_ms": 3450
}

Legal considerations

TikTok data scraping carries important legal considerations:

  • 1.TikTok's Terms of Service explicitly prohibit automated data collection. Violating ToS is not necessarily illegal, but can result in account bans and potential legal action.
  • 2.The EU's GDPR and similar regulations may apply if you scrape data from European users. Creator profile data may be considered personal data under these laws.
  • 3.Rate-limit your requests. Excessive automated traffic can be treated as a denial-of-service attack regardless of intent.
  • 4.Never scrape private accounts, direct messages, or personal user data. Focus on publicly available creator profiles and trending content.

Start free — 100 requests/month

Get your API key in 30 seconds. Scrape TikTok creator data with five lines of code. No credit card, no browser fleet, no proxy bills.

Get Your API Key

Frequently asked questions

TikTok's Terms of Service prohibit scraping. However, scraping publicly available data has been supported by courts in the US (hiQ v. LinkedIn). Avoid scraping private accounts or personal data. Rate-limit your requests and consult legal counsel for your specific jurisdiction.

TikTok offers a Research API for academics and a Commercial API for businesses, but both have strict approval processes and limited data access. Scraping fills the gap for trend data, hashtag analytics, and competitor research that the APIs don't cover.

TikTok uses aggressive anti-bot measures including device fingerprinting, signed API requests, rate limiting, and CAPTCHA challenges. Content is loaded dynamically via JavaScript, making simple HTTP requests ineffective. SnapRender's browser rendering handles these challenges.

Yes. You can extract video titles, view counts, like counts, comment counts, hashtags, and creator info without downloading video files. SnapRender's /extract endpoint returns this metadata as clean JSON.