Run the TikTok scraper and return its dataset items
POST/acts/harshmaur~tiktok-scraper/run-sync-get-dataset-items
- Takes: Username
- Takes: URL
- Takes: Name
- Active: contacts the target
- Cost: From $0.35 per 1,000 videos
Executes the Actor with the JSON input in the body, waits for it to finish and returns the dataset items. Give at least one of profiles, hashtags, searchQueries, postURLs, musics or startUrls.
Request body (JSON) · 18ShowHide
profiles
TikTok usernames, with or without the @
hashtags
Hashtags, with or without the #
searchQueries
Keywords to search for
postURLs
Links to single videos or photo posts, or bare video IDs
musics
Sound links or music IDs
startUrls
TikTok links of any kind (profile, hashtag, search, music, video)
resultsPerPage
Most videos from each profile, hashtag, search keyword, music or listing link (default 1)
maxItems
Hard cap on videos for the whole run
profileScrapeSections
videos, reposts or stories (default videos)
profileSorting
latest, popular or oldest (default latest)
maxFollowersPerProfile
Followers to list per profile; 0 skips
maxFollowingPerProfile
Followed accounts to list per profile; 0 skips
commentsPerPost
Most comments (replies included) per video; 0 skips
maxRepliesPerComment
Replies to collect per comment; 0 skips
oldestPostDateUnified
Only videos posted on or after this date; through the API a number of days also works
newestPostDate
Only videos posted on or before this date
searchSection
Search tab: empty (top), /video or /user
proxyCountryCode
Country to load TikTok from; None lets the scraper choose
Response fields · 5ShowHide
text
Video caption
webVideoUrl
Link to the video
name
Author username
diggCount
Likes
playCount
Views
curl -X POST 'https://api.apify.com/v2/acts/harshmaur~tiktok-scraper/run-sync-get-dataset-items?token=YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"profiles":["example_user"],"resultsPerPage":10,"profileScrapeSections":["videos"],"commentsPerPost":0}'[
{
"text": "Example caption",
"webVideoUrl": "https://www.tiktok.com/@example_user/video/1000000000000000000",
"authorMeta": {
"name": "example_user"
},
"diggCount": 10,
"playCount": 100
}
]