Tutorial

How to Get TikTok Followers List via API

Extract TikTok follower lists with profile data using Scavio API. Python and JavaScript examples with page_token pagination.

Extract a TikTok user's follower list via Scavio API at $0.005/page of 20 followers. Each follower includes username, follower count, video count, and sec_uid. Uses page_token+min_time pagination unique to social graph endpoints.

Prerequisites

  • Scavio API key
  • Target user's sec_uid
  • Python 3.8+ or Node.js 18+

Walkthrough

Step 1: Get sec_uid from profile

Look up the target user's sec_uid first.

Python
import requests, os

HEADERS = {'Authorization': f'Bearer {os.environ["SCAVIO_API_KEY"]}',
           'Content-Type': 'application/json'}

profile = requests.post('https://api.scavio.dev/api/v1/tiktok/profile',
    headers=HEADERS, json={'username': 'target_user'}).json()
sec_uid = profile['data']['user']['sec_uid']

Step 2: Fetch followers

Call the followers endpoint with page_token pagination.

Python
resp = requests.post('https://api.scavio.dev/api/v1/tiktok/user/followers',
    headers=HEADERS,
    json={'sec_user_id': sec_uid, 'count': 20})

data = resp.json()['data']
for f in data.get('followers', []):
    print(f"@{f['unique_id']}: {f['follower_count']:,} followers")

Step 3: Paginate with page_token + min_time

Both page_token and min_time are required for subsequent pages.

Python
if data.get('has_more'):
    page2 = requests.post(
        'https://api.scavio.dev/api/v1/tiktok/user/followers',
        headers=HEADERS,
        json={'sec_user_id': sec_uid, 'count': 20,
              'page_token': data['next_page_token'],
              'min_time': data['min_time']}).json()['data']
    print(f'Page 2: {len(page2.get("followers", []))} followers')

Python Example

Python
import requests, os

HEADERS = {'Authorization': f'Bearer {os.environ["SCAVIO_API_KEY"]}',
           'Content-Type': 'application/json'}

def get_followers(sec_uid, max_pages=10):
    followers = []
    params = {'sec_user_id': sec_uid, 'count': 20}
    for _ in range(max_pages):
        data = requests.post('https://api.scavio.dev/api/v1/tiktok/user/followers',
            headers=HEADERS, json=params).json()['data']
        followers.extend(data.get('followers', []))
        if not data.get('has_more'):
            break
        params['page_token'] = data['next_page_token']
        params['min_time'] = data['min_time']
    return followers

# Get sec_uid first
profile = requests.post('https://api.scavio.dev/api/v1/tiktok/profile',
    headers=HEADERS, json={'username': 'target_user'}).json()
followers = get_followers(profile['data']['user']['sec_uid'])
print(f'{len(followers)} followers sampled')

JavaScript Example

JavaScript
const H = {'Authorization': `Bearer ${process.env.SCAVIO_API_KEY}`, 'Content-Type': 'application/json'};
async function getFollowers(secUid, maxPages = 10) {
  const followers = [];
  let params = {sec_user_id: secUid, count: 20};
  for (let i = 0; i < maxPages; i++) {
    const r = await fetch('https://api.scavio.dev/api/v1/tiktok/user/followers', {
      method: 'POST', headers: H, body: JSON.stringify(params)
    }).then(r => r.json());
    followers.push(...(r.data.followers || []));
    if (!r.data.has_more) break;
    params.page_token = r.data.next_page_token;
    params.min_time = r.data.min_time;
  }
  return followers;
}
// Usage: getFollowers(secUid).then(f => console.log(`${f.length} followers`));

Expected Output

JSON
Array of follower objects with username, follower count, video count, and sec_uid for each follower.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Scavio API key. Target user's sec_uid. Python 3.8+ or Node.js 18+. A Scavio API key gives you 250 free credits per month.

Yes. The free tier includes 250 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Extract TikTok follower lists with profile data using Scavio API. Python and JavaScript examples with page_token pagination.