TikTok Trends Scraper
Pricing
from $0.08 / 1,000 videos
TikTok Trends Scraper
Scrape the videos that trend on TikTok now and the top videos of any hashtag. Each hashtag also comes with its video count and view count. Each video comes with its hashtags, author, music, video details, and stats (views, likes, comments, shares, saves).
Pricing
from $0.08 / 1,000 videos
Rating
0.0
(0)
Developer
Kai
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
Share
TikTok Trends Scraper - Trending Videos and Hashtag Analytics
Get the videos that trend on TikTok now, and the top videos of any hashtag, with their stats. Every video is one item in the Dataset: description, hashtags, creation time, author with follower counts, music, video details, and counts of views, likes, comments, shares, and saves. Every hashtag that you add also gives one item with its video count and its view count.
Run it with no input to get a fresh sample of trending videos in about half a minute. Add hashtag URLs to compare hashtags and to read their top videos.
Use cases
Trend monitoring
See what is popular on TikTok right now: which videos, creators, sounds, and hashtags. Run the same input on an Apify schedule and compare the runs.
{"resultsLimit": 100}
Use videoId, desc, hashtags, music.title, author.uniqueId,
stats.views, stats.likes, and stats.shares.
Hashtag analytics
Compare how big hashtags are. Each hashtag gives one item with its video count and view count.
{"hashtagUrls": ["https://www.tiktok.com/tag/space","https://www.tiktok.com/tag/astronomy"],"resultsLimit": 20}
Filter the Dataset on type equal to hashtag. Use name, stats.videos, and
stats.views.
Content research for a niche
Read the top videos of a hashtag, and see which creators, sounds, and co-occurring hashtags go with it.
{"hashtagUrls": ["https://www.tiktok.com/tag/space"],"resultsLimit": 150}
Use author.uniqueId, author.followers, desc, hashtags, music.title,
stats.views, and stats.likes.
Sound and creator discovery
Find the sounds and creators in the trending videos. Sort by stats.views, or
count how often a music.id or an author.uniqueId appears.
Use music.id, music.title, author.uniqueId, author.followers, and
stats.views.
Growth tracking
Run a hashtag on an Apify schedule. Watch stats.videos and stats.views on
the hashtag item to see how fast the hashtag grows. Join the video items of the
runs on videoId, and watch stats.views, stats.likes, and stats.shares
move over time.
Choose what to collect
| Starting point | Input | Use it for |
|---|---|---|
| The trending videos | No input | A sample of what trends now |
| Fewer or more trending videos | resultsLimit | Keep a run short, or read more |
| One or more hashtags | hashtagUrls | The hashtag counts and the top videos |
| Trending videos and hashtags | hashtagUrls and the limit | Both in one run |
The trending videos are always read first. To keep only hashtag data, filter the
Dataset on source equal to hashtag, or on type equal to hashtag.
What each item includes
- Video: ID, URL, description and its language, creation time, hashtags, mentions, and effects
- Video details: duration, size in pixels, format, bitrate, and cover links
- Author: handle, display name, bio, verified flag, avatar link, and follower, following, like, and video counts
- Stats: views, likes, comments, shares, saves, and reposts
- Music: ID, title, author, album, duration, and links
- Flags: ad, and whether duets, stitches, and sharing are on
- Photo posts: the image links
- Source:
explorefor a trending video,hashtagfor a hashtag video, and the hashtag URL from your input - Position: the
rankof a video among the videos of its hashtag - Hashtag item: ID, name, description, video count, view count, and image link
Read the trending videos
Run the Actor with an empty input, or set resultsLimit:
{"resultsLimit": 100}
The Actor saves up to 100 trending videos. The default is 50. The highest value is 1000.
The trending videos are a sample that TikTok picks. It changes from run to run,
and it is not a ranking. A trending video has rank set to null for this
reason. Two runs a few minutes apart share some videos and differ in others.
Read the videos of hashtags
Add hashtag URLs:
{"hashtagUrls": ["https://www.tiktok.com/tag/space"],"resultsLimit": 30}
For each hashtag, the Actor saves one hashtag item, then up to 30 videos. A
hashtag URL looks like https://www.tiktok.com/tag/<name>.
The rank of a hashtag video is its position among the videos of the hashtag,
starting at 1. TikTok sets this order. It is not the order of views or of time.
A hashtag gives about 140 to 175 videos. A higher resultsLimit does not give
more videos for a hashtag.
How results are ordered and limited
Order. The Actor saves the trending videos first. It then handles
hashtagUrls in input order. For each hashtag, the hashtag item comes first,
then the videos of the hashtag in rank order. An error item goes to the Errors
dataset.
Limit. resultsLimit applies to the trending videos and to each hashtag, not
to the complete run. The Actor stops at exactly that number of videos. The
hashtag items do not count.
Same video twice. A video appears once in one source. It can appear again in
another source: the trending videos and a hashtag, or two hashtags. Its source
and inputUrl tell you the source. The same URL twice in hashtagUrls is read
once.
Input
All input fields are optional. An empty input reads the trending videos.
Input reference
| Parameter | Type | Default | Effect |
|---|---|---|---|
| hashtagUrls | string[] | empty | TikTok hashtag URLs. The Actor saves a hashtag item and the top videos of each hashtag. |
| resultsLimit | integer, 1 to 1000 | 50 | Upper limit on saved videos for the trending videos and for each hashtag. |
| proxyConfiguration | object | {"useApifyProxy":true} | Connection settings for the run. Keep the default. |
- A hashtag URL looks like
https://www.tiktok.com/tag/<name>. An entry that is not a hashtag URL gives an error item. The other entries are still read. - A
resultsLimitbelow 1 or above 1000 stops the run before collection. The message names the problem. - Unknown input fields are ignored.
Output
Each Dataset item is one video or one hashtag. A source that the Actor could not
read gives one error item in the Errors dataset, not in the Dataset. The field
type says video or hashtag. Every documented video field is present in every video item.
A value that is not available is null, an empty list, or 0 for a count. The
fields author, stats, music, and video are objects.
Sample video
This is a trending video. The links are removed. It is not a saved Dataset item.
Sample hashtag
The link is removed. It is not a saved Dataset item.
Field reference
| Field | Type and contents |
|---|---|
type | string. video for a video item. |
source | string. explore for a trending video, hashtag for a video of a hashtag. |
inputUrl | string or null. The hashtag URL from your input. null for a trending video. |
rank | number or null. The position among the videos of the hashtag, from 1. null for trending. |
videoId | string. The video ID. |
videoUrl | string. The link to the video. |
desc | string. The description. It is empty when the video has none. |
descLanguage | string or null. The language code of the description, such as en. |
createTime | string or null. The creation time in Unix seconds, such as "1793260800". |
locationCreated | string or null. Always null in this Actor. |
categories | string[]. Always empty in this Actor. |
hashtags | string[]. The hashtags of the description, without #. |
mentions | string[]. The accounts that the description mentions, without @. |
effects | string[]. The names of the effects that the video uses. |
isAd | boolean or null. true for a paid ad. |
isAiGenerated | boolean or null. Always null in this Actor. |
isPinned | boolean or null. Always null in this Actor. |
duetEnabled | boolean or null. Whether other users can make a duet with the video. |
stitchEnabled | boolean or null. Whether other users can stitch the video. |
shareEnabled | boolean or null. Whether the video can be shared. |
captionLanguages | string[]. The caption languages that the video offers, such as eng-US. |
images | string[]. The image links of a photo post. Empty for a video. |
video
| Field | Type and contents |
|---|---|
video.duration | number. The duration in seconds. It is 0 for a photo post. |
video.width | number or null. The width in pixels. |
video.height | number or null. The height in pixels. |
video.ratio | string or null. The resolution label, such as 1080p. |
video.definition | string or null. The quality label, such as 1080p. |
video.format | string or null. The file format, such as mp4. |
video.codec | string or null. The video codec, such as h264. |
video.bitrate | number or null. The bitrate in bits per second. |
video.size | number or null. The file size in bytes. |
video.cover | string or null. A link to the cover image. |
video.originCover | string or null. A link to the original cover image. |
video.dynamicCover | string or null. A link to the animated cover. |
author
| Field | Type and contents |
|---|---|
author.id | string. The account ID. |
author.uniqueId | string. The handle, without @. |
author.nickname | string. The display name. |
author.verified | boolean or null. Whether the account is verified. |
author.signature | string or null. The bio. |
author.createTime | string or null. Always null in this Actor. |
author.private | boolean or null. Whether the account is private. |
author.seller | boolean or null. Always null in this Actor. |
author.avatar | string or null. A link to the avatar image. |
author.followers | number or null. The follower count. |
author.following | number or null. The count of accounts that the author follows. |
author.likes | number or null. The total likes that the account received. |
author.videos | number or null. The video count of the account. |
author.likesGiven | number or null. The count of videos that the account liked. |
stats
| Field | Type and contents |
|---|---|
stats.views | number. The play count. |
stats.likes | number. The like count. |
stats.comments | number. The comment count. |
stats.shares | number. The share count. |
stats.saves | number. The count of users who saved the video. |
stats.reposts | number. The repost count. |
music
| Field | Type and contents |
|---|---|
music.id | string or null. The sound ID. |
music.title | string or null. The sound title. |
music.author | string or null. The name of the sound author. |
music.album | string or null. The album, when the sound has one. |
music.duration | number or null. The duration in seconds. |
music.playUrl | string or null. A link to the audio file. |
music.cover | string or null. A link to the sound cover image. |
- The values in
statsare the values at the time of the run. They change over time. - TikTok rounds large counts, such as
followersof1700000. - Image and audio links expire after about two days. Download the files soon after the run if you need them.
Hashtag fields
| Field | Type and contents |
|---|---|
type | string. hashtag for a hashtag item. |
inputUrl | string. The hashtag URL from your input. |
hashtagId | string. The hashtag ID. |
name | string. The hashtag, without #. |
desc | string. The description of the hashtag. It is empty when the hashtag has none. |
isCommerce | boolean or null. Whether TikTok marks the hashtag as a commerce hashtag. |
image | string or null. A link to the hashtag image. It is null when the hashtag has none. |
stats.videos | number or null. The number of videos with the hashtag. |
stats.views | number or null. The total views of the videos with the hashtag. |
stats.videosandstats.viewsare the figures that TikTok shows for the hashtag. They do not have to match the number of videos that the hashtag gives. One test hashtag showed 96 videos and gave 141.- The hashtag item comes before the videos of the hashtag.
Which fields are empty for which input
These video fields are always empty in this Actor: locationCreated,
categories, isAiGenerated, isPinned, author.createTime, and
author.seller. The Actor still saves them. Each value is null or an empty list.
Other fields can still be empty for one video, for example when the video has no
captions.
The trending videos and the hashtag videos have the same fields. Only these fields differ:
| Field | Trending videos | Hashtag videos |
|---|---|---|
source | explore | hashtag |
inputUrl | null | Hashtag URL |
rank | null | From 1 |
Error items
A source that the Actor cannot read gives one error item in the Errors dataset. The Dataset holds only videos and hashtags. The run goes on with the next source.
{"inputUrl": "https://www.tiktok.com/tag/zzznosuchtag84726153","error": "The hashtag does not exist or is not available.","errorCode": "HASHTAG_UNAVAILABLE"}
An error item has three fields:
| Field | Type and contents |
|---|---|
inputUrl | string or null. The entry from your input. null for the trending videos. |
error | string. A short sentence that says what went wrong. |
errorCode | string. One of the codes below. |
errorCode | Meaning |
|---|---|
NOT_A_HASHTAG_URL | The entry of hashtagUrls is not a hashtag URL. |
HASHTAG_UNAVAILABLE | The hashtag does not exist or is not available. |
READ_FAILED | The trending videos or the videos of a hashtag could not be read. Try again later. |
Limits and field notes
How many videos can I collect?
resultsLimit is an upper limit for the trending videos and for each hashtag, not
a required result count. The Actor can save fewer videos.
- The trending videos are a sample that changes between runs.
resultsLimitgoes up to 1000. - A hashtag gives about 140 to 175 videos. In our tests, one hashtag gave 150 videos and another 141. A hashtag with a large video count still gives about 140 to 175 videos.
How long does a run take?
These times are from our tests. Times can differ from run to run.
| Run | Time |
|---|---|
| The trending videos with the default limit of 50 | about 30 s |
| 150 trending videos and one hashtag of 150 videos | about 80 s |
| A hashtag that does not exist, with 1 trending video | about 20 s |
| 1000 trending videos and two hashtags of about 150 each | about 2.5 minutes |
A source that cannot be read at all takes longer: about 1.5 minutes for the trending videos and about 3 minutes for a hashtag in our tests.
Are the trending videos always the same?
No. TikTok picks them, and they change from run to run. Use createTime to see
the age of each video, and stats.views to sort them.
Are the hashtag videos recent?
Not always. TikTok picks the videos of a hashtag, and many of them are old.
Which videos are available?
The Actor reads public data only. Private accounts and age-gated videos are not available.
Why are some fields empty?
Not every video has every field, and some fields are always empty in this Actor. The Actor still saves the video. See Which fields are empty for which input.
What happens when a source fails?
The Actor gives an error item, writes a warning to the log, and continues with the next source. The items that it already saved stay in the Dataset.
If nothing at all can be read, the run fails with the message "No video could be read. Check the input and try again." The error items stay in the Errors dataset. Invalid input also fails the run with a message that names the problem.
Can a video disappear after I collect it?
Yes. A creator can delete a video or make it private at any time. Compare runs of the same input to find the videos that are gone.
Similar Actors
- TikTok Video Comments Scraper. The comments of TikTok videos, with replies and video stats.
- TikTok Shop Scraper. TikTok Shop product, seller, offer, delivery, and review data.
- Instagram Scraper. Public Instagram profiles, posts, reels, comments, and places.
- YouTube Scraper. YouTube videos, channels, playlists, comments, captions, and live chat.