TikTok video details API
Metadata and engagement stats of one video or photo slideshow.
GET /v1/tiktok/video
GET /v1/tiktok/video
Metadata and engagement stats of one video or photo slideshow. get_transcript=true adds the native captions in extra.transcript; for AI transcription use /v1/tiktok/video/transcript.
- Cost: 1 credit
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
url | URL | one of | Video URL (www.tiktok.com/@user/video/..., vm.tiktok.com/..., vt.tiktok.com/...). Accepted hosts: tiktok.com. |
id | string | one of | Numeric video id. Also accepted as aweme_id, video_id. |
get_transcript | boolean | no | Include the video's native captions when it has them. Default false. |
Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
region: two-letter country code for results that vary by country. Changing it restarts the cursor chain.trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
1curl -G "https://api.socialscrape.dev/v1/tiktok/video" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode "url=https://www.tiktok.com/@khaby.lame/video/7137423965982592302"1import os2import requests34params = {5 "url": "https://www.tiktok.com/@khaby.lame/video/7137423965982592302",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/tiktok/video",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/tiktok/video");2url.search = new URLSearchParams({3 "url": "https://www.tiktok.com/@khaby.lame/video/7137423965982592302"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape TikTok video details",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/tiktok/video",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "url",19 "value": "https://www.tiktok.com/@khaby.lame/video/7137423965982592302"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_3ab8d8ed45508298004ebe2e",8 "data": {9 "object": "post",10 "platform": "tiktok",11 "id": "7137423965982592302",12 "url": "https://www.tiktok.com/@charlidamelio/video/7137423965982592302",13 "type": "video",14 "author": {15 "id": "5831967",16 "handle": "charlidamelio",17 "name": "charli d’amelio",18 "url": "https://www.tiktok.com/@charlidamelio",19 "avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/ee31de49ddf64b45c5b2e3c55fbd0ea4~tplv-tiktokx-cropcenter:100:100.jpeg?dr=9640&refresh_token=276d5eb7&x-expires=1793498400&x-signature=BHW4ihhCJIG2Qlp4K4ENUsq9tAM%3D&t=4d5b0474...",20 "verified": true21 },22 "title": null,23 "text": null,24 "published_at": "2022-08-29T22:10:18Z",25 "duration_seconds": 11.0,26 "language": null,27 "hashtags": null,28 "mentions": null,29 "stats": {30 "views": 22000000,31 "likes": 2100000,32 "comments": 19500,33 "shares": 17300,34 "saves": 83186,35 "dislikes": null36 },37 "media": {38 "thumbnail_url": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/c1844bce7c5a4b07b0e4ae2301a1996a~tplv-tiktokx-origin.image?dr=9636&x-expires=1793498400&x-signature=VJp6FMqZSTXhVeS62gXUxGJ%2ByFk%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f...",39 "video_url": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast5/tos-useast5-ve-0068c001-tx/0641e3a6387a49e4a2c8c4de2c457fe8/?a=1988&bti=ODszNWYuMDE6&&bt=1991&ft=4KJMyMzm8Zmo0FASla4jV-OhQpWrKsd.&mime_type=video_mp4&rc=ZmhlZGY8NTQ0OWk8ZWQ8O0BpM2w8N2...",40 "audio_url": null,41 "image_urls": null,42 "width": 576,43 "height": 102444 },45 "song": {46 "id": "7090403288818584347",47 "title": "Streets x Kiss it better",48 "artist": ":p",49 "url": "https://www.tiktok.com/music/Streets-x-Kiss-it-better-7090403288818584347"50 },51 "location": null,52 "is_pinned": null,53 "is_sponsored": false,54 "extra": {55 "ai_label_shown": false,56 "author_followers": 160300000,57 "category_type": 113,58 "comments_disabled": false,59 "duet_enabled": true,60 "is_private": false,61 "music_is_original": true,62 "reposts": 0,63 "stitch_enabled": true,64 "video_definition": "540p"65 }66 },67 "cursor": null,68 "has_more": null69}Response#
A Post object in data.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Example error:
1{2 "ok": false,3 "error": {4 "code": "not_found",5 "message": "The platform says this profile, post or item does not exist.",6 "retryable": false7 },8 "credits_charged": 0,9 "request_id": "req_221aa10cc0f2ff95a36a8121"10}Also served at#
These paths answer the same request, so code written for other APIs keeps working: /v2/tiktok/video. See Switching from ScrapeCreators.
Related endpoints#
- TikTok profile (
GET /v1/tiktok/profile) - TikTok profile videos (
GET /v1/tiktok/profile/videos) - TikTok collection videos (
GET /v1/tiktok/collection/videos) - TikTok video transcript (
GET /v1/tiktok/video/transcript) - TikTok video comments (
GET /v1/tiktok/video/comments) - TikTok comment replies (
GET /v1/tiktok/video/comment/replies) - TikTok user search (
GET /v1/tiktok/search/users) - TikTok search suggestions (
GET /v1/tiktok/search/suggestions)