TikTok Search Users API: Find Creators Programmatically
Need to discover TikTok creators in specific niches? The SociaVault TikTok Search Users API lets you find accounts by keyword, username, or name—perfect for building influencer discovery tools, creator databases, and outreach systems.
Quick Start
const response = await fetch(
'https://api.sociavault.com/api/scrape/tiktok/search/users?query=fitness%20coach',
{
headers: {
'x-api-key': 'YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data.users);
API Endpoint
GET https://api.sociavault.com/api/scrape/tiktok/search/users
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query (username, name, or keyword) |
cursor | number | No | Pagination cursor for next page |
trim | boolean | No | Return trimmed response |
Response Fields
Each user object contains:
{
"users": [
{
"id": "6987654321098765432",
"unique_id": "fitness_pro",
"nickname": "Fitness Pro 💪",
"avatar_thumb": "https://...",
"avatar_medium": "https://...",
"avatar_larger": "https://...",
"signature": "Certified PT | 10 years experience | DM for coaching",
"follower_count": 2500000,
"following_count": 150,
"video_count": 847,
"heart_count": 45000000,
"is_verified": true,
"sec_uid": "MS4wLjABAAAA..."
}
],
"cursor": 20,
"has_more": true
}
Use Cases
1. Influencer Discovery by Niche
Find creators in specific niches for marketing campaigns:
async function discoverInfluencers(niche, minFollowers = 10000) {
const API_KEY = process.env.SOCIAVAULT_API_KEY;
const response = await fetch(
`https://api.sociavault.com/api/scrape/tiktok/search/users?query=${encodeURIComponent(niche)}`,
{
headers: { 'x-api-key': API_KEY }
}
);
const data = await response.json();
// Filter by follower count
return data.users.filter(user => user.follower_count >= minFollowers);
}
// Usage
const fitnessCreators = await discoverInfluencers('fitness coach', 50000);
const cookingCreators = await discoverInfluencers('home chef', 25000);
2. Build a Creator Database
Systematically build a database across multiple niches:
const niches = [
'fitness trainer',
'cooking recipes',
'tech reviewer',
'fashion blogger',
'travel vlogger',
'skincare routine',
'personal finance',
'home decor'
];
async function buildCreatorDatabase() {
const allCreators = [];
for (const niche of niches) {
console.log(`Searching: ${niche}`);
let cursor = null;
let hasMore = true;
while (hasMore) {
const url = cursor
? `https://api.sociavault.com/api/scrape/tiktok/search/users?query=${encodeURIComponent(niche)}&cursor=${cursor}`
: `https://api.sociavault.com/api/scrape/tiktok/search/users?query=${encodeURIComponent(niche)}`;
const response = await fetch(url, {
headers: { 'x-api-key': process.env.SOCIAVAULT_API_KEY }
});
const data = await response.json();
// Add niche tag to each creator
const taggedUsers = data.users.map(user => ({
...user,
niche,
discovered_at: new Date().toISOString()
}));
allCreators.push(...taggedUsers);
cursor = data.cursor;
hasMore = data.has_more;
// Rate limiting courtesy delay
await new Promise(r => setTimeout(r, 500));
}
}
return allCreators;
}
3. Competitor Analysis
Find creators similar to a known account:
async function findSimilarCreators(targetUsername) {
// First, get the target's profile to understand their niche
const profileResponse = await fetch(
`https://api.sociavault.com/api/scrape/tiktok/profile?handle=${targetUsername}`,
{
headers: { 'x-api-key': process.env.SOCIAVAULT_API_KEY }
}
);
const profile = await profileResponse.json();
// Extract keywords from their bio
const bioKeywords = profile.data.signature
.split(/[\s|•·,]+/)
.filter(word => word.length > 3);
// Search for creators with similar keywords
const similarCreators = [];
for (const keyword of bioKeywords.slice(0, 5)) {
const searchResponse = await fetch(
`https://api.sociavault.com/api/scrape/tiktok/search/users?query=${encodeURIComponent(keyword)}`,
{
headers: { 'x-api-key': process.env.SOCIAVAULT_API_KEY }
}
);
const data = await searchResponse.json();
similarCreators.push(...data.users);
}
// Deduplicate by user ID
const unique = [...new Map(similarCreators.map(u => [u.id, u])).values()];
return unique.filter(u => u.unique_id !== targetUsername);
}
4. Email Outreach List Builder
Extract contact information from creator bios:
async function buildOutreachList(niche) {
const creators = await discoverInfluencers(niche, 10000);
const emailRegex = /[\w.-]+@[\w.-]+\.\w+/g;
return creators
.map(creator => {
const emails = creator.signature?.match(emailRegex) || [];
return {
username: creator.unique_id,
displayName: creator.nickname,
followers: creator.follower_count,
email: emails[0] || null,
bio: creator.signature,
profileUrl: `https://tiktok.com/@${creator.unique_id}`
};
})
.filter(c => c.email); // Only include creators with emails
}
// Usage
const outreachList = await buildOutreachList('fashion influencer');
console.log(`Found ${outreachList.length} creators with contact info`);
Python Example
import requests
import time
API_KEY = "your_api_key"
BASE_URL = "https://api.sociavault.com/api/scrape/tiktok/search/users"
def search_tiktok_users(query, cursor=None):
params = {"query": query}
if cursor:
params["cursor"] = cursor
response = requests.get(
BASE_URL,
params=params,
headers={"x-api-key": API_KEY}
)
return response.json()
def search_all_pages(query, max_pages=5):
"""Search with pagination"""
all_users = []
cursor = None
for page in range(max_pages):
print(f"Fetching page {page + 1}...")
data = search_tiktok_users(query, cursor)
all_users.extend(data.get("users", []))
if not data.get("has_more"):
break
cursor = data.get("cursor")
time.sleep(0.5) # Courtesy delay
return all_users
# Usage
fitness_creators = search_all_pages("fitness trainer", max_pages=3)
print(f"Found {len(fitness_creators)} fitness creators")
# Filter by follower count
big_accounts = [u for u in fitness_creators if u.get("follower_count", 0) > 100000]
print(f"{len(big_accounts)} have 100k+ followers")
Pagination
The API returns up to 20 users per request. Use the cursor parameter to paginate:
async function getAllResults(query, maxPages = 10) {
const allUsers = [];
let cursor = null;
let page = 0;
while (page < maxPages) {
const url = new URL('https://api.sociavault.com/api/scrape/tiktok/search/users');
url.searchParams.set('query', query);
if (cursor) url.searchParams.set('cursor', cursor);
const response = await fetch(url, {
headers: { 'x-api-key': process.env.SOCIAVAULT_API_KEY }
});
const data = await response.json();
allUsers.push(...data.users);
if (!data.has_more) break;
cursor = data.cursor;
page++;
await new Promise(r => setTimeout(r, 500));
}
return allUsers;
}
Pricing
| Action | Credit Cost |
|---|---|
| Search Users | 1 credit per request |
Each request returns up to 20 users. Searching 100 pages = 100 credits = up to 2,000 users.
Related Endpoints
- TikTok Profile API - Get detailed profile data
- TikTok Followers API - Get a user's followers
- TikTok Search API - Search hashtags and keywords
- TikTok Videos API - Get user's videos
FAQ
How many users are returned per request?
Up to 20 users per request. Use the cursor parameter to paginate through more results.
Can I filter by follower count?
The API returns all matching users. Filter by follower_count client-side after retrieval.
What can I search for?
Search by username, display name, or keywords in the bio. For example:
- "cooking" - finds accounts with cooking in their name/bio
- "fitness_pro" - finds accounts with similar usernames
- "personal trainer LA" - finds trainers mentioning LA
Is there a rate limit?
No rate limits from SociaVault. You can make thousands of requests concurrently.
How fresh is the data?
Data is scraped in real-time when you call the API. No caching.
Ready to build your influencer discovery tool?
Related guides:
Found this helpful?
Share it with others who might benefit
Ready to Try SociaVault?
Start extracting social media data with our powerful API. No credit card required.