TikTok Video Search API for Content Research
Search TikTok videos by keyword via API. Research content gaps, analyze trending formats, and identify viral patterns in any niche.
Scavio TikTok video search returns up to 30 results per page with full statistics (views, likes, comments, shares, bookmarks) at 1 credit per request. Filter by recency and sort by relevance or most-liked to find content gaps and trending formats in any niche.
Search Parameters
The /api/v1/tiktok/search/videos endpoint accepts a keyword, optional pagination cursor, count (1-30), sort type (relevance or most-liked), and publish time filter (last day, week, month, 3 months, 6 months, or all time). This lets you narrow results to recent trending content rather than all-time hits.
Finding Content Gaps
import requests, os
from collections import Counter
API_KEY = os.environ["SCAVIO_API_KEY"]
BASE = "https://api.scavio.dev"
HEADERS = {"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"}
def search_videos(keyword, pages=3, publish_time="30"):
all_videos = []
cursor = "0"
for _ in range(pages):
resp = requests.post(f"{BASE}/api/v1/tiktok/search/videos",
headers=HEADERS,
json={"keyword": keyword, "cursor": cursor,
"count": 30, "publish_time": publish_time})
data = resp.json()["data"]
for v in data.get("aweme_list", []):
hashtags = [h["hashtag_name"]
for h in v.get("cha_list", []) if h.get("hashtag_name")]
all_videos.append({
"desc": v["desc"][:100],
"views": v["statistics"]["play_count"],
"likes": v["statistics"]["digg_count"],
"comments": v["statistics"]["comment_count"],
"author": v["author"]["unique_id"],
"hashtags": hashtags,
})
if not data.get("has_more"):
break
cursor = str(data["cursor"])
return all_videos
videos = search_videos("home office setup")
print(f"Found {len(videos)} videos")Analyzing Trending Formats
def analyze_content(videos):
# Top hashtags used alongside the keyword
hashtag_counts = Counter()
for v in videos:
hashtag_counts.update(v["hashtags"])
# Engagement distribution
high_performers = [v for v in videos if v["views"] > 100000]
avg_views = sum(v["views"] for v in videos) / len(videos) if videos else 0
avg_likes = sum(v["likes"] for v in videos) / len(videos) if videos else 0
return {
"total_videos": len(videos),
"avg_views": int(avg_views),
"avg_likes": int(avg_likes),
"high_performers": len(high_performers),
"top_hashtags": hashtag_counts.most_common(10),
"top_creators": Counter(v["author"]
for v in videos).most_common(5),
}
analysis = analyze_content(videos)
print(f"Avg views: {analysis['avg_views']:,}")
print(f"High performers (>100K): {analysis['high_performers']}")
print("Top hashtags:", [h[0] for h in analysis["top_hashtags"][:5]])Comparing Niches
niches = ["home office setup", "standing desk review",
"desk organization", "work from home tips"]
for niche in niches:
vids = search_videos(niche, pages=2, publish_time="7")
if not vids:
print(f"{niche}: no recent results")
continue
avg = sum(v["views"] for v in vids) / len(vids)
top = max(v["views"] for v in vids)
print(f"{niche}: {len(vids)} videos, avg {avg:,.0f} views, "
f"top {top:,} views")When to Use Video Search vs Hashtag Browse
Use video search when you want to find content around a topic that may use different hashtags. Use hashtag videos when you want to monitor a specific hashtag feed. Video search casts a wider net; hashtag browse gives you everything under one tag. For content research, start with video search to discover which hashtags perform well, then track those hashtags individually.
Cost
Researching 10 niche keywords at 3 pages each costs $0.15. Running this weekly for a content calendar costs $0.60/month. Add detailed video lookups for the top 50 performers and you are still under $1/month for comprehensive TikTok content research.