TikTok Search API: Build Powerful Discovery Applications
Need to search TikTok programmatically? The SociaVault Search API lets you find users, hashtags, videos, and trending content—all through simple REST endpoints.
Search Capabilities
SociaVault offers four TikTok search endpoints:
| Endpoint | Description | Use Case |
|---|---|---|
| Search Users | Find accounts by username/name | Influencer discovery |
| Search Hashtag | Get videos using a hashtag | Trend analysis |
| Search Keyword | Search video content | Content research |
| Search Top | Get top results for any query | General discovery |
Search Users API
Find TikTok accounts matching a query:
const response = await fetch('https://api.sociavault.com/tiktok/search/users', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: 'fitness coach'
})
});
const users = await response.json();
Sample Response
{
"users": [
{
"userId": "6987654321",
"username": "fitness_pro",
"displayName": "Fitness Pro",
"followers": 2500000,
"verified": true,
"bio": "Certified personal trainer đŸ’ª",
"profilePicture": "https://..."
}
]
}
Use Case: Influencer Discovery
Build an influencer database by searching niches:
const niches = ['fitness', 'cooking', 'tech', 'fashion', 'travel'];
for (const niche of niches) {
const users = await searchUsers(`${niche} creator`);
await saveToDatabase(niche, users);
}
Search Hashtag API
Get videos using a specific hashtag:
const response = await fetch('https://api.sociavault.com/tiktok/search/hashtag', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
hashtag: 'smallbusiness'
})
});
const videos = await response.json();
Sample Response
{
"hashtag": "smallbusiness",
"totalViews": 45000000000,
"videos": [
{
"id": "7234567890123456789",
"caption": "Day in my life as a small business owner #smallbusiness",
"views": 5200000,
"likes": 890000,
"author": {
"username": "shop_owner",
"followers": 150000
}
}
]
}
Use Case: Trend Monitoring
Track hashtag performance over time:
const trackHashtags = ['fyp', 'viral', 'trending'];
for (const tag of trackHashtags) {
const data = await searchHashtag(tag);
await logMetrics({
hashtag: tag,
totalViews: data.totalViews,
topVideoViews: data.videos[0]?.views,
timestamp: new Date()
});
}
Search Keyword API
Search video content by keyword:
const response = await fetch('https://api.sociavault.com/tiktok/search/keyword', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: 'product review iphone'
})
});
Use Case: Brand Monitoring
Find mentions of your brand or products:
const brandMentions = await searchKeyword('your-brand-name');
const recentMentions = brandMentions.videos.filter(v =>
new Date(v.createTime) > new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
);
console.log(`${recentMentions.length} mentions in the last 7 days`);
Search Top API
Get top-ranked results combining users and videos:
const response = await fetch('https://api.sociavault.com/tiktok/search/top', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: 'cooking tutorial'
})
});
Building a Discovery Tool
Combine search endpoints for powerful discovery:
async function discoverCreators(niche) {
// Find users in niche
const users = await searchUsers(niche);
// Find trending content in niche
const trendingVideos = await searchHashtag(niche);
// Extract unique creators from trending videos
const trendingCreators = [...new Set(
trendingVideos.videos.map(v => v.author.username)
)];
// Combine and deduplicate
const allCreators = [...new Set([
...users.map(u => u.username),
...trendingCreators
])];
return allCreators;
}
Related TikTok Endpoints
- TikTok Profile Scraper - Get creator details
- TikTok Trending - Discover trending videos
- TikTok Videos Scraper - Extract all videos
- TikTok Music API - Search by audio
Frequently Asked Questions
How many results can I get per search?
Each search returns up to 30 results per request. Use pagination to retrieve more results.
Can I filter search results by location?
Currently, search results are global. You can filter results client-side based on creator profiles.
How fresh are search results?
Search results reflect TikTok's current index, typically updated within minutes of content posting.
Can I search for videos from a specific time range?
The API returns results by TikTok's relevance ranking. Filter by createTime client-side for time-based queries.
Is there a search API for sounds/music?
Yes! Use the TikTok Music Search endpoint to find trending sounds and songs.
Start Building
Create your free account and start searching TikTok programmatically.
API documentation: /docs/api-reference/tiktok/search-users
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.