The TikTok Scraper is a cutting-edge tool designed to extract and analyze content from one of the world's fastest-growing social media platforms. This powerful scraper offers an efficient method to collect videos, comments, user data, and engagement metrics, providing valuable insights for various industries and applications.
Data Point | Description | Example |
---|---|---|
Video Information | Details about TikTok posts | Post ID, description, creation time |
Engagement Metrics | Interaction data | Likes, shares, comments, play count |
User Profiles | Creator information | Username, bio, follower count |
Comment Data | User feedback on videos | Comment text, likes, replies |
Hashtags | Categorization tags | List of hashtags used in video |
Music Information | Audio used in videos | Song title, artist, usage count |
Video Statistics | Technical video data | Duration, dimensions, preview image |
The TikTok Scraper is a valuable asset for various sectors, including:
The TikTok Scraper API allows you to extract various types of information from TikTok, including comments, posts, profiles, and more. This powerful tool enables developers to integrate TikTok data into their applications for social media analysis, content discovery, and trend monitoring.
To use the TikTok Scraper API, you'll need to authenticate your requests using your API key. The API provides several endpoints for retrieving different types of information:
Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY
The request body should be a JSON object with the following structure:
{
"url": "https://www.tiktok.com/@username/video/video_id"
}
Please note that usage is subject to rate limiting. Refer to your plan details for specific limits.
Here's an example of the data you can expect to receive for the posts endpoint:
[
{
"input": {
"url": "https://www.tiktok.com/@vantoan___/video/7294298719665622305",
"discovery_input": ""
},
"url": "https://www.tiktok.com/@vantoan___/video/7294298719665622305",
"post_id": "7294298719665622305",
"description": "Wait for it 🥹❤️ I was playing the piano when suddenly, a 8 years old girl asked me to play « River Flows in you » and then she played with me ! 🎻😱 All the train station was shocked !! #piano #violin #riverflowinyou #publicreaction ",
"create_time": "2023-10-26T16:04:30.000Z",
"digg_count": 55900000,
"share_count": "747400",
"collect_count": 5436796,
"comment_count": 363700,
"play_count": 498500000,
"video_duration": 101,
"hashtags": [
"piano",
"violin",
"riverflowinyou",
"publicreaction"
],
"original_sound": "Van: son original",
"profile_id": "6839815725969687558",
"profile_username": "Van",
"profile_url": "https://www.tiktok.com/@vantoan___",
"profile_avatar": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/da08c164c1e4c507fbee7d97e963ab36~c5_1080x1080.jpeg?lk3s=a5d48078&nonce=98799&refresh_token=b10bb91e3ccebb54f1d92f99562ce67e&x-expires=1726509600&x-signature=WMmjUcoE%2BlaalE0kfWOKz3tpNcs%3D&shp=a5d48078&shcp=81f88b70",
"profile_biography": "Piano ❤️\nCollab 📨 : vantoanlam.pro@gmail.com",
"preview_image": "https://p16-sign-useast2a.tiktokcdn.com/obj/tos-useast2a-p-0037-euttp/ac945e5f0d424a86a9f672d83468de98_1698336272?lk3s=81f88b70&x-expires=1726509600&x-signature=Q2qXneBLzZOINsMV%2BAoUP9BZB5U%3D&shp=81f88b70&shcp=-",
"post_type": "video",
"offical_item": false,
"secu_id": "MS4wLjABAAAAQhcYf_TjRKUku-aF8oqngAfzrYksgGLRz8CKMciBFdfR54HQu3qGs-WoJ-KO7hO8",
"original_item": false,
"shortcode": "7294298719665622305",
"width": 576,
"ratio": "540p",
"video_url": "https://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068-euttp/oYi6N7oEitBAnnMiUyADgyja2U6hICQQInixfq/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C&cv=1&br=3264&bt=1632&cs=0&ds=3&ft=4fUEKMM58Zmo0bf0v-4jVzfOZpWrKsd.&mime_type=video_mp4&qs=0&rc=PDhoaWYzOGY2Zmk2Zjc3ZkBpamtoM3A5cnA7bjMzZjczM0BgLjFfMjY0NmAxNjAzMDY1YSMzaXNxMmRzbnFgLS1kMWNzcw%3D%3D&btag=e00090000&expire=1726360486&l=202409141833049B51C620C5D07534C521&ply_type=2&policy=2&signature=d8e3b00d249f67b1a92abaa368e0c9a4&tk=tt_chain_token",
"music": {
"authorname": "Van",
"covermedium": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/da08c164c1e4c507fbee7d97e963ab36~c5_720x720.jpeg?lk3s=a5d48078&nonce=72415&refresh_token=9e425867e27b58d6331712f1446326bd&x-expires=1726509600&x-signature=2mH4RUXl5vI415rgrlGtK6EkD0o%3D&shp=a5d48078&shcp=81f88b70",
"id": "7294298748561394465",
"original": false,
"playurl": "https://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-v-2370-euttp/oQBjcpIMIGgKlcdeLjLe6LUUQhwfsoEfGERTQy/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=0&dr=0&er=0&lr=default&cd=0%7C0%7C0%7C0&br=250&bt=125&ft=GNDpcInz7ThO1hyrXq8Zmo&mime_type=audio_mpeg&qs=6&rc=O2dpaGhkNmQ7Z2ZoaDszOkBpM3Z3c3Y5cjc7bjMzZjU8M0AuNjZeMGFhNV4xMDYxLmMxYSM1NWNrMmRrcHFgLS1kMWNzcw%3D%3D&btag=e00090000&expire=1726360486&l=202409141833049B51C620C5D07534C521&ply_type=3&policy=3&signature=0d4fae1e4e4fb7a8914f354ab4fe6f0c&tk=0",
"title": "son original"
},
"cdn_url": "https://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068-euttp/o4h6IyT6nsDiCjyvhAEnx2aft76oNiIBQqnANU/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C&cv=1&br=3160&bt=1580&cs=0&ds=6&ft=4fUEKMM58Zmo0bf0v-4jVzfOZpWrKsd.&mime_type=video_mp4&qs=0&rc=MzpnZTRkNTdkOzg6ZzY3Z0BpamtoM3A5cnA7bjMzZjczM0AyXy4xMC4xXy0xM2BgMGIuYSMzaXNxMmRzbnFgLS1kMWNzcw%3D%3D&btag=e00090000&expire=1726360486&l=202409141833049B51C620C5D07534C521&ply_type=2&policy=2&signature=742be253346060e932e5669a14cf8409&tk=tt_chain_token",
"is_verified": false
}
]
import requests
import json
# Your API Key
api_key = 'YOUR_API_KEY'
# API Endpoint for post information
url = 'https://taskagi.net/api/social-media/tiktok-scraper/posts'
# Headers
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
# Request Body
data = {
'url': 'https://www.tiktok.com/@vantoan___/video/7294298719665622305'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
post_info = response.json()
# Print the post information
print(json.dumps(post_info, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
# Example for posts by keyword
url = 'https://taskagi.net/api/social-media/tiktok-scraper/posts-by-keyword'
# Request Body for keyword search
data = {
'keyword': 'piano'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
keyword_posts = response.json()
# Print the posts
print(json.dumps(keyword_posts, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)