---
title: "TikTok Scraping: Videos, Stats and Comments | Scrape.ly"
description: "TikTok scraping without a login: captions, plays, likes, shares and comments from public videos, with a real run, API code, costs and the legal rules."
url: https://scrape.ly/blog/tiktok-scraping
markdown: https://scrape.ly/blog/tiktok-scraping.md
---

[Tutorials](https://scrape.ly/blog/category/tutorials.md)

# TikTok Scraping: Get Videos, Plays, Likes and Comments as JSON

TikTok scraping gets you captions, play, like, share and comment counts, music and hashtags from public profiles, hashtags and keyword searches. Here is how to do it without code or with the API, using a real keyword-search run.

[Echofield Actor publisher on the Scrape.ly Store](https://scrape.ly/blog/author/echofield.md)

- Published

  Oct 22, 2026

- Reading time

  8 min read

![Pixel-art robot with an orange >\_ on its terminal head pulls a stats card with a bar chart out of a phone showing the TikTok logo and loads it into a crate](https://scrape.ly/media/tiktok-scraping.png?w=1080)

TikTok scraping means collecting public video data from profiles, hashtags, keyword searches and video URLs: captions, play, like, share and comment counts, durations, music, hashtags and author stats. The fastest way is a ready-made Actor: type a keyword or hashtag, set how many videos you want, and export JSON or CSV a few seconds later. No TikTok login is involved.

This guide shows the fields you get, how to run the scraper without code, and how to call it from curl, Python, JavaScript or an AI agent. It also covers costs, limits, the legal side and the official alternative. Every number comes from a real run on 22 October 2026 that searched TikTok's video tab for "pasta recipe".

## What data you can get from TikTok

Each row is one public video or post. These fields come from the Actor's dataset views and our sample record:

| Field                                            | What it holds                           |
| ------------------------------------------------ | --------------------------------------- |
| `text`                                           | Caption, including hashtags             |
| `createTimeISO`                                  | Upload time in UTC                      |
| `webVideoUrl`                                    | Link to the video                       |
| `playCount`                                      | Plays                                   |
| `diggCount`                                      | Hearts (likes)                          |
| `shareCount`                                     | Shares                                  |
| `commentCount`                                   | Number of comments                      |
| `collectCount`                                   | Saves                                   |
| `videoMeta.duration`                             | Length in seconds                       |
| `musicMeta.musicName`, `musicMeta.musicOriginal` | The sound, and whether it is original   |
| `hashtags`                                       | Hashtag objects with `name`             |
| `authorMeta.fans`, `authorMeta.verified`         | Author follower count and verified flag |
| `isAd`                                           | Whether the video is an ad              |
| `searchQuery`                                    | The keyword that found the video        |

A field TikTok didn't send stays off the row, and a real `0` stays `0`. Private accounts are skipped, and AI video descriptions or summaries are not returned, because TikTok's payload doesn't include them.

## How to scrape TikTok without code

1. Open the [TikTok Scraper](https://scrape.ly/store/echofield/tiktok-scraper.md) in the Scrape.ly Store.
2. Pick the [Pasta recipe videos preset](https://scrape.ly/store/echofield/tiktok-scraper/presets/keyword-search-video.md). It fills in this input:

```json
{
  "searchQueries": [
    "pasta recipe"
  ],
  "searchSection": "/video",
  "resultsPerPage": 5,
  "proxyCountryCode": "None"
}
```

3. Change the keyword, or switch to `hashtags`, `profiles` or `postURLs`.
4. Start the run. Ours finished in under 7 seconds.
5. Export the results as JSON, CSV or Excel.

The input fields that matter most:

- `searchQueries`, `hashtags`, `profiles`, `postURLs`: what to scrape. Give at least one. Hashtags go in without the `#`, profiles without the `@`.
- `searchSection`: which search tab to use. Empty for Top results, `/video` for the Video tab, or the Profile tab.
- `resultsPerPage`: how many videos per keyword, hashtag or profile. Default 20.
- `commentsPerPost`: comments to collect per video, including replies. Default 0, which turns comments off.
- `proxyCountryCode`: scrape from a residential proxy in one country. With `None`, keyword searches run from Canada so repeated runs see the same ranking.

For date windows, use `oldestPostDateUnified` and `newestPostDate` on profiles and hashtags, or `videoSearchDateFilter` on searches.

Scrape.ly Store TikTok Scraper Public TikTok videos from profiles, hashtags, keyword searches and video URLs: captions, plays, hearts, shares, comments, music and author stats.

[Try it free](https://scrape.ly/store/echofield/tiktok-scraper.md) [Browse the Store](https://scrape.ly/store.md)

## How to scrape TikTok with the API

Get your token from **Settings → API & Integrations** in the Scrape.ly dashboard and export it as `SCRAPELY_TOKEN`. The [Actor API docs](https://scrape.ly/docs/api-actors.md) list every endpoint.

### curl

This search runs in seconds, well inside the 45-second limit of the synchronous endpoint, so one call starts the run and returns the items as a JSON array. Add `?format=csv` for CSV.

```shell
curl -X POST "https://api.scrape.ly/v2/actors/echofield~tiktok-scraper/run-sync-get-dataset-items"
  -H "Authorization: Bearer $SCRAPELY_TOKEN"
  -H "Content-Type: application/json"
  -d '{"searchQueries": ["pasta recipe"], "searchSection": "/video", "resultsPerPage": 5, "proxyCountryCode": "None"}'
```

If a bigger run takes longer than 45 seconds, the call answers `408` and the run keeps going. Don't call again, because that starts a second run. Switch to the asynchronous flow or a client.

### Python

Install the [Python client](https://scrape.ly/docs/client-python.md) with `pip install scrapely-client-python`. `call()` waits for the run however long it takes.

```python
import os
from scrapely_client import ScrapelyClient

client = ScrapelyClient(os.environ["SCRAPELY_TOKEN"], api_url="https://api.scrape.ly")

run = client.actor("echofield/tiktok-scraper").call(
    run_input={
        "searchQueries": ["pasta recipe"],
        "searchSection": "/video",
        "resultsPerPage": 5,
        "proxyCountryCode": "None",
    }
)
print(run.status)  # SUCCEEDED, FAILED, ABORTED or TIMED-OUT
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item.get("playCount"), item.get("diggCount"), item.get("webVideoUrl"))
```

### JavaScript

Install the [JavaScript client](https://scrape.ly/docs/client-js.md) with `npm install scrapely-client`.

```javascript
import { ScrapelyClient } from 'scrapely-client';

const client = new ScrapelyClient({ token: process.env.SCRAPELY_TOKEN, baseUrl: 'https://api.scrape.ly' });

const run = await client.actor('echofield/tiktok-scraper').call({
  searchQueries: ['pasta recipe'],
  searchSection: '/video',
  resultsPerPage: 5,
  proxyCountryCode: 'None',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, items[0]);
```

The [dataset API](https://scrape.ly/docs/api-datasets.md) explains paging and export formats if you read the rows yourself.

### MCP for AI agents

Scrape.ly runs a hosted [MCP server](https://scrape.ly/docs/mcp.md) at `https://api.scrape.ly/mcp`. In Cursor, add it to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "scrapely": {
      "url": "https://api.scrape.ly/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}
```

In Claude Code, run `claude mcp add --transport http scrapely https://api.scrape.ly/mcp`, then `/mcp` to sign in with OAuth. The agent uses `search-actors`, `fetch-actor-details`, `call-actor` and `get-actor-output`. Try: "Use scrapely to run echofield/tiktok-scraper on the TikTok video search for 'pasta recipe', 5 results, and give me a CSV of caption, plays, hearts and upload date."

## A real run: Pasta recipe videos, 5 results

We ran the preset on 22 October 2026. It saved 5 videos in 6.8 seconds on 256 MB of memory and was charged $0.0179 in total. The names `[creator 1]` to `[creator 5]` are our placeholders: the accounts this search found belong to private individuals, so we don't publish their handles. The `shareCount` column is left out for width.

| text                                                                      | authorMeta.name | playCount | diggCount | commentCount | videoMeta.duration | createTimeISO            |
| ------------------------------------------------------------------------- | --------------- | --------- | --------- | ------------ | ------------------ | ------------------------ |
| Creamy pasta recipe 🍝✨ 1/2 onion 2 cloves fresh garlic 3 tbsp tomato…    | \[creator 1]    | 7,100,000 | 276,200   | 1,175        | 62                 | 2026-05-10T16:42:50.000Z |
| Hubby gave it an 8.5/10… chicken would’ve made it a 10/10 👀 Level: E…    | \[creator 2]    | 4,100,000 | 70,000    | 400          | 0                  | 2026-02-16T21:51:19.000Z |
| Creamy Garlic Parmesan Chicken Pasta Recipe! (FULL RECIPE LINKED IN B…    | \[creator 3]    | 2,900,000 | 275,100   | 1,882        | 34                 | 2026-07-16T21:38:39.000Z |
| 🧀 Creamy Alfredo Pasta Ingredients \* 340 g (12 oz) fettuccine \* 2 tbs… | \[creator 4]    | 256,000   | 2,010     | 3            | 0                  | 2026-07-28T04:36:29.000Z |
| Creamy Spicy Pasta You'll want every night 🔥 Ingredients: • 1 small o…   | \[creator 5]    | 5,000,000 | 108,800   | 540          | 47                 | 2025-03-25T18:22:53.000Z |

The console excerpt:

```plaintext
20261022T15:23:02.900Z [Scrapely] Container started (setup 0.8 s)
20261022T15:23:04.063Z [scrapely.actor] INFO  [Scrapely] Initializing API storage for run 6a3a3ad0306243f58
20261022T15:23:04.204Z [scrapely.proxy_configuration] INFO  Platform proxy access check succeeded.
20261022T15:23:07.769Z [scrapely.actor] INFO  Video search 'pasta recipe': 5 videos (max 5)
20261022T15:23:08.575Z [scrapely.actor] INFO  [Status message]: Saved 5 items.
20261022T15:23:08.999Z [Scrapely] Container state: status=exited exitCode=0 oomKilled=false
```

Three things stand out. The results span March 2025 to July 2026, so a keyword search is not a feed of new videos; set `videoSearchDateFilter` if you need recent ones. Play counts arrive rounded (7,100,000, 4,100,000), while comment counts such as 1,175 are exact, so treat the large numbers as approximate. And two rows report a duration of `0`, so check for zeros before you average durations.

## What it costs

The Actor charges per event:

- **Result:** $0.0035 per saved video or post.
- **Comment:** $0.0008 per saved comment, only when you ask for comments.
- **Follower or following row:** $0.0024 per row, only when you set a cap.
- **Date filter:** $0.0008 per result when a date filter is set and applied.
- **Popularity filter:** $0.0008 per result when `leastDiggs` or `mostDiggs` is set and applied.
- **Video download:** $0.0008 per video file downloaded and stored.

This run saved 5 results with no add-ons, so the result fees were 5 × $0.0035 = $0.0175. The run was charged $0.0179 in total because about $0.0004 of platform usage was added: residential proxy traffic, compute and dataset writes.

For 1,000 videos you pay $3.50 in result fees. With a date filter applied to all of them, that becomes $4.30 (1,000 × $0.0043). Adding 10 comments per video adds 10,000 × $0.0008 = $8.00. Platform usage comes on top, and failed inputs such as private profiles or dead links are never charged.

## Limits and common problems

- **Private and missing accounts are skipped.** A private profile, a missing profile or a dead URL doesn't create a row. It is named in the status message and in the run's `OUTPUT` record under `failedInputs`.
- **Search sorting is approximate.** TikTok's logged-out search ignores sorting and date settings, so the Actor applies them itself. Sorting re-orders up to three times your limit of matching videos, not all of TikTok.
- **Popular profile videos are capped.** With `profileSorting` set to `popular`, TikTok returns at most about 400 to 500 videos, and date filters don't apply.
- **Comments can come back short.** TikTok may return fewer comments than you asked for on busy videos, and doesn't always return every reply.
- **Hearts filters and date filters don't mix.** `leastDiggs` and `mostDiggs` are ignored when a date filter is set.
- **Media links are not files.** `videoMeta.downloadAddr` and similar fields are signed CDN links. To keep a video, set `shouldDownloadVideos`, which stores the file after checking it is a real video.

## Is it legal to scrape TikTok?

The videos and counts in this guide are public: anyone can see them without logging in. TikTok's own rules are strict, though. Its [US Terms of Service](https://www.tiktok.com/legal/page/us/terms-of-service/en) say you may not scrape, crawl, export or otherwise extract data from the platform with any automated system, except as approved in writing.

Most TikTok accounts belong to private people, so usernames, captions, follower counts and comments are often personal data. Privacy laws like the GDPR and CCPA then apply to how you collect, store and use them, which is why we mask creators in this guide. Collect only what you need and avoid building profiles of individuals. This is not legal advice: talk to a lawyer about your specific use case before you scrape TikTok at scale.

## Alternatives

- **The TikTok Research API.** TikTok's official route to public data is the [Research API](https://developers.tiktok.com/products/research-api/). It is open to academic institutions in the U.S., EEA, UK, Canada or Switzerland, and to not-for-profit research bodies in the EU. Applicants must be independent of commercial interests and submit a research proposal with an ethical review, and TikTok typically answers within four weeks. If you qualify, it is the better choice for published research. It isn't meant for commercial work.
- [**drawrowfly/tiktok-scraper**](https://github.com/drawrowfly/tiktok-scraper) **.** An open-source TypeScript tool for video posts and user, hashtag and music feeds. GitHub shows no pushes since May 2023, so test it against today's TikTok before you rely on it.
- **A headless browser.** Playwright or Puppeteer with residential proxies gives you full control. You also take on TikTok's bot detection, signed requests and frequent front-end changes, which is real upkeep for a small project. It is the better choice only if you need data no existing tool returns.

## FAQ

### How do I scrape TikTok videos by keyword?

Put the keyword in `searchQueries`, set `searchSection` to `/video`, and choose `resultsPerPage`. Each row keeps the keyword in `searchQuery`, so you can run several keywords in one go and still tell them apart.

### Can you scrape TikTok comments?

Yes. Set `commentsPerPost` to the number you want per video, and `maxRepliesPerComment` for replies. Each saved comment costs $0.0008. Comments are often written by private individuals, so treat them as personal data.

### Can you scrape a TikTok profile's followers?

Yes, with `maxFollowersPerProfile` or `maxFollowingPerProfile`. Those rows go into a separate dataset linked from each video and cost $0.0024 each. Follower lists are lists of people, so check the privacy rules before you collect them.

### Does TikTok have an official API for scraping?

TikTok's Research API gives approved academic and not-for-profit researchers access to public data. Applicants must be independent of commercial interests, so it doesn't cover business use. Outside that program, the options are reading public pages yourself or using a ready-made tool, within the limits described in the legal section above.

### How much does TikTok scraping cost?

$3.50 per 1,000 videos in result fees, plus platform usage. Comments, filters and downloads add $0.0008 per item each. Our five-video search cost $0.0179 in total.

Scrape.ly Store Scrape TikTok videos and searches Turn public TikTok profiles, hashtags, keyword searches and video URLs into a dataset of captions, plays, hearts, shares and comments. $3.50 per 1,000 videos.

[Try it free](https://scrape.ly/store/echofield/tiktok-scraper.md) [Browse the Store](https://scrape.ly/store.md)

About the author

[Echofield](https://scrape.ly/blog/author/echofield.md) Actor publisher on the Scrape.ly Store

Posts, reels, comments and creator stats, from TikTok and YouTube to Weibo and Bluesky. For social listening, creator research and catching a trend while it is still small. A Scrapely studio.

- [Website](https://scrape.ly/users/echofield.md)

Keep reading

## More in Tutorials

- [![Pixel-art robot with an orange >\_ on its terminal head pulls a video card with the YouTube play-button logo out of a large monitor showing the YouTube logo and loads it into a crate](https://scrape.ly/media/youtube-scraping.png?w=750)](https://scrape.ly/blog/youtube-scraping.md)
  ### [YouTube Scraping: Get Video Stats, Channel Data and Subtitles](https://scrape.ly/blog/youtube-scraping.md)
  [YouTube scraping gets you titles, views, likes, comment counts, durations and channel stats from public channels, playlists and searches. Here is how to do it without code or with the API, using a real run on the NASA JPL channel.](https://scrape.ly/blog/youtube-scraping.md)
- [![Pixel-art robot with a grey terminal head showing an orange >\_ pulls a post card out of a Reddit feed, topped by the orange Reddit Snoo logo, and drops it into a crate](https://scrape.ly/media/reddit-scraping.png?w=750)](https://scrape.ly/blog/reddit-scraping.md)
  ### [Reddit Scraping: How to Collect Posts, Comments and Subreddit Data](https://scrape.ly/blog/reddit-scraping.md)
  [Reddit scraping without an account or API key: collect public posts, comment threads and subreddit details by keyword, subreddit or URL, then export JSON or CSV. A real run, the cost per result, limits and what Reddit's terms say.](https://scrape.ly/blog/reddit-scraping.md)
- [![Pixel-art robot with an orange >\_ on its terminal head pulls a listing card out of a grey house next to a yard sign with the blue Zillow logo and drops it into a crate](https://scrape.ly/media/scrape-zillow-data.png?w=750)](https://scrape.ly/blog/scrape-zillow-data.md)
  ### [How to Scrape Zillow Data: Prices, Zestimates and Home Facts by City or URL](https://scrape.ly/blog/scrape-zillow-data.md)
  [Give a ready-made Actor a city, a Zillow search or home URL, or a street address, and get one row per listing with price, beds, baths, living area and Zestimate. This guide covers the no-code steps, the API, a real run and its cost.](https://scrape.ly/blog/scrape-zillow-data.md)

## The internet is full of data. Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes. The advantage lasts forever.

[Get Started Free](https://my.scrape.ly/register) [Chat with Support](mailto:support@scrape.ly?subject=Question%20about%20Scrape.ly\&body=Hi%2C%20I%20have%20a%20question%20about%20Scrape.ly.)

No credit card. No setup calls.
