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/v1/scrape/tiktok/search/users?query=fitness%20coach', {
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const result = await response.json();
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query for users |
cursor | integer | No | Pagination cursor from previous response |
trim | boolean | No | Set to true for a trimmed response |
Sample Response
Note: Results are returned as objects with numeric keys (
"0","1", etc.), not arrays. UseObject.values()to iterate.
{
"success": true,
"data": {
"user_list": {
"0": {
"user_info": {
"unique_id": "taylorswift",
"nickname": "Taylor Swift",
"uid": "6881290705605477381",
"sec_uid": "MS4wLjABAAAAqB08cUbX...",
"signature": "",
"follower_count": 33302213,
"following_count": 0,
"total_favorited": 267837265,
"aweme_count": 81,
"custom_verify": "Verified account",
"search_user_desc": "Taylor Swift",
"search_user_name": "taylorswift"
}
}
},
"cursor": 30,
"has_more": 1
},
"credits_used": 1
}
Use Case: Influencer Discovery
Build an influencer database by searching niches:
const niches = ['fitness', 'cooking', 'tech', 'fashion', 'travel'];
for (const niche of niches) {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/search/users?query=${encodeURIComponent(niche + ' creator')}&trim=true`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const result = await res.json();
const users = Object.values(result.data.user_list || result.data.users || {});
for (const entry of users) {
const user = entry.user_info || entry;
console.log(`${user.unique_id}: ${user.follower_count} followers`);
}
}
Search Hashtag API
Get videos using a specific hashtag:
const response = await fetch('https://api.sociavault.com/v1/scrape/tiktok/search/hashtag?hashtag=smallbusiness', {
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const result = await response.json();
| Parameter | Type | Required | Description |
|---|---|---|---|
hashtag | string | Yes | Hashtag to search (without #) |
region | string | No | 2-letter country code for proxy region |
cursor | integer | No | Pagination cursor from previous response |
trim | boolean | No | Set to true for a trimmed response |
Sample Response
{
"success": true,
"data": {
"aweme_list": {
"0": {
"aweme_id": "7234567890123456789",
"desc": "Day in my life as a small business owner #smallbusiness",
"create_time": 1706100000,
"statistics": {
"play_count": 5200000,
"digg_count": 890000,
"comment_count": 12400,
"share_count": 45000,
"collect_count": 67000,
"download_count": 3200
},
"author": {
"unique_id": "shop_owner",
"nickname": "Shop Owner"
},
"video": {
"duration": 15000,
"cover": { "url_list": { "0": "https://..." } }
},
"music": {
"title": "original sound",
"author": "shop_owner"
}
}
},
"cursor": 20,
"has_more": 1
}
}
Use Case: Trend Monitoring
Track hashtag performance over time:
const trackHashtags = ['fyp', 'viral', 'trending'];
for (const tag of trackHashtags) {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/search/hashtag?hashtag=${tag}&trim=true`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const result = await res.json();
const videos = Object.values(result.data.aweme_list);
const totalViews = videos.reduce((sum, v) => sum + v.statistics.play_count, 0);
console.log(`#${tag}: ${videos.length} videos, ${totalViews.toLocaleString()} total views`);
}
Search Keyword API
Search video content by keyword — with powerful filtering options:
const response = await fetch('https://api.sociavault.com/v1/scrape/tiktok/search/keyword?query=product%20review%20iphone&sort_by=most-liked&date_posted=this-week', {
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Keyword to search for |
date_posted | string | No | Time frame: yesterday, this-week, this-month, last-3-months, last-6-months, all-time |
sort_by | string | No | Sort order: relevance, most-liked, date-posted |
region | string | No | 2-letter country code for proxy region |
cursor | integer | No | Pagination cursor from previous response |
trim | boolean | No | Set to true for a trimmed response |
Use Case: Brand Monitoring
Find mentions of your brand or products:
const res = await fetch('https://api.sociavault.com/v1/scrape/tiktok/search/keyword?query=your-brand-name&date_posted=this-week&sort_by=date-posted', {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const result = await res.json();
const videos = Object.values(result.data.aweme_list);
console.log(`${videos.length} brand mentions found this week`);
for (const v of videos) {
console.log(`@${v.author.unique_id}: ${v.statistics.play_count} views — "${v.desc.slice(0, 80)}"`);
}
Search Top API
Get top-ranked results combining videos and photo carousels:
const response = await fetch('https://api.sociavault.com/v1/scrape/tiktok/search/top?query=cooking%20tutorial&sort_by=most-liked', {
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Keyword to search for |
publish_time | string | No | Time frame: yesterday, this-week, this-month, last-3-months, last-6-months, all-time |
sort_by | string | No | Sort order: relevance, most-liked, date-posted |
region | string | No | 2-letter country code for proxy region |
cursor | integer | No | Pagination cursor from previous response |
Tip: Top Search returns both videos and photo carousels. Check
content_typeto distinguish them ("video"or"photo").
Building a Discovery Tool
Combine search endpoints for powerful discovery:
async function discoverCreators(niche) {
const headers = { 'x-api-key': 'YOUR_API_KEY' };
// Find users in niche
const usersRes = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/search/users?query=${encodeURIComponent(niche)}&trim=true`, { headers });
const usersResult = await usersRes.json();
const users = Object.values(usersResult.data.user_list || usersResult.data.users || {});
// Find trending content in niche
const hashtagRes = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/search/hashtag?hashtag=${encodeURIComponent(niche)}&trim=true`, { headers });
const hashtagResult = await hashtagRes.json();
const videos = Object.values(hashtagResult.data.aweme_list);
// Extract unique creators from trending videos
const trendingCreators = [...new Set(
videos.map(v => v.author.unique_id)
)];
// Combine and deduplicate
const searchedCreators = users.map(u => (u.user_info || u).unique_id);
const allCreators = [...new Set([...searchedCreators, ...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?
They change from one call to the next. In our test, back-to-back keyword searches a few minutes apart shared about half their videos. We measured how much TikTok search results change between calls, with a way to sample around it.
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.