Extract TikTok profile data (username, follower count, following count, video count, bio, verification status) via Scavio API at $0.005/request. No scraping, no browser automation, one API call per profile.
Prerequisites
- Scavio API key from scavio.dev
- Python 3.8+ or Node.js 18+
- requests library (Python) or fetch (Node.js)
Walkthrough
Step 1: Get your API key
Sign up at scavio.dev for 250 free credits/month. Copy your API key from the dashboard.
# Set your API key as environment variable
export SCAVIO_API_KEY=your_key_hereStep 2: Look up a profile by username
Call the TikTok profile endpoint with the target username.
import requests, os
resp = requests.post('https://api.scavio.dev/api/v1/tiktok/profile',
headers={'Authorization': f'Bearer {os.environ["SCAVIO_API_KEY"]}',
'Content-Type': 'application/json'},
json={'username': 'charlidamelio'})
profile = resp.json()['data']['user']
print(f"Followers: {profile['follower_count']:,}")
print(f"Videos: {profile['aweme_count']}")
print(f"Verified: {profile.get('verified', False)}")Step 3: Extract the sec_uid for further API calls
The sec_uid from the profile response is required for followers, followings, and posts endpoints.
sec_uid = profile['sec_uid']
print(f'sec_uid: {sec_uid}')
# Use this for /api/v1/tiktok/user/posts,
# /api/v1/tiktok/user/followers, etc.Python Example
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
HEADERS = {'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json'}
def get_profile(username):
resp = requests.post('https://api.scavio.dev/api/v1/tiktok/profile',
headers=HEADERS, json={'username': username})
data = resp.json()['data']['user']
return {
'username': data['unique_id'],
'nickname': data['nickname'],
'followers': data['follower_count'],
'following': data['following_count'],
'videos': data['aweme_count'],
'likes': data['total_favorited'],
'verified': data.get('verified', False),
'sec_uid': data['sec_uid'],
}
profile = get_profile('charlidamelio')
for k, v in profile.items():
print(f'{k}: {v}')JavaScript Example
const H = {'Authorization': `Bearer ${process.env.SCAVIO_API_KEY}`, 'Content-Type': 'application/json'};
async function getProfile(username) {
const r = await fetch('https://api.scavio.dev/api/v1/tiktok/profile', {
method: 'POST', headers: H,
body: JSON.stringify({username})
}).then(r => r.json());
const u = r.data.user;
return {username: u.unique_id, followers: u.follower_count,
videos: u.aweme_count, sec_uid: u.sec_uid};
}
getProfile('charlidamelio').then(p => console.log(p));Expected Output
Profile data including follower count, video count, verification status, and sec_uid for use in subsequent API calls.