Code OCTSAVE50 for 50% OFF
Complete Guide

Complete Guide to TikTok Scraping API: Extract Videos, User Data & More

Everything you need to know about scraping TikTok data—from downloading videos without watermarks to extracting user profiles, comments, and search results.

TikTok API Video Scraping Social Media
TikTok API access and data scraping interface

TikTok has become one of the most data-rich platforms on the internet. Whether you're building a social media analytics tool, researching viral trends, or just want to download videos without watermarks, scraping TikTok data is incredibly valuable. But here's the problem: TikTok's API isn't publicly available, and their anti-bot measures are aggressive.

In this guide, I'll walk you through every TikTok scraping endpoint available through ScrapingBot, show you exactly what data you get back, and give you real examples you can copy and use right away.

Why Scraping TikTok Is So Hard

Before we dive into solutions, let's talk about why TikTok scraping is notoriously difficult:

The TikTok Scraping Challenge

  • No public API: Unlike Twitter or YouTube, TikTok doesn't offer a public API for developers
  • Aggressive bot detection: TikTok uses sophisticated fingerprinting and behavioral analysis
  • Dynamic content: Everything loads via JavaScript and complex API calls
  • Rate limiting: Too many requests and your IP gets blocked instantly
  • Changing endpoints: TikTok frequently changes their internal API structure

The ScrapingBot TikTok API: 8 Powerful Endpoints

ScrapingBot provides access to 8 different TikTok endpoints that cover pretty much everything you'd want to scrape. Let's go through each one with real examples.

1. Video Info & Download (No Watermark)

This is probably the most popular endpoint. Give it a TikTok video URL, and it returns complete video information plus HD download links—without watermarks.

# Get video info and download links
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/",
    "params": {
      "url": "https://www.tiktok.com/@tiktok/video/7231338487075638570"
    }
  }'

What you get back: A massive JSON object with everything about the video. Here's the key data:

Video Response Data

  • Video downloads: HD play URL, watermark-free download link, music track
  • Stats: Play count, likes, comments, shares, saves
  • Author info: Username, display name, avatar, verification status
  • Content details: Description, hashtags, mentions, duration
  • Metadata: Video ID, create time, region, language
// Typical response structure
{
  "success": true,
  "data": {
    "aweme_id": "7231338487075638570",
    "desc": "Check out this amazing video! #fyp",
    "create_time": 1680000000,
    "author": {
      "uid": "123456789",
      "unique_id": "tiktok",
      "nickname": "TikTok",
      "avatar_larger": "https://...",
      "signature": "Make Your Day",
      "verified": true
    },
    "statistics": {
      "play_count": 1234567,
      "comment_count": 12345,
      "digg_count": 123456,
      "share_count": 12345
    },
    "video": {
      "play_addr": "https://...hd.mp4",
      "download_addr": "https://...nowatermark.mp4",
      "duration": 15000,
      "ratio": "720p"
    },
    "music": {
      "title": "Original Sound",
      "author": "tiktok",
      "play_url": "https://..."
    }
  }
}

2. User Profile Info

Want to get detailed information about a TikTok user? This endpoint returns their complete profile, including bio, follower counts, and stats.

# Get user profile information
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/user/info",
    "params": {
      "unique_id": "tiktok"
    }
  }'

Important: Just pass the username (like "tiktok"), not the full URL or @ symbol.

User Profile Data

  • Basic info: Username, display name, bio, avatar URLs
  • Stats: Follower count, following count, total likes, video count
  • Verification: Verified status, account type
  • Social links: Instagram, YouTube, Twitter handles if linked

3. User Posts (Video Feed)

Get all videos posted by a specific user. This is perfect for tracking content creators or analyzing posting patterns.

# Get user's videos
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/user/posts",
    "params": {
      "unique_id": "tiktok",
      "count": "20",
      "cursor": "0"
    }
  }'

The cursor parameter is for pagination. Start with "0", then use the has_more field and max_cursor from the response to fetch the next page.

💡 Pagination Example

Fetch all videos from a user by following the pagination:

# Python pagination example
cursor = 0
all_videos = []

while True:
    response = scrape_tiktok({
        "endpoint": "/user/posts",
        "params": {
            "unique_id": "tiktok",
            "count": "30",
            "cursor": str(cursor)
        }
    })
    
    all_videos.extend(response['data']['aweme_list'])
    
    if not response['data']['has_more']:
        break
    
    cursor = response['data']['max_cursor']

print(f"Found {len(all_videos)} total videos")

4. Search Users

Find TikTok users by keywords. Great for discovering influencers in specific niches.

# Search for users
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/user/search",
    "params": {
      "keywords": "cooking",
      "count": "20",
      "cursor": "0"
    }
  }'

Returns a list of users matching your keywords, including their follower counts, bios, and verification status.

5. Search Videos

Search for videos by keywords or hashtags. This is incredibly useful for trend research and content discovery.

# Search for videos
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/feed/search",
    "params": {
      "keywords": "funny cats",
      "count": "20",
      "cursor": "0"
    }
  }'

You'll get back full video objects just like the video info endpoint, including play URLs, stats, and author info.

6. Music Info

Get information about a specific music track or sound used on TikTok.

# Get music track information
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/music/info",
    "params": {
      "music_id": "7231338505431288622"
    }
  }'

7. Music Posts (Videos Using a Sound)

Find all videos that use a specific music track. Perfect for tracking trending sounds.

# Get videos using a specific music track
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/music/posts",
    "params": {
      "music_id": "7231338505431288622",
      "count": "20",
      "cursor": "0"
    }
  }'

8. Video Comments

Extract all comments from a video. Great for sentiment analysis and engagement tracking.

# Get video comments
curl -X POST https://scrapingbot.io/api/v1/tiktok \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "/comment/list",
    "params": {
      "url": "https://www.tiktok.com/@tiktok/video/7093219391759764782",
      "count": "20",
      "cursor": "0"
    }
  }'

Comment Data Structure

  • Comment text: Full comment content
  • User info: Commenter username, avatar, verification status
  • Engagement: Like count, reply count
  • Timing: When the comment was posted
  • Replies: Nested reply structure if available

Real-World Use Cases

Let me show you some practical applications of TikTok scraping:

Use Case 1: Build a TikTok Video Downloader

Create a simple web app where users paste a TikTok URL and get a watermark-free download:

// JavaScript example
async function downloadTikTokVideo(videoUrl) {
  const response = await fetch('https://scrapingbot.io/api/v1/tiktok', {
    method: 'POST',
    headers: {
      'x-api-key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      endpoint: '/',
      params: { url: videoUrl }
    })
  });
  
  const data = await response.json();
  
  if (data.success) {
    const downloadUrl = data.data.video.download_addr;
    const videoTitle = data.data.desc;
    
    // Trigger download
    const a = document.createElement('a');
    a.href = downloadUrl;
    a.download = `${videoTitle}.mp4`;
    a.click();
  }
}

Use Case 2: Track Competitor Content Strategy

Monitor what your competitors are posting and analyze their engagement:

# Python example - Track competitors
competitors = ['competitor1', 'competitor2', 'competitor3']
analytics = []

for username in competitors:
    # Get their latest posts
    response = scrape_tiktok({
        "endpoint": "/user/posts",
        "params": {"unique_id": username, "count": "10"}
    })
    
    for video in response['data']['aweme_list']:
        analytics.append({
            'username': username,
            'video_id': video['aweme_id'],
            'views': video['statistics']['play_count'],
            'likes': video['statistics']['digg_count'],
            'engagement_rate': video['statistics']['digg_count'] / video['statistics']['play_count'],
            'description': video['desc'],
            'created': video['create_time']
        })

# Sort by engagement rate
top_performing = sorted(analytics, key=lambda x: x['engagement_rate'], reverse=True)
print(f"Best performing video: {top_performing[0]}")

Use Case 3: Trend Discovery Dashboard

Build a dashboard that shows trending sounds, hashtags, and viral videos:

# Search for trending topics
trending_topics = ['fyp', 'viral', 'trending', 'challenge2025']
viral_videos = []

for topic in trending_topics:
    response = scrape_tiktok({
        "endpoint": "/feed/search",
        "params": {"keywords": topic, "count": "50"}
    })
    
    # Filter for high-performing videos
    for video in response['data']['data']:
        if video['statistics']['play_count'] > 1000000:
            viral_videos.append({
                'topic': topic,
                'video_url': f"https://tiktok.com/@{video['author']['unique_id']}/video/{video['aweme_id']}",
                'views': video['statistics']['play_count'],
                'engagement': video['statistics']['digg_count']
            })

print(f"Found {len(viral_videos)} viral videos across trending topics")

Best Practices & Tips

✅ Do's

  • Cache results: Store frequently accessed data to save on API calls
  • Use pagination: Don't try to fetch everything at once—paginate through results
  • Handle errors gracefully: Videos get deleted, users change usernames
  • Respect rate limits: One request costs 1 credit—plan accordingly

⚠️ Common Mistakes

  • Wrong URL format: Video endpoint needs /video/ in URL, user endpoints need just username
  • Including @ symbol: Just use "tiktok", not "@tiktok"
  • Ignoring cursor: Always check has_more and use max_cursor for pagination
  • Not handling deleted content: Videos and users can disappear—check status codes

Getting Started

Ready to start scraping TikTok? Here's how to get up and running:

🚀 Quick Start Guide

  1. 1
    Sign up for ScrapingBot — Get 1,000 free credits (100 TikTok API calls)
  2. 2
    Get your API key — Available instantly in your dashboard
  3. 3
    Make your first request — Try any endpoint from this guide
  4. 4
    Build something awesome — Video downloader, analytics dashboard, trend tracker

Wrapping Up

TikTok scraping doesn't have to be complicated. With the right API, you can extract videos, user profiles, comments, and more—all without dealing with CAPTCHAs, rate limits, or changing endpoints.

Whether you're building a video downloader, tracking trends, or analyzing competitors, ScrapingBot's TikTok API has you covered with 8 powerful endpoints and consistent, reliable data.

P.S. Have questions or need help with a specific use case? Check out our documentation or reach out to support. We're here to help you build amazing things with TikTok data.

Ready to Start Scraping TikTok?

Skip the complexity and get started in minutes. ScrapingBot handles all TikTok endpoints with a simple API. Get 1,000 free credits—no credit card required.