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 8 |
+
- text-classification
|
| 9 |
+
- text-generation
|
| 10 |
+
- feature-extraction
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
- es
|
| 14 |
+
- pt
|
| 15 |
+
- id
|
| 16 |
+
- ar
|
| 17 |
+
tags:
|
| 18 |
+
- tiktok
|
| 19 |
+
- social-media
|
| 20 |
+
- short-video
|
| 21 |
+
- recommender-systems
|
| 22 |
+
- social-network-analysis
|
| 23 |
+
configs:
|
| 24 |
+
- config_name: default
|
| 25 |
+
data_files: "videos-*.parquet"
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
# TikTok Videos: 4.5 billion posts with engagement metrics
|
| 29 |
+
|
| 30 |
+
4.5 billion TikTok video records with captions, engagement counts, sound
|
| 31 |
+
identifiers and timing. Collected from TikTok's mobile API over roughly three
|
| 32 |
+
weeks. Every `content_id` appears exactly once.
|
| 33 |
+
|
| 34 |
+
This is the largest public TikTok dataset I am aware of. It is released as-is,
|
| 35 |
+
for research.
|
| 36 |
+
|
| 37 |
+
## What is in it
|
| 38 |
+
|
| 39 |
+
27 Parquet files, zstd compressed, about 289 GB in total. One row per video.
|
| 40 |
+
|
| 41 |
+
| Column | Type | Description |
|
| 42 |
+
|---|---|---|
|
| 43 |
+
| `content_id` | uint64 | TikTok's video ID. Unique across the dataset |
|
| 44 |
+
| `create_time` | datetime | When the video was posted |
|
| 45 |
+
| `desc` | string | The caption, as written by the creator |
|
| 46 |
+
| `mentions` | list[uint64] | Account IDs tagged in the video |
|
| 47 |
+
| `duration` | uint16 | Length in seconds |
|
| 48 |
+
| `is_video` | uint8 | 1 for video, 0 for a photo post |
|
| 49 |
+
| `music_id` | uint64 | The sound used. Join key across videos |
|
| 50 |
+
| `music_title` | string | Name of the sound |
|
| 51 |
+
| `views` | uint64 | Play count at collection time |
|
| 52 |
+
| `likes` | uint64 | |
|
| 53 |
+
| `comments` | uint64 | Comment count |
|
| 54 |
+
| `shares` | uint64 | |
|
| 55 |
+
| `saves` | uint64 | Bookmarks. Often the earliest signal that something is moving |
|
| 56 |
+
| `country` | string | Two-letter country code |
|
| 57 |
+
| `language` | string | Language code |
|
| 58 |
+
| `is_ad` | uint8 | Marked as sponsored |
|
| 59 |
+
|
| 60 |
+
## Getting started
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
import duckdb
|
| 64 |
+
|
| 65 |
+
# Query it without loading it. No unpacking, no full download needed.
|
| 66 |
+
duckdb.sql("""
|
| 67 |
+
SELECT music_id, music_title, count(*) AS videos, sum(views) AS plays
|
| 68 |
+
FROM 'videos-*.parquet'
|
| 69 |
+
WHERE create_time >= '2025-01-01'
|
| 70 |
+
GROUP BY 1, 2 ORDER BY plays DESC LIMIT 20
|
| 71 |
+
""").show()
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
```python
|
| 75 |
+
import pandas as pd
|
| 76 |
+
df = pd.read_parquet("videos-00.parquet", columns=["content_id", "views", "desc"])
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
```python
|
| 80 |
+
from datasets import load_dataset
|
| 81 |
+
ds = load_dataset("kuben-developer/tiktok-videos-4b", streaming=True)
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
One file is about 10 GB and holds roughly 167 million videos, so start with a
|
| 85 |
+
single file before pulling all 27.
|
| 86 |
+
|
| 87 |
+
## How it was collected
|
| 88 |
+
|
| 89 |
+
Through the private HTTP API that TikTok's Android app uses, rather than the web
|
| 90 |
+
endpoints or a headless browser. Requests are signed the way the app signs them,
|
| 91 |
+
from anonymous device registrations. There is no login anywhere in the pipeline,
|
| 92 |
+
no account, and no session cookie, so nothing here is account-gated content.
|
| 93 |
+
|
| 94 |
+
The method is written up in full at
|
| 95 |
+
<https://tiktok-api.seeksocial.io>.
|
| 96 |
+
|
| 97 |
+
## Things to know before you use it
|
| 98 |
+
|
| 99 |
+
**The counts are a snapshot, not a time series.** Every engagement number is
|
| 100 |
+
whatever it was at the moment that row was collected, somewhere in a three week
|
| 101 |
+
window. A video collected on day one and a video collected on day twenty have had
|
| 102 |
+
different amounts of time to accumulate views. Do not compare raw counts across
|
| 103 |
+
distant `create_time` values without normalising for age.
|
| 104 |
+
|
| 105 |
+
**Rows are grouped by creator, not shuffled.** The export preserves the storage
|
| 106 |
+
order, which clusters each creator's videos together. If you are training on this,
|
| 107 |
+
shuffle. Reading it sequentially gives you highly correlated batches.
|
| 108 |
+
|
| 109 |
+
**Creator identity is not included.** There is no author ID, username or profile
|
| 110 |
+
data. You can group videos by sound, hashtag mention or caption, but not by who
|
| 111 |
+
posted them. This is deliberate.
|
| 112 |
+
|
| 113 |
+
**Media URLs are not included.** TikTok's CDN links carry signed expiry
|
| 114 |
+
parameters and stop working within days, so shipping 539 GB of them would have
|
| 115 |
+
been 539 GB of dead links.
|
| 116 |
+
|
| 117 |
+
**Coverage is a sample, not a census.** This is 27 of 32 storage partitions,
|
| 118 |
+
split on a hash of the creator ID, so it is an unbiased random subset of what was
|
| 119 |
+
collected rather than a filtered one. What was collected is itself not all of
|
| 120 |
+
TikTok.
|
| 121 |
+
|
| 122 |
+
**Deduplicated on `content_id`.** The source table had about 10% repeat rows from
|
| 123 |
+
overlapping collection passes. Those are collapsed, keeping the most recently
|
| 124 |
+
seen version of each video.
|
| 125 |
+
|
| 126 |
+
**`country` and `language` are TikTok's labels**, inferred by them, not verified.
|
| 127 |
+
They are wrong often enough that you should not treat them as ground truth.
|
| 128 |
+
|
| 129 |
+
## Licence and responsible use
|
| 130 |
+
|
| 131 |
+
Released for research and educational use.
|
| 132 |
+
|
| 133 |
+
Captions are written by real people and this dataset is personal data under GDPR,
|
| 134 |
+
the UK GDPR and CCPA regardless of the fact that it was publicly posted. If you
|
| 135 |
+
are in a jurisdiction those apply to, that obligation is yours the moment you
|
| 136 |
+
download it. Do not use this to identify, profile, target or contact individuals.
|
| 137 |
+
|
| 138 |
+
Collection was contrary to TikTok's terms of service. This dataset is not
|
| 139 |
+
affiliated with, endorsed by, or connected to TikTok or ByteDance.
|
| 140 |
+
|
| 141 |
+
If you are named in this data and want your rows removed, open a discussion on
|
| 142 |
+
this repository.
|