scraper
Back to API docs

Overview

  • Overview

APIs

  • POSTHashtag
  • POSTProduct
  • POSTProduct Reviews
  • POSTTrending Videos
  • POSTUser Profile
  • POSTUser Search
  • POSTVideo Post
  • POSTVideo Transcript
  • POSTVideo Search
  • POSTVideos

TikTok Video Post

1 credit

Get TikTok videos with their comments, by video URL or by profile.

POST/api/v1/tools/tiktok/video/post

Parameters

videoUrlsstring[]

Full TikTok video URLs that contain /video/ and the video ID. A video given twice is read once. A URL that gives no video gets an entry in errors. Give at least one video URL or profile URL. The call fails only when nothing is read.

profileUrlsstring[]

Profile URLs such as https://www.tiktok.com/@username, or handles such as @username. The comments of each video of the profile are read. A profile given twice is read once. A video that a video URL or another profile also gives is read once. A profile that gives no video list gets an entry in errors.

videosPerProfilenumber

Most videos for each profile. Defaults to 0, which reads them all, up to the item limit of the plan for the whole call. Each profile costs 1 credit for each of these videos, and at least 2. With 0, a profile costs the item limit of the plan, and the profiles of one call together cost at most that limit.

maxCommentsnumber

Most comments for each video, without the replies. Defaults to 0, which reads every comment, up to the comment limit of the plan for the whole call.

numberOfPagesnumber

Read at most this many pages of 50 comments each. Omit to stop only at maxComments.

includeRepliesboolean

Read the replies of each comment. Defaults to true.

includeVideoInfoboolean

Return the video details. Defaults to true.

fieldsstring[]

Fields per comment. Defaults to cid, text, createTime, likes, author. Available: cid, type, text, createTime, likes, replies, repliesToId, repliesToReplyId, textLanguage, isPinned, isLikedByCreator, isByCreator, mentions, images, sticker, author, videoId, videoUrl, inputUrl. Use ["*"] for all.

Response Schema

dataobject

TikTok video posts result

videosobject[]

One record for each video that was read: the video URLs in request order, then the videos of each profile.

errorsobject[]

One entry for each URL that gave no video, and one for each video URL with its comments switched off. A video of a profile with its comments switched off has commentsOff and no entry.

truncatedboolean

True when the item limit of the plan for the whole call cut the video list of a profile short. Absent otherwise.

metaobject

Request metadata

toolstring

Tool name (tiktok-video-post)

creditsUsednumber

Credits consumed (1 for each video URL, and 1 for each profile video with at least 2 for each profile)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/tiktok/video/post \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"videoUrls": [
"https://www.tiktok.com/@nasa/video/7670721000471891214",
"https://www.tiktok.com/@nasa/video/7679483952507276558"
],
"maxComments": 50
}'

Response Example

{
"data": {
"videos": [
{
"videoId": "7340001234567890001",
"videoUrl": "https://www.tiktok.com/@tiktok/video/7340001234567890001",
"inputUrl": "https://www.tiktok.com/@tiktok/video/7340001234567890001",
"video": {
"desc": "Check out this amazing recipe! #cooking #foodtok",
"descLanguage": "en",
"createTime": "1713945600",
"locationCreated": "US",
"categories": [
"Food & Drink"
],
"hashtags": [
"cooking",
"foodtok"
],
"mentions": [],
"effects": [],
"isAd": false,
"duetEnabled": true,
"stitchEnabled": true,
"shareEnabled": true,
"captionLanguages": [
"eng-US"
],
"images": [],
"video": {
"duration": 32,
"width": 1080,
"height": 1920,
"ratio": "720p",
"codec": "h264"
},
"author": {
"id": "107955",
"uniqueId": "tiktok",
"nickname": "TikTok",
"verified": true
},
"stats": {
"views": 5200000,
"likes": 245000,
"comments": 8450,
"shares": 12300,
"saves": 30100,
"reposts": 0
},
"music": {
"id": "7340001234567890999",
"title": "original sound",
"author": "TikTok"
}
},
"serverTotal": 8450,
"commentCount": 2,
"comments": [
{
"cid": "7340100000000000001",
"text": "This looks delicious!",
"createTime": "1713946200",
"likes": 1523,
"author": {
"id": "6800000000000000001",
"uniqueId": "foodlover",
"nickname": "Food Lover",
"verified": false,
"avatar": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt/foodlover.jpeg"
}
},
{
"cid": "7340100000000000002",
"text": "Saving this for later",
"createTime": "1713947800",
"likes": 342,
"author": {
"id": "6800000000000000002",
"uniqueId": "chefmike",
"nickname": "Chef Mike",
"verified": false,
"avatar": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt/chefmike.jpeg"
}
}
]
}
],
"errors": [
{
"inputUrl": "https://www.tiktok.com/@tiktok/video/7340001234567890002",
"error": "The video is removed or private.",
"errorCode": "VIDEO_UNAVAILABLE"
}
]
},
"meta": {
"tool": "tiktok-video-post",
"creditsUsed": 2,
"requestId": "req_abc123"
}
}