How to Scrape TikTok Videos Using Song with TypeScript
Get TikToks using a specific song using TypeScript. This comprehensive guide will walk you through the entire process, from setup to implementation.
Overview
What You'll Learn
- Setting up your TypeScript environment
- Installing the required HTTP client
- Authenticating with SociaVault API
- Making requests to TikTok
- Handling responses and errors
What You'll Get
- Access to music videos data
- JSON formatted responses
- Real-time data access
- Scalable solution
- Error handling patterns
Prerequisites
1. API Key
First, you'll need a SociaVault API key to authenticate your requests.
2. Development Environment
Make sure you have the following installed:
- TypeScript installed
- A code editor (VS Code, Sublime, etc.)
- Command line interface access
Implementation
Step 1: Install HTTP Client
We'll use axios to make HTTP requests.
npm install axiosStep 2: API Implementation
Now let's make a request to the TikTok API using TypeScript. Replace YOUR_API_KEY with your actual API key.
import axios from 'axios';
const API_KEY: string = 'YOUR_API_KEY';
interface ResponseData {
[key: string]: any;
}
async function scrape(): Promise<ResponseData | void> {
try {
const response = await axios.get<ResponseData>(`https://api.sociavault.com/tiktok/music/videos?clipId=7439295283975702544`, {
headers: {
'x-api-key': API_KEY,
'Content-Type': 'application/json'
}
});
console.log('Response:', response.data);
return response.data;
} catch (error) {
console.error('Error:', error);
}
}
scrape();Testing Your Code
API Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| clipId | string | Yes | Example: 7439295283975702544 |
Expected Response
You should receive a structured JSON response containing the music videos data.
{
"aweme_list": [
{
"added_sound_music_info": {
"album": "GNX",
"allow_offline_music_to_detail_page": false,
"audition_duration": 59,
"author": "Kendrick Lamar & SZA",
"author_deleted": false,
"binded_challenge_id": 0,
"can_be_stitched": true,
"can_not_reuse": false,
"collect_stat": 0,
"commercial_right_type": 3,
"cover_large": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"cover_medium": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"cover_thumb": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/100x100/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"create_time": 1732317312,
"dmv_auto_show": false,
"duration": 59,
"duration_high_precision": {
"audition_duration_precision": 59.037,
"duration_precision": 59.037,
"shoot_duration_precision": 59.037,
"video_duration_precision": 60
},
"extra": "{\"amplitude_peak\":0.9612427,\"apple_song_id\":1781316886,\"beats\":{\"audio_effect_onset\":\"https://sf77-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/oc3znOgNABAyAsloQEiaoshBsf9juFtiAWABFE\",\"beats_tracker\":\"https://sf77-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/o4E7lsAzwoFsgihIzEBBFQAWmigfBsDA3EAvit\",\"energy_trace\":\"https://sf77-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/oUstzgE1gABiQsBsElBWATjF4miFsoLiPAmhfA\",\"merged_beats\":\"https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/oAQAGitIzgAmsKs7BBABBDOoiAgEhEfsFWj9FF\"},\"can_read\":true,\"can_reuse\":true,\"erase_type\":0,\"erase_uid\":0,\"from_user_id\":7350212909039600673,\"full_song_beat_info\":{},\"full_song_beats\":{},\"has_edited\":0,\"is_batch_take_down_music\":false,\"is_ugc_mapping\":false,\"is_used\":0,\"loudness_lufs\":-9.605312,\"music_vid\":\"v10ad6g50000ct0gvh7og65tagjqkldg\",\"owner_id\":0,\"resource_status\":0,\"review_unshelve_reason\":0,\"reviewed\":1,\"schedule_search_time\":0}",
"has_commerce_right": false,
"id": 7439295283975703000,
"id_str": "7439295283975702544",
"is_audio_url_with_cookie": false,
"is_author_artist": false,
"is_commerce_music": true,
"is_matched_metadata": false,
"is_original": false,
"is_original_sound": false,
"is_pgc": true,
"is_play_music": false,
"is_shooting_allow": true,
"language": "English",
"log_extra": "{\"meta_song_matched_type\":\"pgc\",\"ttm_matched_type\":\"\",\"ttm_track_id\":\"\",\"matched_meta_song_id\":\"\",\"vid\":\"\",\"owner_id\":\"\"}",
"matched_song": {
"author": "Kendrick Lamar & SZA",
"chorus_info": {
"duration_ms": 27456,
"start_ms": 119808
},
"cover_medium": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"full_duration": 177599,
"h5_url": "",
"id": "7440101671265486864",
"title": "luther"
},
"mid": "7439295283975702544",
"music_release_info": {
"group_release_date": 1732233600,
"is_new_release_song": false
},
"mute_share": false,
"offline_desc": "",
"owner_handle": "",
"owner_nickname": "",
"play_url": {
"height": 720,
"uri": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/o8f9CfEFDdCEDUAq6gDqgOY4gQNfJHzxhF2ayE",
"url_list": [
"https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/o8f9CfEFDdCEDUAq6gDqgOY4gQNfJHzxhF2ayE"
],
"width": 720
},
"prevent_download": false,
"preview_end_time": 0,
"preview_start_time": 9.983,
"recommend_status": 100,
"shoot_duration": 59,
"source_platform": 10033,
"status": 1,
"strong_beat_url": {
"height": 720,
"uri": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/osBFCCwSNFBAftwAEnEDjVfDEAy1glT6ADLclZ",
"url_list": [
"https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/osBFCCwSNFBAftwAEnEDjVfDEAy1glT6ADLclZ"
],
"width": 720
},
"style_value": [
153
],
"theme_value": [
11
],
"title": "luther",
"user_count": 0,
"video_duration": 60
},
"aigc_info": {
"aigc_label_type": 0,
"created_by_ai": false
},
"allow_gift": true,
"anchors": [
{
"caption": "",
"component_key": "anchor_capcut",
"description": "CapCut · Video Editor",
"general_type": 1,
"icon": {
"height": 720,
"uri": "tiktok-obj/cc_anchor_logo_230222.png",
"url_list": [
"https://p77-sg.tiktokcdn.com/tiktok-obj/cc_anchor_logo_230222.png~tplv-tiktokx-origin.image?biz_tag=anchor.capcut&dr=10423&idc=no1a&nonce=10587&ps=933b5bde&refresh_token=ea868bfe485d80c4fb34e71dbd716e98&shcp=d05b14bd&shp=45126217&t=4d5b0474"
],
"width": 720
},
"id": "0",
"keyword": "CapCut · 2024 in 43 photos",
"log_extra": "{\"anchor_id\":0,\"anchor_name\":\"CapCut · 2024 in 43 photos\",\"anchor_name_type\":\"template_1\",\"anchor_title_detail\":\"None\",\"anchor_type\":\"TT_CAPCUT\",\"capability_key\":\"none\",\"cc_template_pay_type\":0,\"if_device_language\":\"1\",\"if_race_trigger\":0,\"is_two_line\":0,\"maker_source\":\"\",\"template_id\":\"7439087471498956085\",\"tutorial_id\":\"none\",\"viamaker_anchor_capability_key_weight\":1,\"viamaker_anchor_style_idx\":-1,\"viamaker_anchor_style_source\":3,\"video_source\":1,\"video_type_id\":2}",
"schema": "aweme://lynxview/?bundle=landing%2Ftemplate.js&channel=tiktok_capcut_anchor_landing_page&container_bg_color=000000&download_optimization=1&dynamic=3&enable_prefetch=1&experiment_70720234=1&experiment_70734729=1&experiment_71198425=1&experiment_71270528=1&experiment_71390981=1&experiment_71540222=1&experiment_71560892=1&experiment_71642885=1&experiment_71790668=1&experiment_71860799=1&experiment_71861046=1&experiment_72275089=1&experiment_72378366=1&experiment_72683638=1&experiment_72995772=1&experiment_73137025=1&experiment_73358472=1&hide_nav_bar=1&hide_status_bar=1&loading_bg_color=000000&onelink=https%3A%2F%2Fttanchor.onelink.me%2FVQBU%2FTiktokAnchorTemplate1&theme=dark&trans_status_bar=1&use_forest=1&use_new_deep_link_func=1&use_spark=1&group_id=7452069943757114646&template_id=7439087471498956085&server_common_log={\"anchor_name_type\":\"template_0\",\"anchor_title_detail\":\"None\",\"if_device_language\":\"1\",\"is_two_line\":0}&export_paid_template=0&music_id=7439295283975702544&music_begin_time=17548&landing_page_style_id=0&is_recommend_ctrl=false&viamaker_anchor_style_source=4&anchor_title_id=0&viamaker_anchor_style_idx=-1&viamaker_anchor_capability_key_weight=1&fans_num=0&show_recruit=0&btn_text=Use template in CapCut&trans_status_bar=1&hide_status_bar=1&channel_type=1&cc_anchor_type=2&default_strategy=2&target_item_list=[{\"item_id\":\"7439087471498956085\",\"item_type\":1,\"tt_item_id\":7452069943757114646,\"tt_item_id_str\":\"7452069943757114646\",\"capability_rec_info\":{\"style_id\":0,\"anchor_title_id\":0,\"is_rec_ctrl\":false,\"viamaker_anchor_style_source\":3}}]&landing_page_style=1&landing_page_timeout=10&surl=https%3A%2F%2Flf-main-gecko-source.tiktokcdn.com%2Fobj%2Ftiktok-teko-source-sg%2F10%2Fgecko%2Fresource%2Ftiktok_capcut_anchor_landing_page%2Flanding%2Ftemplate.js",
"thumbnail": {
"height": 64,
"uri": "tiktok-obj/64x_Capcut3x.png",
"url_list": [
"https://p77-sg.tiktokcdn.com/tiktok-obj/64x_Capcut3x.png~tplv-tiktokx-origin.image?dr=10423&nonce=77923&refresh_token=77b96e44e22e72876d95216d492cac0d&idc=no1a&ps=933b5bde&shcp=d05b14bd&shp=45126217&t=4d5b0474"
],
"width": 64
},
"type": 54
}
],
"anchors_extras": "",
"animated_image_info": {
"effect": 0,
"type": 0
},
"author": {
"authority_status": 0,
"avatar_168x168": {
"height": 720,
"uri": "tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5",
"url_list": [
"https://p16-pu-no.tiktokcdn-eu.com/tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5~tplv-tiktokx-cropcenter-q:168:168:q70.heic?dr=9604&idc=no1a&nonce=23496&ps=87d6e48a&refresh_token=00c6e144ba14a3929bba66f8d4eeb95c&s=MUSIC_AWEME&sc=avatar&shcp=f6441914&shp=45126217&t=223449c4"
],
"width": 720
},
"avatar_300x300": {
"height": 720,
"uri": "tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5",
"url_list": [
"https://p16-pu-no.tiktokcdn-eu.com/tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5~tplv-tiktokx-cropcenter-q:300:300:q70.heic?dr=9605&idc=no1a&nonce=71045&ps=87d6e48a&refresh_token=e1a2307775247b3cbcbb4c405a3dd051&s=MUSIC_AWEME&sc=avatar&shcp=f6441914&shp=45126217&t=223449c4"
],
"width": 720
},
"avatar_larger": {
"height": 720,
"uri": "tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5",
"url_list": [
"https://p16-pu-no.tiktokcdn-eu.com/tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5~tplv-tiktokx-cropcenter-q:1080:1080:q70.heic?dr=9608&idc=no1a&nonce=740&ps=87d6e48a&refresh_token=eec1741aa128547d6c4408853e59ba16&s=MUSIC_AWEME&sc=avatar&shcp=f6441914&shp=45126217&t=223449c4"
],
"width": 720
},
"avatar_medium": {
"height": 720,
"uri": "tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5",
"url_list": [
"https://p16-pu-no.tiktokcdn-eu.com/tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5~tplv-tiktokx-cropcenter-q:720:720:q70.heic?dr=9607&idc=no1a&nonce=98842&ps=87d6e48a&refresh_token=c9ced2e139cbb90b75fe4222b231bfb1&s=MUSIC_AWEME&sc=avatar&shcp=f6441914&shp=45126217&t=223449c4"
],
"width": 720
},
"avatar_thumb": {
"height": 720,
"uri": "tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5",
"url_list": [
"https://p16-pu-no.tiktokcdn-eu.com/tos-no1a-avt-0068c001-no/63a0c1998edd418ab288993da2afe4a5~tplv-tiktokx-cropcenter-q:100:100:q70.heic?dr=9606&idc=no1a&nonce=29842&ps=87d6e48a&refresh_token=31964afe9e3aaab0ed796eece3c31b1b&s=MUSIC_AWEME&sc=avatar&shcp=f6441914&shp=45126217&t=223449c4"
],
"width": 720
},
"comment_filter_status": 1,
"comment_setting": 0,
"commerce_user_level": 0,
"custom_verify": "",
"download_setting": 3,
"duet_setting": 0,
"enabled_filter_all_comments": false,
"enterprise_verify_reason": "",
"follow_status": 0,
"follower_status": 0,
"friends_status": 0,
"is_ad_fake": false,
"is_block": false,
"is_discipline_member": false,
"is_star": false,
"language": "es",
"nickname": "El rey de las bromas oficial",
"prevent_download": false,
"region": "MX",
"room_id": 0,
"sec_uid": "MS4wLjABAAAAbhqboEW5Qk6emunyGrRmD04w52fJAPvOI8XPuGxq9xwnkN9ID8cpxME-yUqEwaYU",
"secret": 0,
"share_info": {
"share_desc": "",
"share_desc_info": "",
"share_qrcode_url": {
"height": 720,
"uri": "",
"width": 720
},
"share_title": "",
"share_title_myself": "",
"share_title_other": "",
"share_url": ""
},
"short_id": "0",
"signature": "Sigan a mi editor y les mando un saludo ⬇️⬇️⬇️",
"stitch_setting": 0,
"uid": "7431412724132922400",
"unique_id": "elreydelasbromasoficial",
"verification_type": 1,
"verify_info": "",
"video_icon": {
"height": 720,
"uri": "",
"width": 720
},
"with_commerce_entry": false
},
"author_user_id": 7431412724132922000,
"aweme_acl": {
"download_general": {
"code": 1,
"extra": "101",
"mute": false,
"show_type": 0,
"transcode": 1
},
"download_mask_panel": {
"code": 1,
"extra": "101",
"mute": false,
"show_type": 0,
"transcode": 1
},
"share_general": {
"code": 1,
"extra": "101",
"mute": false,
"show_type": 1,
"toast_msg": "This action isn’t allowed for this post",
"transcode": 1
},
"share_list_status": 0
},
"aweme_id": "7452069943757114646",
"aweme_type": 0,
"bodydance_score": 0,
"cc_template_info": {
"author_name": "",
"clip_count": 0,
"desc": "",
"duration_milliseconds": 0,
"match_type": "top_item",
"music_copyright": true,
"onelink": "https://capcut-yt.onelink.me/W3Oy/mpy6xee2",
"related_music_id": "",
"schema_extra": "{\"experiment_id\":\"72683638\"}",
"style_type": 1,
"template_id": "7439087471498956085"
},
"cha_list": [
{
"cha_name": "memestiktok",
"cid": "1615484249350165",
"collect_stat": 0,
"desc": "¡Llegaste al lugar indicado para encontrar memazos! \n\nCada viernes podrás encontrar a los 9 #MEMESTikTok oficiales de la semana.",
"extra_attr": {
"is_live": false
},
"hashtag_profile": "musically-maliva-obj/422f2c33d377dddff0f11cb5a276196f",
"is_challenge": 0,
"is_commerce": false,
"is_pgcshow": false,
"schema": "aweme://aweme/challenge/detail?cid=1615484249350165",
"share_info": {
"bool_persist": 0,
"share_desc": "Check out #memestiktok on TikTok!",
"share_desc_info": "Check out #memestiktok on TikTok!",
"share_quote": "",
"share_signature_desc": "",
"share_signature_url": "",
"share_title": "It is a becoming a big trend on TikTok now! Click here: memestiktok",
"share_title_myself": "",
"share_title_other": "",
"share_url": "https://www.tiktok.com/tag/memestiktok?_r=1&name=memestiktok&u_code=ed95h8gmi905eb&_d=ed95ee344m3h4g&share_challenge_id=1615484249350165&sharer_language=en&source=h5_m"
},
"sub_type": 0,
"type": 1,
"use_count": 0,
"user_count": 0,
"view_count": 0
}
],
"cmt_swt": false,
"collect_stat": 0,
"comment_config": {
"preload": {
"preds": "{\"item_post_comment\":0.00011830986683832393}"
},
"quick_comment": {
"enabled": true
}
},
"commerce_info": {
"adv_promotable": true,
"auction_ad_invited": false,
"branded_content_type": 0,
"with_comment_filter_words": false
},
"content_desc": "",
"content_model": {
"custom_biz": {
"aweme_trace": "202502180605264FFF1CE5D6043F4CF934"
},
"standard_biz": {
"e_commerce": {
"ttec_content_tag": {
"recommendation_tag_consumer_str": "",
"recommendation_tag_creator_str": ""
}
},
"tts_voice_info": {
"tts_voice_attr": "[]",
"tts_voice_reuse_params": ""
},
"vc_filter_info": {
"vc_filter_attr": "[]"
}
}
},
"content_original_type": 1,
"content_size_type": 1,
"content_type": "video",
"create_time": 1735070246,
"creation_info": {
"creation_used_functions": [
"select_music"
]
},
"desc": "2024 en 43 fotos el rey de las bromas #memestiktok #elreydelasbromas #bromita #pepe #reto #grillo #racha #fotos #luther #2024 #2025 ",
"desc_language": "es",
"distance": "",
"distribute_type": 1,
"follow_up_publish_from_id": -1,
"group_id": "7452069943757114646",
"has_danmaku": false,
"has_promote_entry": 2,
"has_vs_entry": false,
"have_dashboard": false,
"interact_permission": {
"allow_adding_as_post": {
"status": 0
},
"allow_adding_to_story": 0,
"allow_create_sticker": {
"status": 2
},
"duet": 0,
"duet_privacy_setting": 0,
"stitch": 0,
"stitch_privacy_setting": 0,
"upvote": 0
},
"is_ads": false,
"is_description_translatable": true,
"is_hash_tag": 1,
"is_nff_or_nr": false,
"is_pgcshow": false,
"is_preview": 0,
"is_relieve": false,
"is_text_sticker_translatable": false,
"is_title_translatable": false,
"is_top": 0,
"is_vr": false,
"item_comment_settings": 0,
"item_duet": 0,
"item_react": 0,
"item_stitch": 0,
"label_music_starter_text": "Use template",
"label_top": {
"height": 720,
"uri": "tiktok-obj/1598708589477025.PNG",
"url_list": [
"https://p77-sg.tiktokcdn.com/tiktok-obj/1598708589477025.PNG~tplv-tiktokx-origin.image?dr=10423&nonce=29020&refresh_token=3883dde3d18f494a49303c4d770b0695&idc=no1a&ps=933b5bde&shcp=d05b14bd&shp=45126217&t=4d5b0474"
],
"width": 720
},
"main_arch_common": "",
"misc_info": "{}",
"music": {
"album": "GNX",
"allow_offline_music_to_detail_page": false,
"audition_duration": 59,
"author": "Kendrick Lamar & SZA",
"author_deleted": false,
"binded_challenge_id": 0,
"can_be_stitched": true,
"can_not_reuse": false,
"collect_stat": 0,
"commercial_right_type": 3,
"cover_large": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"cover_medium": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"cover_thumb": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/100x100/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"create_time": 1732317312,
"dmv_auto_show": false,
"duration": 59,
"duration_high_precision": {
"audition_duration_precision": 59.037,
"duration_precision": 59.037,
"shoot_duration_precision": 59.037,
"video_duration_precision": 60
},
"extra": "{\"amplitude_peak\":0.9612427,\"apple_song_id\":1781316886,\"beats\":{\"audio_effect_onset\":\"https://sf77-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/oc3znOgNABAyAsloQEiaoshBsf9juFtiAWABFE\",\"beats_tracker\":\"https://sf77-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/o4E7lsAzwoFsgihIzEBBFQAWmigfBsDA3EAvit\",\"energy_trace\":\"https://sf77-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/oUstzgE1gABiQsBsElBWATjF4miFsoLiPAmhfA\",\"merged_beats\":\"https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/oAQAGitIzgAmsKs7BBABBDOoiAgEhEfsFWj9FF\"},\"can_read\":true,\"can_reuse\":true,\"erase_type\":0,\"erase_uid\":0,\"from_user_id\":7350212909039600673,\"full_song_beat_info\":{},\"full_song_beats\":{},\"has_edited\":0,\"is_batch_take_down_music\":false,\"is_ugc_mapping\":false,\"is_used\":0,\"loudness_lufs\":-9.605312,\"music_vid\":\"v10ad6g50000ct0gvh7og65tagjqkldg\",\"owner_id\":0,\"resource_status\":0,\"review_unshelve_reason\":0,\"reviewed\":1,\"schedule_search_time\":0}",
"has_commerce_right": false,
"id": 7439295283975703000,
"id_str": "7439295283975702544",
"is_audio_url_with_cookie": false,
"is_author_artist": false,
"is_commerce_music": true,
"is_matched_metadata": false,
"is_original": false,
"is_original_sound": false,
"is_pgc": true,
"is_play_music": false,
"is_shooting_allow": true,
"language": "English",
"log_extra": "{\"meta_song_matched_type\":\"pgc\",\"ttm_matched_type\":\"\",\"ttm_track_id\":\"\",\"matched_meta_song_id\":\"\",\"vid\":\"\",\"owner_id\":\"\"}",
"matched_song": {
"author": "Kendrick Lamar & SZA",
"cover_medium": {
"height": 720,
"uri": "tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA",
"url_list": [
"https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/oAQAfe3r0KfAKAMDJpQVILIMTeGSVPAmreQznA.jpeg"
],
"width": 720
},
"full_duration": 177599,
"h5_url": "",
"id": "7440101671265486864",
"title": "luther"
},
"mid": "7439295283975702544",
"music_release_info": {
"group_release_date": 1732233600,
"is_new_release_song": false
},
"mute_share": false,
"offline_desc": "",
"owner_handle": "",
"owner_nickname": "",
"play_url": {
"height": 720,
"uri": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/o8f9CfEFDdCEDUAq6gDqgOY4gQNfJHzxhF2ayE",
"url_list": [
"https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/o8f9CfEFDdCEDUAq6gDqgOY4gQNfJHzxhF2ayE"
],
"width": 720
},
"prevent_download": false,
"preview_end_time": 0,
"preview_start_time": 9.983,
"recommend_status": 100,
"shoot_duration": 59,
"source_platform": 10033,
"status": 1,
"strong_beat_url": {
"height": 720,
"uri": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/osBFCCwSNFBAftwAEnEDjVfDEAy1glT6ADLclZ",
"url_list": [
"https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-v-2774/osBFCCwSNFBAftwAEnEDjVfDEAy1glT6ADLclZ"
],
"width": 720
},
"style_value": [
153
],
"theme_value": [
11
],
"title": "luther",
"user_count": 0,
"video_duration": 60
},
"music_begin_time_in_ms": 17548,
"music_end_time_in_ms": 27215,
"music_selected_from": "single_song",
"music_title_style": 0,
"music_volume": "50.000000",
"need_trim_step": false,
"need_vs_entry": false,
"origin_volume": "0.000000",
"original_client_text": {
"markup_text": "2024 en 43 fotos el rey de las bromas <h id=\"1\">#memestiktok</h> <h id=\"8\">#elreydelasbromas</h> <h id=\"21\">#bromita</h> <h id=\"40\">#pepe</h> <h id=\"65\">#reto</h> <h id=\"96\">#grillo</h> <h id=\"133\">#racha</h> <h id=\"337\">#fotos</h> <h id=\"617\">#luther</h> <h id=\"833\">#2024</h> <h id=\"1478\">#2025</h> ",
"text_extra": [
{
"hashtag_id": "1615484249350165",
"hashtag_name": "memestiktok",
"is_commerce": false,
"sec_uid": "",
"tag_id": "1",
"type": 1,
"user_id": ""
}
]
},
"playlist_blocked": false,
"prevent_download": false,
"promote_capcut_toggle": 0,
"promote_icon_text": "Promote",
"promote_toast": "Can’t promote due to audio copyright issue",
"promote_toast_key": "reason_cannot_promote_music",
"quick_reply_emojis": [
"😍"
],
"rate": 12,
"region": "MX",
"retry_type": 0,
"risk_infos": {
"content": "",
"risk_sink": false,
"type": 0,
"vote": false,
"warn": false
},
"share_info": {
"bool_persist": 0,
"share_desc": "Check out El rey de las bromas oficial's video! #TikTok",
"share_desc_info": "TikTok: Make Every Second CountCheck out El rey de las bromas oficial’s video! #TikTok > ",
"share_link_desc": "",
"share_quote": "",
"share_signature_desc": "",
"share_signature_url": "",
"share_title": "Check out El rey de las bromas oficial’s video! #TikTok > ",
"share_title_myself": "",
"share_title_other": "",
"share_url": "https://www.tiktok.com/@elreydelasbromasoficial/video/7452069943757114646?_r=1&u_code=ed95h8gmi905eb&preview_pb=0&sharer_language=en&_d=ed95ee344m3h4g&share_item_id=7452069943757114646&source=h5_m",
"whatsapp_desc": "Download TikTok and watch more fun videos:"
},
"share_url": "https://www.tiktok.com/@elreydelasbromasoficial/video/7452069943757114646?_r=1&u_code=ed95h8gmi905eb&preview_pb=0&sharer_language=en&_d=ed95ee344m3h4g&share_item_id=7452069943757114646&source=h5_m",
"shoot_tab_name": "video_15",
"social_interaction_blob": {
"auxiliary_model_content": "ChIKBPCfmI0KBPCfmIIKBPCfmLM="
},
"solaria_profile": {
"profile": "{\"PACK_VOD:vod_diversity_tier3\":\"10001\",\"play_time_prob_dist\":\"[800,0.9851,2472.8805]\"}"
},
"sort_label": "",
"statistics": {
"aweme_id": "7452069943757114646",
"collect_count": 10436,
"comment_count": 347,
"digg_count": 197747,
"download_count": 27,
"forward_count": 0,
"lose_comment_count": 0,
"lose_count": 0,
"play_count": 2932976,
"repost_count": 0,
"share_count": 26467,
"whatsapp_share_count": 511
},
"status": {
"allow_comment": true,
"allow_share": true,
"aweme_id": "7452069943757114646",
"download_status": 0,
"in_reviewing": false,
"is_delete": false,
"is_prohibited": false,
"private_status": 0,
"review_result": {
"review_status": 0
},
"reviewed": 1,
"self_see": false
},
"support_danmaku": false,
"text_extra": [
{
"end": 50,
"hashtag_id": "1615484249350165",
"hashtag_name": "memestiktok",
"is_commerce": false,
"sec_uid": "",
"start": 38,
"type": 1,
"user_id": ""
}
],
"text_sticker_major_lang": "un",
"title_language": "un",
"ttt_product_recall_type": -2,
"upvote_info": {
"friends_recall_info": "{}",
"repost_initiate_score": 0,
"user_upvoted": false
},
"upvote_preload": {
"need_pull_upvote_info": false
},
"used_full_song": false,
"user_digged": 0,
"video": {
"CoverTsp": 2.561033582089552,
"ai_dynamic_cover": {
"uri": "tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR",
"url_list": [
"https://p16-pu-sign-no.tiktokcdn-eu.com/tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR~tplv-tiktokx-origin.image?dr=9229&nonce=27380&refresh_token=4c240a0d42376fa4ed71659f59e52302&x-expires=1739916000&x-signature=p80zyQbgl13O5dqkRS6QfQZ4%2F%2BA%3D&biz_tag=tt_video&idc=no1a&ps=4f5296ae&s=MUSIC_AWEME&sc=cover&shcp=f6441914&shp=d05b14bd&t=bacd0480"
]
},
"ai_dynamic_cover_bak": {
"uri": "tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR",
"url_list": [
"https://p16-pu-sign-no.tiktokcdn-eu.com/tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR~tplv-tiktokx-origin.image?dr=9229&nonce=27380&refresh_token=4c240a0d42376fa4ed71659f59e52302&x-expires=1739916000&x-signature=p80zyQbgl13O5dqkRS6QfQZ4%2F%2BA%3D&biz_tag=tt_video&idc=no1a&ps=4f5296ae&s=MUSIC_AWEME&sc=cover&shcp=f6441914&shp=d05b14bd&t=bacd0480"
]
},
"animated_cover": {
"uri": "tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR",
"url_list": [
"https://p16-pu-sign-no.tiktokcdn-eu.com/tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR~tplv-tiktokx-origin.image?dr=9229&nonce=27380&refresh_token=4c240a0d42376fa4ed71659f59e52302&x-expires=1739916000&x-signature=p80zyQbgl13O5dqkRS6QfQZ4%2F%2BA%3D&biz_tag=tt_video&idc=no1a&ps=4f5296ae&s=MUSIC_AWEME&sc=cover&shcp=f6441914&shp=d05b14bd&t=bacd0480"
]
},
"bit_rate": [
{
"HDR_bit": "",
"HDR_type": "",
"bit_rate": 1070160,
"fps": 27,
"gear_name": "adapt_lower_720_2",
"is_bytevc1": 2,
"play_addr": {
"data_size": 1297570,
"file_cs": "c:0-9830-fd92",
"file_hash": "8a43f94d7eb4461a90b56f6abac82a97",
"height": 1280,
"uri": "v24044gl0000ctlh3l7og65kfptpasdg",
"url_key": "v24044gl0000ctlh3l7og65kfptpasdg_bytevc2_720p_1070160",
"url_list": [
"https://v45.tiktokcdn-eu.com/8cbda23a28987e40356ac64e556815cd/67b5042f/video/tos/no1a/tos-no1a-ve-0068-no/oIERAQjAjO5gOAc8Wes1biptexeMIDWpI8dLwV/?a=1233&bti=NDg5QGo7dik3OjlmNC4uYCM6bTQ0MDo%3D&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=2090&bt=1045&cs=5&ds=3&ft=td_Lr8QLodzR12NvnSeveIxRrb8biq_45SY&mime_type=video_mp4&qs=14&rc=NmY8ZjNkZWk4NTc5aWllaUBpanZzc245cm9rdzMzbzczNUAvX2IxYTAxNTExYjMtYV40YSNhXnFjMmQ0MGlgLS1kMTFzcw%3D%3D&vvpl=1&l=202502180605264FFF1CE5D6043F4CF934&btag=e000b5000"
],
"width": 720
},
"quality_type": 14,
"video_extra": "{\"PktOffsetMap\":\"[{\\\"time\\\": 1, \\\"offset\\\": 253368}, {\\\"time\\\": 2, \\\"offset\\\": 324609}, {\\\"time\\\": 3, \\\"offset\\\": 459070}, {\\\"time\\\": 4, \\\"offset\\\": 659230}, {\\\"time\\\": 5, \\\"offset\\\": 794809}]\",\"mvmaf\":\"{\\\"v2.0\\\": {\\\"srv1\\\": {\\\"v1080\\\": 90.446, \\\"v960\\\": 94.933, \\\"v864\\\": 94.656, \\\"v720\\\": 96.204}, \\\"ori\\\": {\\\"v1080\\\": 83.751, \\\"v960\\\": 87.235, \\\"v864\\\": 90.103, \\\"v720\\\": 92.093}}}\",\"volume_info_json\":\"\",\"transcode_feature_id\":\"7c6d3b841f26db21f2b8ed48e950065b\",\"audio_score\":\"{\\\"v1\\\":{\\\"score\\\":87.5,\\\"score_spk\\\":87.5}}\"}"
}
],
"cdn_url_expired": 0,
"cla_info": {
"captions_type": 0,
"creator_edited_caption_id": 0,
"enable_auto_caption": 0,
"has_original_audio": 0,
"hide_original_caption": false,
"no_caption_reason": 2
},
"cover": {
"height": 720,
"uri": "tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR",
"url_list": [
"https://p16-pu-sign-no.tiktokcdn-eu.com/tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR~tplv-tiktokx-cropcenter-q:300:400:q72.jpeg?dr=9232&nonce=62994&refresh_token=6a73ab59e5d3cbadbe005e08fd73593c&x-expires=1739916000&x-signature=PkvMADZo%2FN1R1e%2BGuT3zdbrxQ%2FY%3D&biz_tag=tt_video&idc=no1a&ps=933b5bde&s=MUSIC_AWEME&sc=cover&shcp=f6441914&shp=d05b14bd&t=bacd0480"
],
"width": 720
},
"cover_is_custom": true,
"duration": 9700,
"dynamic_cover": {
"height": 720,
"uri": "tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR",
"url_list": [
"https://p16-pu-sign-no.tiktokcdn-eu.com/tos-no1a-p-0037-no/okGkhASBzBEwjVUiiAAYnAElCCGrftPwHIIiBR~tplv-tiktokx-origin.image?dr=9229&nonce=97610&refresh_token=e01c90aa9e8babf7d31e7bee289c09ff&x-expires=1739916000&x-signature=p80zyQbgl13O5dqkRS6QfQZ4%2F%2BA%3D&biz_tag=tt_video&idc=no1a&ps=4f5296ae&s=MUSIC_AWEME&sc=cover&shcp=f6441914&shp=d05b14bd&t=bacd0480"
],
"width": 720
},
"has_watermark": false,
"height": 1024,
"is_bytevc1": 0,
"is_callback": true,
"meta": "{\"LoudnessRange\":\"3.8\",\"LoudnessRangeEnd\":\"-15.8\",\"LoudnessRangeStart\":\"-19.6\",\"MaximumMomentaryLoudness\":\"-14.1\",\"MaximumShortTermLoudness\":\"-15.7\",\"Version\":\"2\",\"VolumeInfoJson\":\"{\\\"Loudness\\\":-17.3,\\\"LoudnessRangeEnd\\\":-15.8,\\\"LoudnessRangeStart\\\":-19.6,\\\"Metrics\\\":{\\\"AEDInfo\\\":{\\\"SpeechRatio\\\":0,\\\"MusicRatio\\\":0.89,\\\"SingingRatio\\\":0.56},\\\"Cutoff\\\":{\\\"Spkr150G\\\":3.66,\\\"Spkr200G\\\":4.49,\\\"FCenL\\\":3022.64,\\\"FCenR\\\":3024.87,\\\"Spkr100G\\\":2.12},\\\"Loudness\\\":{\\\"Integrated\\\":-17.328},\\\"Phase\\\":{\\\"RMSDownmixDiff\\\":-0.042},\\\"RMSStats\\\":{\\\"LRDiff\\\":-0.008,\\\"LTotal\\\":-18.256,\\\"Peak\\\":-5.929,\\\"RTotal\\\":-18.248},\\\"Version\\\":\\\"1.4.2\\\"},\\\"Peak\\\":0.50699,\\\"Version\\\":2,\\\"LoudnessRange\\\":3.8,\\\"MaximumMomentaryLoudness\\\":-14.1,\\\"MaximumShortTermLoudness\\\":-15.7}\",\"flight_id\":\"\",\"loudness\":\"-17.3\",\"peak\":\"0.50699\",\"play_time_prob_dist\":\"[800,0.9851,2472.8805]\",\"qprf\":\"1.000\",\"sr_score\":\"1.000\",\"vq_score\":\"56.69\"}",
"need_set_token": false,
"origin_cover": {
"height": 720,
"uri": "tos-no1a-p-0037-no/osiEbfxrVggRDqLICuoEAUBkEFaFIDmnncHfLl",
"url_list": [
"https://p16-pu-sign-no.tiktokcdn-eu.com/tos-no1a-p-0037-no/osiEbfxrVggRDqLICuoEAUBkEFaFIDmnncHfLl~tplv-tiktokx-360p.webp?dr=1363&nonce=74262&refresh_token=e7e1b150e9e374c818ff5a3b75b59e19&x-expires=1739916000&x-signature=0bRZIk3gfpuHjqHYlTpGgFd%2Bs6g%3D&biz_tag=tt_video&idc=no1a&ps=d97f9a4f&s=MUSIC_AWEME&sc=cover&shcp=f6441914&shp=d05b14bd&t=bacd0480"
],
"width": 720
},
"play_addr": {
"data_size": 2855709,
"file_cs": "c:0-9097-190f",
"file_hash": "6396aa1362d935f17ad432e617c6b686",
"height": 1024,
"uri": "v24044gl0000ctlh3l7og65kfptpasdg",
"url_key": "v24044gl0000ctlh3l7og65kfptpasdg_h264_540p_2355223",
"url_list": [
"https://v45.tiktokcdn-eu.com/a6eb6c0d1d5d05b95148b34d6b5e89dd/67b5042f/video/tos/no1a/tos-no1a-ve-0068-no/o8ouurHExUIcaCinAfQEREnFkfRNgxEkFDbBgV/?a=1233&bti=NDg5QGo7dik3OjlmNC4uYCM6bTQ0MDo%3D&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=4600&bt=2300&cs=0&ds=6&ft=td_Lr8QLodzR12NvnSeveIxRrb8biq_45SY&mime_type=video_mp4&qs=0&rc=OGY0NTVpPDQzZGg7NTk1M0BpanZzc245cm9rdzMzbzczNUAxXi4tMmNhXjYxNTEtNWEvYSNhXnFjMmQ0MGlgLS1kMTFzcw%3D%3D&vvpl=1&l=202502180605264FFF1CE5D6043F4CF934&btag=e000b5000"
],
"width": 576
},
"play_addr_bytevc1": {
"data_size": 495397,
"file_cs": "c:0-9619-368d",
"file_hash": "eab2485aed30a17df251815bf3604f2b",
"height": 1024,
"uri": "v24044gl0000ctlh3l7og65kfptpasdg",
"url_key": "v24044gl0000ctlh3l7og65kfptpasdg_bytevc1_540p_408574",
"url_list": [
"https://v45.tiktokcdn-eu.com/9355f810d60e6c4a52161e8098ca7a98/67b5042f/video/tos/no1a/tos-no1a-ve-0068c001-no/o8fntVRVEwDaurOEGEFHUIy0FbjnEgBoxcHkfA/?a=1233&bti=NDg5QGo7dik3OjlmNC4uYCM6bTQ0MDo%3D&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=796&bt=398&cs=2&ds=6&ft=td_Lr8QLodzR12NvnSeveIxRrb8biq_45SY&mime_type=video_mp4&qs=5&rc=ZDdlNWZoOmg6O2RkZTg6M0BpanZzc245cm9rdzMzbzczNUBeMTEyNTNjX2MxMy0zXzQ2YSNhXnFjMmQ0MGlgLS1kMTFzcw%3D%3D&vvpl=1&l=202502180605264FFF1CE5D6043F4CF934&btag=e000b5000"
],
"width": 576
},
"play_addr_h264": {
"data_size": 2855709,
"file_cs": "c:0-9097-190f",
"file_hash": "6396aa1362d935f17ad432e617c6b686",
"height": 1024,
"uri": "v24044gl0000ctlh3l7og65kfptpasdg",
"url_key": "v24044gl0000ctlh3l7og65kfptpasdg_h264_540p_2355223",
"url_list": [
"https://v45.tiktokcdn-eu.com/a6eb6c0d1d5d05b95148b34d6b5e89dd/67b5042f/video/tos/no1a/tos-no1a-ve-0068-no/o8ouurHExUIcaCinAfQEREnFkfRNgxEkFDbBgV/?a=1233&bti=NDg5QGo7dik3OjlmNC4uYCM6bTQ0MDo%3D&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=4600&bt=2300&cs=0&ds=6&ft=td_Lr8QLodzR12NvnSeveIxRrb8biq_45SY&mime_type=video_mp4&qs=0&rc=OGY0NTVpPDQzZGg7NTk1M0BpanZzc245cm9rdzMzbzczNUAxXi4tMmNhXjYxNTEtNWEvYSNhXnFjMmQ0MGlgLS1kMTFzcw%3D%3D&vvpl=1&l=202502180605264FFF1CE5D6043F4CF934&btag=e000b5000"
],
"width": 576
},
"ratio": "540p",
"source_HDR_type": 0,
"width": 576
},
"video_control": {
"allow_download": true,
"allow_duet": true,
"allow_dynamic_wallpaper": true,
"allow_music": true,
"allow_react": true,
"allow_stitch": true,
"draft_progress_bar": 1,
"prevent_download_type": 0,
"share_type": 1,
"show_progress_bar": 1,
"timer_status": 1
},
"with_promotional_music": false,
"without_watermark": false
}
],
"can_pin_video": false,
"cursor": 12,
"extra": {
"logid": "202502180605264FFF1CE5D6043F4CF934",
"now": 1739829927000
},
"has_more": 1,
"log_pb": {
"impr_id": "202502180605264FFF1CE5D6043F4CF934"
},
"need_lazy_loading": false,
"status_code": 0,
"status_msg": ""
}Best Practices
Error Handling
Implement comprehensive error handling and retry logic for failed requests. Log errors properly for debugging.
Caching
Cache responses when possible to reduce API calls and improve performance. Consider data freshness requirements.
Security
Never expose your API key in client-side code. Use environment variables and secure key management practices.
Troubleshooting
Unauthorized
Check your API key is correct and properly formatted in the x-api-key header.
Payment Required
You ran out of credits and need to buy more.
Not Found
The resource (user, video, etc.) might not exist or be private.
Too Many Requests
You have exceeded your rate limit. Slow down your requests.
Frequently Asked Questions
How much does it cost to scrape TikTok?
SociaVault offers 50 free API calls to get started. After that, pricing starts at $10 for 5k requests with volume discounts available.
Is it legal to scrape TikTok data?
Scraping publicly available data is generally considered legal. We only collect public data that is accessible without logging in.
How fast can I scrape TikTok?
Our API handles the rate limiting for you. You can make requests as fast as your plan allows.
What data format does the API return?
All API responses are returned in JSON format, making it easy to integrate with any programming language or application.
Related Tutorials
Videos Using Song in Other Languages
Videos Using Song with Node.jsVideos Using Song with JavaScriptVideos Using Song with PythonVideos Using Song with PHPMore TypeScript Tutorials
TikTok Profile DataTikTok Profile DemographicsTikTok Profile VideosTikTok Video DetailsReady to Start Scraping?
Get started with 50 free API calls. No credit card required. Stop worrying about proxies and captchas.