Tiktok Apis Scraper avatar
Tiktok Apis Scraper
Deprecated

Pricing

$1.00/month + usage

Go to Apify Store
Tiktok Apis Scraper

Tiktok Apis Scraper

Deprecated

Pricing

$1.00/month + usage

Rating

0.0

(0)

Developer

No No

No No

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

1

Monthly active users

6 days ago

Last modified

Share

TikTok API Actor - Complete TikTok Data Scraper

TikTok API Apify Actor License

Extract TikTok data at scale - Get user profiles, videos, comments, followers, trending content, and more from TikTok using this powerful Apify Actor.

🔗 Powered by TikTok API45 on RapidAPI | 💬 Support: Telegram @datahubconnect


📑 Table of Contents


🚀 Key Features

  • 22 TikTok Endpoints - Complete access to TikTok data
  • 🔍 User Data - Profile info, posts, followers, following, liked videos
  • 📹 Video Data - Video details, comments, related videos, download links
  • 🔎 Search - Search videos, users, hashtags with autocomplete
  • 📊 Analytics - Track hashtag performance and trending content
  • Fast & Reliable - Built-in retry logic and error handling
  • 🔐 Secure - Enterprise-grade security and data protection
  • 💰 Cost-Effective - Pay only for what you use on Apify platform

🎯 Use Cases

  • Social Media Monitoring - Track brand mentions and competitor analysis
  • Influencer Marketing - Find and analyze influencers in your niche
  • Content Research - Discover trending content and hashtags
  • Data Analytics - Build TikTok analytics dashboards
  • Lead Generation - Find potential customers based on interests
  • Market Research - Understand audience behavior and preferences
  • SEO & Marketing - Optimize content strategy based on TikTok trends

🛠️ Quick Start

  1. Open Actor - Find "TikTok API Actor" on Apify Store
  2. Configure - Select endpoint and add parameters
  3. Run - Click "Start" and get results in seconds

Using API

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const input = {
endpoint: 'api/v1/user/detail',
parameters: {
unique_id: 'username',
},
};
const run = await client.actor('YOUR_ACTOR_ID').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Using CLI

apify call YOUR_ACTOR_ID --input '{
"endpoint": "api/v1/search/video",
"parameters": {
"keyword": "trending",
"offset": "0"
}
}'

📋 All Endpoints Reference

Quick Summary Table

CategoryEndpointRequired ParametersOptional Parameters
USERuser/detailunique_id-
USERuser/postssec_uidcount, cursor
USERuser/popular-postssec_uidcount, cursor
USERuser/oldest-postssec_uidcount, cursor
USERuser/liked-postssec_uidcount, cursor
USERuser/re-postssec_uidcount, cursor
USERuser/followingssec_uidcount, min_cursor
USERuser/followerssec_uidcount, min_cursor
USERuser/playlistsec_uidcount, cursor
VIDEOpost/detailvideo_id-
VIDEOpost/commentsvideo_idcount, cursor
VIDEOpost/comment/repliesvideo_id, comment_idcount, cursor
VIDEOpost/explore-category_type, count
VIDEOpost/explore-categories--
VIDEOpost/relatedvideo_idcount, cursor
SEARCHsearch/generalkeywordoffset, search_id
SEARCHsearch/videokeywordoffset, search_id
SEARCHsearch/accountkeywordoffset, search_id
SEARCHsearch/suggestionkeyword-
DOWNLOADdownload/videourl-
HASHTAGchallenge/postschallenge_idcount, cursor
HASHTAGchallenge/detailchallenge_name-

Endpoints by Category

👤 User Endpoints (9)

  • user/detail - Get user profile information
  • user/posts - Get user's videos
  • user/popular-posts - Get most popular videos
  • user/oldest-posts - Get oldest videos first
  • user/liked-posts - Get liked videos (if public)
  • user/re-posts - Get reposted videos
  • user/followings - Get following list
  • user/followers - Get followers list
  • user/playlist - Get user playlists

📹 Video/Post Endpoints (6)

  • post/detail - Get video details and metadata
  • post/comments - Get video comments
  • post/comment/replies - Get comment replies
  • post/explore - Get trending/explore videos
  • post/explore-categories - Get explore categories
  • post/related - Get related videos

🔍 Search Endpoints (4)

  • search/general - Search everything
  • search/video - Search videos only
  • search/account - Search user accounts
  • search/suggestion - Get search suggestions

📥 Download Endpoint (1)

  • download/video - Get video download link (no watermark)

#️⃣ Challenge/Hashtag Endpoints (2)

  • challenge/posts - Get videos for a hashtag
  • challenge/detail - Get hashtag information

💡 Common Examples

Example 1: Get User Profile

{
"endpoint": "api/v1/user/detail",
"parameters": {
"unique_id": "zg.520"
}
}

Returns: User profile info (avatar, nickname, follower count, bio, etc.)

Example 2: Get User Videos

{
"endpoint": "api/v1/user/posts",
"parameters": {
"sec_uid": "MS4wLjABAAAAkagks5n_8XDIMWf94LZDUYs54FG5bJmEFJkWtjA__uRUN8QWaavHhzSyEO6WBPQj",
"count": "30",
"cursor": "0"
}
}

Returns: List of user's videos with full details

Example 3: Search Videos

{
"endpoint": "api/v1/search/video",
"parameters": {
"keyword": "dance tutorial",
"offset": "0",
"search_id": "0"
}
}

Returns: Videos matching keyword

Example 4: Get Video Comments

{
"endpoint": "api/v1/post/comments",
"parameters": {
"video_id": "7445718523688234241",
"count": "50",
"cursor": "0"
}
}

Returns: List of comments for the video

Example 5: Download Video

{
"endpoint": "api/v1/download/video",
"parameters": {
"url": "https://www.tiktok.com/@username/video/1234567890"
}
}

Returns: Video download links (with/without watermark)

Example 6: Track Hashtag

{
"endpoint": "api/v1/challenge/detail",
"parameters": {
"challenge_name": "fyp"
}
}

Returns: Hashtag info (view count, video count, etc.)


📖 Detailed Endpoint Documentation

User Endpoints

1. Get User Detail

Endpoint: api/v1/user/detail Description: Get detailed profile information for a TikTok user

Required Parameters:

  • unique_id (string) - The TikTok username (e.g., "zg.520")

Example:

{ "unique_id": "zg.520" }

2. Get User Posts

Endpoint: api/v1/user/posts Description: Get all posts from a user's profile

Required Parameters:

  • sec_uid (string) - The secure user ID (get from user/detail)

Optional Parameters:

  • count (string) - Number of posts (default: 30)
  • cursor (string) - Pagination cursor (default: 0)

Example:

{
"sec_uid": "MS4wLjABAAAAkagks5n_8XDIMWf94LZDUYs54FG5bJmEFJkWtjA__uRUN8QWaavHhzSyEO6WBPQj",
"count": "30",
"cursor": "0"
}

Endpoint: api/v1/user/popular-posts Description: Get user's most popular posts sorted by engagement

Required Parameters:

  • sec_uid (string) - The secure user ID

Optional Parameters:

  • count (string) - Number of posts (default: 30)
  • cursor (string) - Pagination cursor (default: 0)

4. Get User Oldest Posts

Endpoint: api/v1/user/oldest-posts Description: Get user's posts sorted from oldest to newest

Required Parameters:

  • sec_uid (string) - The secure user ID

Optional Parameters:

  • count (string) - Number of posts (default: 30)
  • cursor (string) - Pagination cursor (default: 0)

5. Get User Liked Posts

Endpoint: api/v1/user/liked-posts Description: Get posts that a user has liked (if public)

Required Parameters:

  • sec_uid (string) - The secure user ID

Optional Parameters:

  • count (string) - Number of posts (default: 30)
  • cursor (string) - Pagination cursor (default: 0)

6. Get User Re-Posts

Endpoint: api/v1/user/re-posts Description: Get videos that user has reposted/shared

Required Parameters:

  • sec_uid (string) - The secure user ID

Optional Parameters:

  • count (string) - Number of posts (default: 30)
  • cursor (string) - Pagination cursor (default: 0)

7. Get User Following

Endpoint: api/v1/user/followings Description: Get list of users that this user is following

Required Parameters:

  • sec_uid (string) - The secure user ID

Optional Parameters:

  • count (string) - Number of users (default: 30)
  • min_cursor (string) - Pagination cursor (default: 0)

8. Get User Followers

Endpoint: api/v1/user/followers Description: Get list of users following this user

Required Parameters:

  • sec_uid (string) - The secure user ID

Optional Parameters:

  • count (string) - Number of followers (default: 30)
  • min_cursor (string) - Pagination cursor (default: 0)

9. Get User Playlists

Endpoint: api/v1/user/playlist Description: Get user's created playlists

Required Parameters:

  • sec_uid (string) - The secure user ID

Optional Parameters:

  • count (string) - Number of playlists (default: 30)
  • cursor (string) - Pagination cursor (default: 0)

Post/Video Endpoints

10. Get Post Detail

Endpoint: api/v1/post/detail Description: Get detailed information about a specific video/post

Required Parameters:

  • video_id (string) - The TikTok video ID

Example:

{ "video_id": "7445718523688234241" }

11. Get Post Comments

Endpoint: api/v1/post/comments Description: Get comments on a specific video

Required Parameters:

  • video_id (string) - The TikTok video ID

Optional Parameters:

  • count (string) - Number of comments (default: 50)
  • cursor (string) - Pagination cursor (default: 0)

12. Get Comment Replies

Endpoint: api/v1/post/comment/replies Description: Get replies to a specific comment

Required Parameters:

  • video_id (string) - The TikTok video ID
  • comment_id (string) - The comment ID to get replies for

Optional Parameters:

  • count (string) - Number of replies (default: 6)
  • cursor (string) - Pagination cursor (default: 0)

13. Get Explore Videos

Endpoint: api/v1/post/explore Description: Get trending/explore videos

Optional Parameters:

  • category_type (string) - Category filter (default: 0)
  • count (string) - Number of videos (default: 16)

14. Get Explore Categories

Endpoint: api/v1/post/explore-categories Description: Get available explore/trending categories

Parameters: None required


Endpoint: api/v1/post/related Description: Get videos related to a specific video

Required Parameters:

  • video_id (string) - The TikTok video ID

Optional Parameters:

  • count (string) - Number of videos (default: 16)
  • cursor (string) - Pagination cursor (default: 0)

Search Endpoints

Endpoint: api/v1/search/general Description: Search for videos, users, sounds, and hashtags

Required Parameters:

  • keyword (string) - Search query

Optional Parameters:

  • offset (string) - Pagination offset (default: 0)
  • search_id (string) - Search session ID (default: 0)

17. Search Videos

Endpoint: api/v1/search/video Description: Search specifically for videos

Required Parameters:

  • keyword (string) - Search query

Optional Parameters:

  • offset (string) - Pagination offset (default: 0)
  • search_id (string) - Search session ID (default: 0)

18. Search Accounts

Endpoint: api/v1/search/account Description: Search for TikTok user accounts

Required Parameters:

  • keyword (string) - Username or search query

Optional Parameters:

  • offset (string) - Pagination offset (default: 0)
  • search_id (string) - Search session ID (default: 0)

19. Search Suggestions

Endpoint: api/v1/search/suggestion Description: Get search keyword suggestions/autocomplete

Required Parameters:

  • keyword (string) - Partial search query

Download Endpoint

20. Download Video

Endpoint: api/v1/download/video Description: Get download link for a TikTok video (without watermark)

Required Parameters:

  • url (string) - Full TikTok video URL

Example:

{ "url": "https://www.tiktok.com/@zg.520/video/7556699581464038664" }

Challenge/Hashtag Endpoints

21. Get Challenge Posts

Endpoint: api/v1/challenge/posts Description: Get videos for a specific hashtag challenge

Required Parameters:

  • challenge_id (string) - The challenge/hashtag ID

Optional Parameters:

  • count (string) - Number of posts (default: 30)
  • cursor (string) - Pagination cursor (default: 0)

22. Get Challenge Detail

Endpoint: api/v1/challenge/detail Description: Get information about a hashtag challenge

Required Parameters:

  • challenge_name (string) - The hashtag name (without #)

Example:

{ "challenge_name": "tianxuning" }

🔧 Input Parameters

ParameterTypeRequiredDescription
endpointStringYesAPI endpoint to call (see list above)
methodStringNoHTTP method (default: GET)
parametersObjectVariesEndpoint-specific parameters
maxRetriesIntegerNoMax retry attempts (default: 3)

📊 Output Format

Results are stored in the Actor's default dataset as JSON objects.

Example output structure:

{
"success": true,
"data": {
// Endpoint-specific response data
},
"endpoint": "api/v1/user/detail",
"timestamp": "2024-01-01T00:00:00.000Z"
}

📈 Performance & Pricing

Performance

  • Average Run Time: 2-10 seconds per request
  • Memory Usage: ~256-512 MB
  • Concurrent Requests: Configurable (default: 1)

Pricing

  • Pay-per-use - Only charged when you run the Actor
  • Transparent pricing - Based on compute time and API calls
  • No hidden fees - All costs shown upfront

Contact us for volume discounts: Telegram @datahubconnect


💡 Pro Tips

Getting sec_uid

To get a user's sec_uid, first call api/v1/user/detail with their unique_id (username). The response will include the sec_uid field.

Example Workflow:

// Step 1: Get user detail
{ "endpoint": "api/v1/user/detail", "parameters": { "unique_id": "username" } }
// Step 2: Use sec_uid from response for other endpoints
{
"endpoint": "api/v1/user/posts",
"parameters": { "sec_uid": "MS4wLjABAAAA...", "count": "30" }
}

Getting video_id

Extract video_id from TikTok video URLs:

  • URL format: https://www.tiktok.com/@username/video/VIDEO_ID
  • Example: https://www.tiktok.com/@zg.520/video/7556699581464038664
  • Video ID: 7556699581464038664

Pagination

Most endpoints support pagination using cursor or min_cursor parameters:

// First page
{ "cursor": "0" }
// Next page - use cursor from previous response
{ "cursor": "1234567890" }

🛟 Troubleshooting

Common Issues

Error: "Validation failed"

  • Solution: Check that required parameters are provided for the endpoint
  • Tip: See the detailed endpoint documentation above for required parameters

📞 Support


🔍 SEO Keywords

TikTok scraper, TikTok API, TikTok data extraction, TikTok analytics, TikTok downloader, TikTok user data, TikTok video scraper, TikTok comment scraper, TikTok hashtag tracker, TikTok influencer finder, social media scraping, TikTok automation, TikTok marketing tool, TikTok research tool, Apify Actor


📄 License

Apache-2.0


Star this Actor if you find it useful!

Made with ❤️ for the Apify community