TikTok Top Search
TikTok Top search brings together videos and photo carousels, which are posts made up of multiple images, around a keyword or phrase. Captions, creator identities, media and interaction counts help you compare how the same topic appears across those different content formats.
Features
- Find videos and image posts in one searchThe same keyword query can return video posts and photo carousels, with the type field identifying the format so you can keep both in one dataset or separate them for review.
- Choose the ordering and publication rangeSort matching content by relevance, publication date or likes and add a publication-time filter to focus the returned selection on the kind of content you want to inspect.
- Read the content together with its creator and countersEach result brings the caption, creator information, media links and available interaction counts together, so you can relate a post’s subject and format to the account that published it.
Parameters
| Parameters | Required | Description |
|---|---|---|
query | Required | Required keyword or phrase describing what you want to find, such as coffee or home workout; enter search text rather than a TikTok post URL. |
sort_by | Optional | Optional ordering: relevance puts matching relevance first, date uses publication-date ordering, and likes uses like-count ordering; the default is relevance. |
published_within | Optional | Optional publication-time range: day selects yesterday, week this week, month this month, three_months the last three months, and six_months the last six months; leave it blank to apply no additional publication-time filter. |
region | Optional | Optional two-letter region code, such as US or GB, that changes which content is accessible for the search; it does not prove that returned posts or creators are located in that country. |
results_limit | Optional | Optional maximum number of content records, from 1 to 2000, with a default of 100; videos and photo carousels both count toward this total, and fewer results can be returned. |
How to Use
The request starts a background collection task, so its first response gives you a task ID rather than the finished data; use that ID to check progress and retrieve the results.
- Enter a subject keyword, choose whether relevance, date or likes is most useful, and set a result limit; add a publication range or region only when you need those options.
- Before running the example, replace $SOCQ_API_KEY with your own API key or set that environment variable. Send the JSON input to POST /v1/tiktok/top-search with the Authorization header shown below, then save the task_id from the response.
- Use GET /v1/tasks/{task_id} with the saved ID to check progress. queued means waiting, running means collection is in progress, and retrying means another attempt is underway. Wait for succeeded before reading the results; if the task is failed, read error_message for the reason.
- When the task succeeds, read data.results.items: each item in this list describes one video or photo-carousel post. An empty list means the task completed without returning any records.
- If data.results.has_more is true, the next_cursor value is the marker for another page of saved results. Copy it unchanged into the cursor parameter of GET /v1/tasks/{task_id}?cursor=... and continue until has_more is false.
curl -X POST "https://api.socq.ai/v1/tiktok/top-search" \
-H "Authorization: Bearer $SOCQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"coffee","sort_by":"relevance","results_limit":20}'Best Use Cases
- Build a topic-based content collection: Search a subject such as coffee, then save captions, creator handles, links and content types into a review table containing both video and image-post examples.
- Compare interaction counts across the returned posts: Combine the available likes, comments and shares with each post’s format and publication time to prepare a comparison sheet, keeping the query and filters so you know how the examples were selected.
Pro Tips
- When displaying a result, inspect type and media first: photo_carousel means an image post and should use an image gallery rather than a video player.
- When collecting several keywords, use the post ID to deduplicate repeated matches and keep the keyword associated with each collection so the same post is not counted several times by accident.
- If your workflow only accepts videos, use TikTok Search; if you need both videos and image posts, keep Top Search and handle both formats in your display.
- When a photo result has no duration or playback count, leave that measurement empty instead of interpreting it as a zero-second video or an unviewed post.
Related APIs
Use these APIs when you need a different type of public TikTok data.
- TikTok Profiles API — Retrieve public profile identity, biographies, account flags, and audience counts by username.
- TikTok Hashtags API — Collect public videos, creators, media, sound, and engagement for specified hashtags.
- TikTok Comments API — Collect public top-level comments, authors, engagement, mentions, and creator interaction flags.
- TikTok Videos API — Retrieve creator, caption, media, music, tags, mentions, and engagement from video URLs.
- TikTok Search API — Search public videos by keyword with supported sorting and publication filters.
- TikTok Comment Replies API — Collect public replies for a known comment using its TikTok video URL and comment ID, with authors, engagement, timestamps, and parent context.
- TikTok Followers List API — Collect normalized profiles visible in public follower lists, with retained source context and supported metrics.
- TikTok Following List API — Collect public profiles followed by TikTok accounts with normalized identity, biographies, visible metrics, and source-account context.
- TikTok User Videos API — Collect public profile-feed videos by username with captions, creators, media, timestamps, engagement, and source-account context.
- TikTok Live Room Info API — Look up one known live room by paired room and owner IDs, returning status, owner context, cover media, and audience counts.
- TikTok Trending Feed API — Collect the current public video feed for a region with creator, caption, cover, timestamp, and visible engagement fields.
- TikTok Video Transcript API — Extract available transcript text, language, format, and source context from public video URLs.
- TikTok Search Users API — Search public TikTok accounts by keyword.
- TikTok Song API — Retrieve public sound metadata by clip ID or music URL.
- TikTok Song Videos API — Collect public videos using specified sound IDs.
- TikTok Popular Songs API — Get the TikTok App Top 50 or Viral 50 songs chart, with track names, artists, sound IDs and available video counts.
- TikTok User Live API — Check usernames for live or offline status and available live-room details.