Skip to content
ShortVid API
Search & Discovery Guide7 min read·Updated 2026-10-29

TikTok Search API Guide: Search Videos, Creators & Commercial Ads by Keyword

Build real-time trend discovery, social listening, influencer outreach, and ad intelligence pipelines with keyword search across TikTok videos, creators, hashtags, and Creative Center ads.

$0.20 / 1K Videos · $0.10 / 1K Comments & Followers · No OAuth Needed

Instant Quickstart · Copy & Run in 30 Seconds

Search TikTok Videos by Keyword, Region & Time Window (GET /v1/videos/search)

Execute in Live Playground →
import requests

API_KEY = "tk_your_api_key_here"

def search_tiktok_videos(query: str, region: str = "US", max_pages: int = 3):
    cursor = 0
    collected = []
    for page in range(max_pages):
        res = requests.get(
            "https://api.shortvidapi.com/v1/videos/search",
            params={
                "query": query,
                "limit": 30,
                "cursor": cursor,
                "region": region,
                "publish_time": 0,  # 0=All, 1=Yesterday, 7=7d, 30=30d, 90=90d, 180=180d
                "sort_by": 0,       # 0=Relevance, 1=Most Liked, 3=Newest
            },
            headers={"x-api-key": API_KEY},
            timeout=20,
        )
        res.raise_for_status()
        body = res.json()
        if body["code"] != 0:
            break

        data = body["data"]
        videos = data.get("videos", [])
        collected.extend(videos)

        if not data.get("hasMore") or not videos:
            break
        cursor = data.get("cursor", 0)
    return collected

videos = search_tiktok_videos("ai tools", region="US", max_pages=2)
print(f"Fetched {len(videos)} videos. Top result: {videos[0]['title'][:70]}")

Key Engineering Takeaways (TL;DR)

  • ✓Use GET /v1/videos/search (or /v1/video/search) to search public videos by keyword with filters for region (US, GB, JP, DE, etc.), publish_time (yesterday, 7d, 30d, 90d, 180d), and sort_by (Relevance, Most Liked, Newest).
  • ✓Every video item returned in search results already includes direct no-watermark MP4 playback links (play) and full engagement counters — no second N+1 lookup required.
  • ✓Use GET /v1/users/search to discover creators filtered by follower count tier (follower_tier) and verification badge (verified_only).
  • ✓Use GET /v1/ads/search to query TikTok Creative Center top-performing commercial ads by keyword, country, time period, and ranking metric (impression, ctr, like).

1. Choosing the Right TikTok Search Endpoint

ShortVid API provides four specialized search endpoints depending on whether you are discovering organic videos, creators, hashtags, or paid commercial creatives:

Comparison of the 4 search endpoints on ShortVid API
Search TargetEndpointFilter ParametersMax Page SizeCredit Cost
Organic Videos by KeywordGET /v1/videos/searchquery (or keywords), region, publish_time (0/1/7/30/90/180), sort_by (0=Relevance, 1=Likes, 3=Newest)30 videos / call2 Credits / video (min 10)
Creator AccountsGET /v1/users/searchquery (or keywords), follower_tier (0–4), verified_only (0/1)30 users / call1 Credit / user (min 10)
Hashtag ChallengesGET /v1/hashtags/info + /v1/hashtags/videoshashtag (e.g. skincare) -> hashtag_id30 videos / call2 Credits / video (min 10)
Commercial Ads (Creative Center)GET /v1/ads/searchkeyword, country_code (US, GB, etc.), period (7/30/180), sort_by (impression/ctr/like)20 ads / call10 Credits / ad (min 10)

2. Paginated Keyword Video Search (Python & TypeScript)

When paginating through search results, pass cursor=0 on the first request, then read data.cursor and data.hasMore from each response. Our gateway includes built-in stuck-cursor protection that automatically sets hasMore: false if upstream repeats a cursor.

Search TikTok Videos by Keyword, Region & Time Window (GET /v1/videos/search)

Search US TikTok videos matching 'ai tools' published in the past 7 days, sorted by relevance, with safe multi-page cursor pagination.

curl -sS "https://api.shortvidapi.com/v1/videos/search?query=ai+tools&limit=20&cursor=0&region=US&publish_time=7&sort_by=0" \
  -H "x-api-key: tk_your_api_key_here"

3. Filter Parameter Reference (publish_time, sort_by, follower_tier)

Use these exact integer codes to filter video search and creator search results at the API level:

Valid filter enum values for /v1/videos/search and /v1/users/search
EndpointParameterAllowed ValuesMeaning
/v1/videos/searchpublish_time0, 1, 7, 30, 90, 1800 = All time, 1 = Yesterday, 7 = Past 7 days, 30 = Past 30 days, 90 = Past 3 months, 180 = Past 6 months
/v1/videos/searchsort_by (or sort_type)0, 1, 30 = Relevance, 1 = Most Liked (digg_count), 3 = Newest first
/v1/videos/searchregionISO 3166-1 alpha-2US, GB, CA, DE, FR, JP, KR, BR, MX, ID, VN, etc.
/v1/users/searchfollower_tier (or follower_count)0, 1, 2, 3, 40 = Any, 1 = 0–1K, 2 = 1K–10K, 3 = 10K–100K, 4 = 100K+ followers
/v1/users/searchverified_only (or profile_type)0, 10 = All accounts, 1 = Verified blue-check accounts only

Interactive Engineering Workbench · GET /v1/video/search

Verify real-time latency, pagination math & JSON schema

5,000 videos/day
10,000 comments/day
20,000 followers/day
Our HTTP Calls/Day
452
Large page sizes
Legacy Provider Calls
1,334
30-item small pages
Official Research API
Within 1K Cap
1,000 req/day limit
Estimated Monthly Pipeline Cost (30 Days)
$72.73/ mo with Business bonus ($120.00 base rate)
Daily consumption: 40,000 Credits ($4.00/day)
ShortVid API (with volume bonus):$72.73 / mo
Legacy Scrapers ($1.50 / 1K calls):$60.03 / mo
Failed / 404 request fee:$0.00 (0 Credits)

Frequently Asked Questions

Does /v1/videos/search return no-watermark video download URLs directly inside the search list?
Yes. Every item in data.videos[] includes data.videos[i].play (direct no-watermark MP4 stream) plus play_count, digg_count, comment_count, share_count, author, and music_info. You do not need to call /v1/videos/detail for each search result unless you specifically need the 1080p hdplay stream.
How is credit billing calculated on /v1/videos/search?
Video search is billed per item returned: 2 Credits per video ($0.20 per 1,000 videos at base rate, or $0.08 per 1,000 videos on Business Monthly), with a 10-Credit minimum per successful call.
Can I pass either query or keywords as the search parameter?
Yes. Our gateway accepts both query=... (standardized V1 style) and keywords=... (legacy style), as well as both limit=... and count=....

More engineering guides

View all guides →

Architecture Guide · 2026

Unofficial TikTok API vs Official TikTok API: Complete 2026 Developer Guide

8 min read →

Video Parser Guide · 1080p HD

How to Get TikTok Video Metadata & 1080p No-Watermark MP4 via API

6 min read →

Pricing & Cost Analysis · 2026

TikAPI Pricing Breakdown (2026): Real Cost per 1,000 Videos & Pay-As-You-Go Comparison

6 min read →

Troubleshooting · HTTP Error 403 & WAF Fix

Fix TikTok HTTP Error 403 ("Access to www.tiktok.com Was Denied") — Working Python & API Bypass

8 min read →

Ad Intelligence Tutorial

TikTok Ads Library & Creative Center API: Scrape Winning Ads, CTR & Keywords

8 min read →

Social Listening Tutorial

TikTok Comments & Replies Scraper API: Extract Threads at $0.10/1K

7 min read →

Creator & Follower Graph Guide

TikTok Profile & Followers Scraper API: Fetch User Data, Videos & 200-Item Follower Lists

8 min read →

Analytics & Python SDK · 2026

TikTok Analytics API & Python Guide: Creator Engagement, Video Velocity & Studio Metrics

8 min read →

Creator Discovery · 2026

TikTok Influencer Search API: Find Creators by Niche & Follower Tier

8 min read →

Lead Generation · 2026

How to Extract Creator Emails & Bio Leads from TikTok via API (Python & Node.js)

7 min read →

Trend Intelligence · 2026

TikTok Hashtag, Sound & Viral Trends API: Track Breakout Topics in Real Time

8 min read →

No-Code & AI Workflows · 2026

n8n & Make.com TikTok API Integration: Automate Video & Creator Workflows

7 min read →

E-Commerce & Affiliates · 2026

TikTok Shop Affiliate & E-Commerce Product Intelligence via API

8 min read →

Official API Architecture · 2026

TikTok Research API: Academic Eligibility, 1,000/Day Quota & Commercial REST Endpoints

8 min read →

OAuth & Scopes Reference · 2026

TikTok Display API: OAuth 2.0 Scopes, Limitations & How to Fetch Public Profiles

6 min read →

Python SDK & Asyncio Hub · 2026

Python TikTok API Tutorial (2026): requests, asyncio & Why Playwright Libraries Break

9 min read →

Scraper Architecture · $0.20/1K Videos

TikTok Scraper API: Extract Public Videos, Profiles, Comments & Ads at Scale

8 min read →