   [Home](https://scrapfly.io/)/[Scrapers](https://scrapfly.io/scrapers)/**TikTok** 

Profiles · videos · comments · search

# // TikTok Scraper API

Get public TikTok data as clean JSON: profiles, videos, comments, a profile's video list and keyword search results. Scrapfly loads the page from the country you choose, so you send a URL and read the data.

- **Clone it and run it.** An open-source TikTok scraper for profiles, videos, comments, profile video lists and search, tested against live TikTok every night.
- **The data is already JSON.** Public profile and video pages carry their data as JSON inside the page, so one request returns counts, captions and hashtags without a browser.
 
 [Get free API key](https://scrapfly.io/register) [View GitHub scraper](https://github.com/scrapfly/scrapfly-scrapers/tree/main/tiktok-scraper) [Read the API docs](https://scrapfly.io/docs/scrape-api/getting-started) 

1,000 free credits. No credit card required.

 [  ](https://scrapeway.com/web-scraping-api/scrapfly) [  ](https://www.capterra.com/p/212653/Scrapfly/reviews/)  

 4.8/5 from 248 reviews 

 

 

 

 

 TikTok pages · illustration

  

 

 Profile JSON**Output**

```
{
  <span class="c-str">"handle"</span>: <span class="c-str">"@nasa"</span>,
  <span class="c-str">"name"</span>: <span class="c-str">"NASA"</span>,
  <span class="c-str">"verified"</span>: true,
  <span class="c-str">"bio_link"</span>: <span class="c-str">"go.nasa.gov/3WyvlQi"</span>,
  <span class="c-str">"followers"</span>: <span class="c-num">2200000</span>,
  <span class="c-str">"likes"</span>: <span class="c-num">11900000</span>,
  <span class="c-str">"videos"</span>: <span class="c-num">70</span>,
  <span class="c-str">"private"</span>: false
}
```

Printed by the Python request below[See the request ↓](#implementation)

   

  

What you can scrape from TikTok

Four kinds of public TikTok data you can scrape with Scrapfly.

 

## // Scrape TikTok profiles

Each public profile gives the handle, display name, bio and bio link, the verified badge, follower, following, like and video counts, and whether the account is private. It all comes from one request for the profile URL.

- uniqueId
- nickname
- signature
- verified
- followerCount
- videoCount

  

## // Scrape TikTok videos

A video page gives the caption and its hashtags, the posting time, the duration and cover image, the view, like, comment, share and save counts, and the creator's public profile details.

- desc
- hashtags
- createTime
- duration
- playCount
- shareCount

  

## // Scrape every video on a profile

A profile shows its first videos and loads the rest as you scroll. Render the page with a short scroll script and read the video lists TikTok loads in the background. The open-source scraper scrolls until no more videos arrive and returns each one with its caption and counts.

- render\_js
- js\_scenario
- item\_list
- id

  

## // Scrape TikTok comments and search results

Comments load when the comment panel opens: click it with a JavaScript scenario and read each comment's text, language, posting time, like count and reply count. Keyword search works the same way, with each result giving the video, its counts and its creator's handle.

- comment/list
- search
- xhr\_call
- js\_scenario

  

 

  

Reliability

## // Read TikTok the way the page builds it

TikTok's web pages are an app shell around JSON. Profiles and videos ship their data inside the page, while video lists, comments and search results arrive in background calls after it loads. Read the JSON, not the visible layout, and store each record with the time you collected it.

 `__UNIVERSAL_DATA_FOR_REHYDRATION__`

This script tag holds a profile's or a video's public data as JSON. Parse it directly: without a browser, the HTML around it holds little else to read.

 

 `xhr_call`

With `render_js`, Scrapfly records the page's background calls under `browser_data.xhr_call`. Video lists, comments and search results are in those responses. The same video can arrive twice, so deduplicate by its ID.

 

 `playCount`

Counts from 10,000 up mostly arrive rounded the way TikTok displays them, so 70.3K comes back as 70300. Treat them as display values, and cast types: a video page can send the save count as a string.

 

 

 

  

Choose your tools

## // Scrapfly products for TikTok scraping

Start with the Web Scraping API. Add structured extraction, screenshots or a browser session as your workflow needs them, or start from the open-source scraper. One API key covers all four products.

 

### Web Scraping API for TikTok pages

Send a TikTok profile or video URL and get the page back with its data JSON inside.

Add `render_js` and a JavaScript scenario to load a profile's video list, a video's comments or a search.

```
GET /scrape?url=https://www.tiktok.com/@nasa/video/7710449624397450509&proxy_pool=public_datacenter_pool&country=US
```

 [Explore Web Scraping API →](https://scrapfly.io/products/web-scraping-api)  

### Data Extraction API for TikTok videos

Render a TikTok video page and add `extraction_model=social_media_post` to get the post back as JSON, with no parser to write.

It returns the caption and the creator: name, username and profile link.

```
GET /scrape?url=https://www.tiktok.com/@nasa/video/7710449624397450509&proxy_pool=public_datacenter_pool&country=US&render_js=true&extraction_model=social_media_post
```

 [Explore Data Extraction API →](https://scrapfly.io/products/extraction-api)  

### Screenshot API for TikTok profiles

Capture a TikTok profile with its counts and video grid once the page has loaded.

Keep a dated visual record of an account next to your JSON.

```
GET /screenshot?url=https://www.tiktok.com/@nasa&country=US&rendering_wait=4000&resolution=1920x1080
```

 [Explore Screenshot API →](https://scrapfly.io/products/screenshot-api)  

### Cloud Browser API for TikTok sessions

Open TikTok in a hosted Chromium session on residential proxies in the country you choose.

Connect Playwright or Puppeteer, open a public profile and read the page as it loads, with its profile data inside.

```
chromium.connect_over_cdp("wss://browser.scrapfly.io?key=KEY&proxy_pool=residential&country=us")
```

 [Explore Cloud Browser API →](https://scrapfly.io/products/cloud-browser-api)  

### Open-source TikTok scraper on GitHub

Clone the maintained Python scraper for public profiles, videos, comments, a profile's video list and keyword search.

It runs on the Web Scraping API, reads the page JSON and the background calls, and is tested against live TikTok every night.

- scrape\_profiles
- scrape\_posts
- scrape\_comments
- scrape\_channel
- scrape\_search

 [View the scraper on GitHub →](https://github.com/scrapfly/scrapfly-scrapers/tree/main/tiktok-scraper)  

 

  

One request

## // Read a TikTok profile in one request

The JSON at the top is sample output from November 25, 2026, for NASA's public TikTok profile: one request through a US IP, the profile JSON read from the page, then the handle, name, verified badge, bio link and counts. Counts change as an account posts and grows, so yours will differ.

Install `scrapfly-sdk` and `parsel`, then replace the key below. Swap `@nasa` for any public profile URL.

**Prefer the full scraper?** The open-source [TikTok scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/tiktok-scraper) covers profiles, videos, comments, a profile's video list and keyword search, in Python 3.12. It runs against live TikTok every night. Clone it, set `SCRAPFLY_KEY`, and point it at your own URLs and keywords.

 

 Python · scrapfly-sdkscrape + parse

```
<span class="c-key">import</span> json
<span class="c-key">from</span> scrapfly <span class="c-key">import</span> ScrapeConfig, ScrapflyClient

client = ScrapflyClient(key=<span class="c-str">"YOUR_SCRAPFLY_KEY"</span>)
result = client.scrape(ScrapeConfig(
    <span class="c-str">"https://www.tiktok.com/@nasa"</span>,
    proxy_pool=<span class="c-str">"public_datacenter_pool"</span>, country=<span class="c-str">"US"</span>,
))

<span class="c-com"># public profile data ships as JSON inside the page</span>
raw = result.selector.css(
    <span class="c-str">"#__UNIVERSAL_DATA_FOR_REHYDRATION__::text"</span>).get()
<span class="c-key">if</span> <span class="c-key">not</span> raw:
    <span class="c-key">raise</span> RuntimeError(<span class="c-str">"No profile data in the response"</span>)
scope = json.loads(raw)[<span class="c-str">"__DEFAULT_SCOPE__"</span>]
info = scope[<span class="c-str">"webapp.user-detail"</span>][<span class="c-str">"userInfo"</span>]
user, stats = info[<span class="c-str">"user"</span>], info[<span class="c-str">"stats"</span>]

output = {
    <span class="c-str">"handle"</span>: <span class="c-str">"@"</span> + user[<span class="c-str">"uniqueId"</span>],
    <span class="c-str">"name"</span>: user[<span class="c-str">"nickname"</span>],
    <span class="c-str">"verified"</span>: user[<span class="c-str">"verified"</span>],
    <span class="c-str">"bio_link"</span>: user.get(<span class="c-str">"bioLink"</span>, {}).get(<span class="c-str">"link"</span>),
    <span class="c-str">"followers"</span>: stats[<span class="c-str">"followerCount"</span>],
    <span class="c-str">"likes"</span>: stats[<span class="c-str">"heartCount"</span>],
    <span class="c-str">"videos"</span>: stats[<span class="c-str">"videoCount"</span>],
    <span class="c-str">"private"</span>: user[<span class="c-str">"privateAccount"</span>],
}
print(json.dumps(output, indent=<span class="c-num">2</span>, ensure_ascii=<span class="c-key">False</span>))
```

 

 

 

  

What the data is used for

## // Common TikTok scraping use cases

### Creator research

Compare creators in a niche by followers, likes, posting rate and engagement per video.

 

### Brand monitoring

Search for your brand or product and track the videos that mention it and how they perform.

 

### Trend tracking

Follow what a keyword returns in search and how views and shares move over time.

 

### Campaign reporting

Record views, likes, comments and shares on sponsored videos at set intervals.

 

### Competitor content

See what competitors post, how often, and which videos earn the most engagement.

 

### Social data for AI agents

Give an assistant current public video and profile data for the accounts and topics a user asks about.

 

 

 

  

Common questions

## // TikTok scraping FAQ

 Is scraping TikTok legal?

There is no universal answer. Legality depends on your jurisdiction, the data, the access method and how you use the result. Keep the workflow to public pages, treat usernames, profile details, comments and captions as personal data, collect only what you need, review TikTok's terms of service, and get legal advice for commercial use.

 Does TikTok offer an official API for this data?

Not for general commercial use. TikTok's Research API gives public data to approved non-commercial researchers in eligible regions, the Display API shows the profile and videos of users who authorize your app, and the Commercial Content API covers ads. These requests read TikTok's public web pages instead, so you need a Scrapfly API key, not a TikTok developer app. For an overview of the official options, see our guide to [TikTok's official APIs](https://scrapfly.io/blog/posts/guide-to-tiktok-api).

 How do I get every video from a TikTok profile?

Render the profile with `render_js` and a JavaScript scenario that scrolls the video grid, then read the `/api/post/item_list/` responses in `browser_data.xhr_call`. Deduplicate by video ID. The open-source scraper includes the scroll loop.

 How do I scrape TikTok comments?

Render the video page with a JavaScript scenario that clicks the comment icon, then read the `/api/comment/list/` response. Each comment has its text, language, posting time, like count and reply count. The open-source scraper returns the first batch of comments TikTok loads.

 Can I scrape TikTok search results?

Yes. Request `https://www.tiktok.com/search?q=` with your keyword, render it with a scroll script, and read the `/api/search/general/full/` responses. Each result gives the video's caption, counts and creator. The open-source scraper scrolls the results for you.

 Why are some TikTok counts round numbers?

TikTok sends most counts from 10,000 up rounded to what it displays, such as 2.2M followers or 70.3K views, and Scrapfly returns the page as TikTok serves it. Smaller counts are exact. For trends, compare the same account or video over time rather than reading small changes in large numbers.

 How much does scraping TikTok cost?

A profile or video page costs 1 credit on datacenter proxies without a browser, 6 with JavaScript rendering. The extraction model adds 5 credits, and 5 more for each 500 KB of page past the first 500 KB, 10 on a rendered video page. The free plan includes 1,000 credits a month.

 What are the rate limits when scraping TikTok?

Scrapfly sets no TikTok-specific limit. Your maximum parallelism is the concurrency quota on your plan, or a lower cap configured for the project. Each in-flight request uses one slot until it finishes.

 

 

  

Start with one request

## Send the URL. Read the JSON.

Web Scraping API, one call per TikTok profile or video URL.

Proxies across 75+ countries

[TikTok scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/tiktok-scraper)[How to scrape TikTok](https://scrapfly.io/blog/posts/how-to-scrape-tiktok-python-json)[YouTube Scraper API](https://scrapfly.io/scrapers/youtube)[Facebook Scraper API](https://scrapfly.io/scrapers/facebook)[All scraper pages](https://scrapfly.io/scrapers)

 

[Get free API key](https://scrapfly.io/register)[Read the docs](https://scrapfly.io/docs/scrape-api/getting-started)