![🎵 TikTok Explorer avatar](https://images.apifyusercontent.com/sEaKaGxVb_v48BJ0C1pz9jphuCQ6n9mOexX7yRKsGLI/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vOWF2T215YlBRYW9XMUNEYXMvZGZSTWhiS1BMbE5JRjg5ZEgtdGlrdG9rcmVkLnBuZw.webp)
7 days trial then $30.00/month - No credit card required now
![🎵 TikTok Explorer](https://images.apifyusercontent.com/sEaKaGxVb_v48BJ0C1pz9jphuCQ6n9mOexX7yRKsGLI/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vOWF2T215YlBRYW9XMUNEYXMvZGZSTWhiS1BMbE5JRjg5ZEgtdGlrdG9rcmVkLnBuZw.webp)
🎵 TikTok Explorer
7 days trial then $30.00/month - No credit card required now
Explore TikTok.com
Welcome to TikTok Scraper
🎵 About TikTok.com
TikTok, whose mainland Chinese counterpart is Douyin,[a][3] is a short-form video hosting service owned by Chinese internet company ByteDance. It hosts user-submitted videos, which can range in duration from three seconds to 10 minutes.[4] It can be accessed with a smart phone app.
Since its launch, TikTok has become one of the world's most popular social media platforms, using recommendation algorithms that were better than alternative apps at connecting content creators with new audiences.[5] Many of its users are young, of Generation Z. In April 2020, TikTok surpassed two billion mobile downloads worldwide.[6] Cloudflare ranked TikTok the most popular website of 2021, surpassing Google.[7] The popularity of TikTok has allowed viral trends in food and music to take off and increase the platform's cultural impact worldwide.[8]
🎵 About This Actor
All-in-One general purpose TikTok Scraper
Features :
- ⭐search videos, users, live.
- ⭐search by hashtag.
- ⭐search by place.
- ⭐search music.
- ⭐access user specific data: info, followers, following, videos, playlist (mix)
- ⭐autodetect tiktok.com URL (aka. Starting URL) input.
- ⭐minimal inputs.
- ⭐directly open media/video/music URLs (via browser/cookie synchronize) or download individual video (watermarked or unwatermarked) to key-value storage.
- ⭐directly access tiktok.com web internal API, no browser emulation, fast and small memory usage.
- ⭐multiple queries in single request.
- ⭐small docker file size (only 100 mb), fast loading.
🎵 IMPORTANT NOTES
To be able to view media file URLs (covers, videos, etc.), you need to synchronize your browser's Internal Values (cookies) with this Actor, Otherwise, you won’t be able to open the media URLs provided by the Actor results. There are 3 cookies needed from tiktok.com domain :
- 🆔
ttwid
- 🆔
tt_chain_token
- 🆔
tt_csrf_token
This process doesn't requires your login info. You can first Log Out from TikTok if you want or use new fresh Chrome Incognito window.
Please visit https://www.tiktok.com and find these 3 cookie values from your browser (device) and copy paste here:
Advanced Options
🎵 Video Download
To open video URLs directly from your browser, you can synchronize your browser with the Actor (recommended, see above), or download individual video to default Key-Value storage.
example:
{ "query": ["7112413115530104090/download"] }
The resulting data will same as normal, except link to video URL will be replaced with link to Key-Value storage URLs.
example:
1{ 2 "id": "7112413115530104090", 3 ... 4 "video": { 5 # watermarked 6 "downloadAddr": "https://api.apify.com/v2/key-value-stores/...", 7 ... 8 # no-watermarked 9 "playAddr": "https://api.apify.com/v2/key-value-stores/...", 10 } 11 ... 12}
🎵 Quick Guide
TikTok Query Language
[ [ <COMMAND:> | # | @ ] [ <NAME> | <ID> | <KEYWORD> ] [ / <SECTION> ] | <URL> ]
Possible Query Values
Format | Examples | Description |
---|---|---|
KEYWORDS | search terms | Search anything |
top:KEYWORDS | top:square pants | Search TOP contents |
users:KEYWORDS | users:joefree | Search users |
videos:KEYWORDS | videos:yellow cat | Search videos |
music:KEYWORDS | music:sunda | Search music |
live:KEYWORDS | live:cat show | Search live |
EXPLORE | Explore Categories | |
:home | explore:home | Explore Home |
:CATEGORY_ID | explore:119 | Explore video by category ID |
:CATEGORY_NAME | explore:comedy | Explore video by category name |
#HASHTAG | #music | Exploring Hashtag (Challenge) |
/info | #music/info | Hashtag info and stats |
/videos | #music/videos | Hashtag videos |
@USER | @elonmusk | Scraping User Info |
/info | @elonmusk/info | User info |
/videos | @elonmusk/videos | User videos |
/reposts | @elonmusk/reposts | User reposts videos |
/liked | @elonmusk/liked | User liked videos |
/playlist | @elonmusk/playlist | User playlist |
/following | @elonmusk/following | User following |
/followers | @elonmusk/followers | User followers |
/suggested | @elonmusk/suggested | Suggested users |
VIDEO_ID | 7112413115530104090 | Scraping Video Data |
/info | 7112413115530104090/info | Video info |
/comments | 7112413115530104090/comments | Video comments |
/related | 7112413115530104090/related | Related videos |
/download | 7112413115530104090/download | Download videos |
playlist:PLAYLIST_ID | User Playlist (Mix) | |
playlist:PLAYLIST_ID | playlist:XXXXXXXXXXXXXX | Playlist videos (see: @user/playlist ) |
channel:CHANNEL_ID | Exploring Channels | |
channel:CHANNEL_ID | channel:food_and_drink | Channel videos |
music:MUSIC_ID | Scraping Music Data | |
/info | music:7112413142386297627/info | Music info |
/videos | music:7112413142386297627/videos | Videos using this music |
place:PLACE_ID | Scraping a Place Related Videos | |
/info | place:22535865204947327/info | Place info (Boston) |
/videos | place:22535865204947327/videos | Videos related to place |
https:URL | https://www.tiktok.com | Starting URL |
/search?q=<KEYWORD> | top:KEYWORD or only KEYWORD | |
/search/video?q=<KEYWORD> | video:KEYWORD | |
/search/user?q=<KEYWORD> | user:KEYWORD | |
/search/live?q=<KEYWORD> | live:KEYWORD | |
/tag/<HASHTAG> | #HASHTAG | |
/place/place-name-<PLACE_ID> | place:PLACE_ID | |
/music/music-name-<MUSIC_ID> | music:MUSIC_ID | |
/channel/<CHANNEL_NAME> | channel:CHANNEL_NAME | |
/<USERNAME> | @USERNAME | |
/<USERNAME>/video/<VIDEO_ID> | VIDEO_ID | |
/explore | explore:CATEGORY_ID_OR_NAME |
Category List
QUERY explore:CATEGORY_ID_OR_NAME
ID | Name | Description |
---|---|---|
100 | anime_comics | Anime & Comics |
101 | shows | Shows |
102 | beauty_care | Beauty Care |
103 | games | Games |
104 | comedy | Comedy |
105 | daily_life | Daily Life |
106 | family | Family |
107 | relationship | Relationship |
108 | drama | Drama |
109 | outfit | Outfit |
110 | lipsync | Lipsync |
111 | food | Food |
112 | sports | Sports |
113 | animals | Animals |
114 | society | Society |
115 | cars | Cars |
116 | education | Education |
117 | fitness_health | Fitness & Health |
118 | technology | Technology |
119 | singing_dancing | Singing & Dancing |
🎵 Tutorial
Running Actor via JavaScript Fetch :
TODO: Apify Platform should have example on how to run actor using JS Fetch
1const APIFY_TOKEN = "YOUR_APIFY_TOKEN" 2 3var run_inputs = {"query": ["square pants"], "limit": 50} 4var url = "https://api.apify.com/v2/acts/" 5 + "jupri~tiktok/run-sync-get-dataset-items?token=" 6 + APIFY_TOKEN 7 8var headers = { "content-type": "application/json" } 9var options = { method: "POST", headers, body: JSON.stringify(run_inputs) } 10 11var response = await fetch(url, options).then(res => res.json())
Example #1: Searching for Video
{ "query": ["square pants"], "limit": 50 }
Example #2: Searching on Category
1# category by id (104 for "Comedy") 2{ "query": ["explore:104"], "limit": 50 } 3 4# category by name 5{ "query": ["explore:comedy"], "limit": 50 }
Example #3: Searching for #hashtag
1# hastag videos 2{ "query": ["#music"], "limit": 50 } 3 4# hastag info (statistics) 5{ "query": ["#music/info"] }
Example #4: User Info
1# user videos 2{ "query": ["@elonmusk"], "limit": 50 } 3{ "query": ["@elonmusk/videos"], "limit": 50 } 4 5# user info (statistics) 6{ "query": ["@elonmusk/info"] }
Example #5: Multiple Queries
Warning: This is just an example. Different query may have different fields/attributes set. When you request multiple queries, makes sure all have same type of query.
1{ 2 # different type of query is OK, but not recommended! 3 "query": [ 4 "square pants", 5 "explore:comedy", 6 "#music/info", 7 "#music", 8 "@elonmusk/info", 9 "@elonmusk/videos" 10 ], 11 "limit": 50 # limit per query 12}
Other Examples
... almmost there (just follow your insting for now) ...
![](https://images.apifyusercontent.com/J-sV1kMCfXajqc3nq8JabksOxtaLOp_flPH6c6-3mtY/aHR0cHM6Ly9hcGlmeS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vNVN4Wmh3WXdwa25GazhlazktY2F0LmdpZg.gif)
🎵 ToolTips
❓QUERY :
Format | Section / Commands | Example |
---|---|---|
KEYWORDS | top: users: videos: music: live: | videos:square pants |
explore: | home CATEGORY_ID CATEGORY_NAME | explore:comedy |
#HASHTAG | /info /videos | #music/videos |
@USER | /info /videos /playlist /following /followers | @elonmusk/videos |
VIDEO_ID | /info /comments /related /download | 7112413115530104090/comments |
playlist:PLAYLIST_ID | playlist:XXXXXXXXXXXXXX | |
channel:CHANNEL_ID | channel:dance | |
music:MUSIC_ID | /info /videos | music:7112413142386297627/videos |
place:PLACE_ID | /info /videos | place:22535865204947327/videos |
URL | https://www.tiktok.com/search?q=square pants |
- 6 monthly users
- 2 stars
- 100.0% runs succeeded
- Created in May 2024
- Modified 2 months ago