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 Videos

2 credits

Get the videos of TikTok profiles, hashtags and sounds.

POST/api/v1/tools/tiktok/videos

Parameters

profileUrlsstring[]

Profile URLs such as https://www.tiktok.com/@username, or handles such as @username. Each gives the videos of the profile.

hashtagUrlsstring[]

Hashtag URLs such as https://www.tiktok.com/tag/cooking. Each gives the videos of the hashtag.

musicUrlsstring[]

Sound URLs such as https://www.tiktok.com/music/original-sound-7123456789. Each gives the videos that use the sound.

videoUrlsstring[]

Video URLs such as https://www.tiktok.com/@username/video/7123456789. Each gives one video. Give at least one URL in one of the four lists.

videosPerProfilenumber

Most videos for each profile, hashtag or sound. 0 reads them all, up to the item limit of your plan for the whole call. Default: 0.

Response Schema

dataobject

TikTok videos result

videosobject[]

The videos of the profiles, then of the hashtags, then of the sounds, then of the video URLs. Each record has the video fields of the Video Post endpoint (videoId, videoUrl, desc, createTime, video, author, stats, music and more), plus the fields below. A list does not give locationCreated, categories, isAiGenerated, author.createTime or author.seller, so they are empty for a video from a list.

errorsobject[]

One entry for each URL that gave no video.

truncatedboolean

True when the item limit of your plan cut a list short. Absent otherwise.

metaobject

Request metadata

toolstring

Tool name (tiktok-videos)

creditsUsednumber

Credits consumed (2 for each profile, hashtag or sound, 1 for each video URL)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/tiktok/videos \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"profileUrls": ["https://www.tiktok.com/@nasa"],
"musicUrls": ["https://www.tiktok.com/music/original-sound-7123456789"],
"videosPerProfile": 20
}'

Response Example

{
"data": {
"videos": [
{
"inputUrl": "https://www.tiktok.com/@nasa",
"videoId": "7340001234567890001",
"videoUrl": "https://www.tiktok.com/@nasa/video/7340001234567890001",
"desc": "A new view of the Moon #space",
"createTime": "1709251200",
"categories": [],
"hashtags": [
"space"
],
"mentions": [],
"effects": [],
"captionLanguages": [
"eng-US"
],
"images": [],
"video": {
"duration": 32,
"width": 576,
"height": 1024
},
"author": {
"id": "6812345678901234567",
"uniqueId": "nasa",
"nickname": "NASA"
},
"stats": {
"views": 1250000,
"likes": 98000,
"comments": 1200,
"shares": 4300,
"saves": 15000,
"reposts": 0
},
"music": {
"id": "7340001234567890999",
"title": "original sound"
},
"isPinned": true
}
],
"errors": [
{
"inputUrl": "https://www.tiktok.com/music/original-sound-7123456789",
"error": "The sound could not be read.",
"errorCode": "READ_FAILED"
}
]
},
"meta": {
"tool": "tiktok-videos",
"creditsUsed": 4,
"requestId": "req_abc123"
}
}