How to search TikTok top results by keyword
Run a TikTok keyword search and return top videos with captions, authors, views, likes, comments, shares, and a next-page cursor for a shortlist
On this page
You need 30 TikTok videos for the keyword "morning routine" in a chosen region, with captions, authors, views, likes, comments and shares, before pitching a weekly content angle. The deliverable is a shortlist table that a creative team can scan. No run has been executed for this guide, so the table below is a design, not a result
Task and the shortlist table
The table has one row per video and these columns: id, caption, author, views, likes, comments, shares, soundTitle, url, and a short shortlist note for the content angle. Values here are placeholders showing the shape
| id | caption | author | views | likes | comments | shares | soundTitle | url | shortlist note |
|---|---|---|---|---|---|---|---|---|---|
| (video id) | (caption text) | (author handle) | 0 | 0 | 0 | 0 | (sound title or empty) | (video URL) | (content angle) |
Keep the note short. A useful note names the routine, the creator type and the sound cue that fits the weekly angle. Leave soundTitle empty when the response gives null
Input the search takes
Example request, with invented values: query: "morning routine"; region: "US"; publishTime: "this-month"; sortBy: "relevance". Replace the region and time frame with the ones for your brief
query is required. region takes a 2-letter country code. publishTime takes a time-frame value from the contract. sortBy takes relevance, most-liked, or date-posted. The contract also lists compatibility aliases for publishTime and sortBy. cursor is copied from a previous response's nextCursor
Use requireFields only when a named output field such as soundClipId must be present. It can raise the price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a record that genuinely lacks it. A combination that no single source returns together is refused as invalid input, with no charge. That price effect belongs with this input step, before you run the call
The tool id is anyapi.tiktok.search_top, and the Agents call it through POST /v1/runs with toolId anyapi.tiktok.search_top
Reading the output fields that drive a decision
The response has found and data. When data is present, data.items holds records and data.nextCursor is the opaque cursor for the next page or null. Pass that cursor back as cursor to continue
Each record gives id, caption, author, views, likes, comments, shares, url, and soundTitle. Use views, likes, comments and shares to compare engagement. Use soundTitle for the sound cue, url for the source link, and id as the record key. soundTitle is null when the serving source does not report it
A found: false response with reason: not_found means the source returned no result for the target. The contract says that answer is a successful call, not an error
Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to search TikTok
top results for the keyword "morning routine" in region US for this-month,
sorted by relevance. Check the current inputs and price of
anyapi.tiktok.search_top before running anything. Call once for the first
page. If the first page has a nextCursor and the shortlist needs more,
follow nextCursor up to three pages total. Return a table with id, caption,
author, views, likes, comments, shares, soundTitle, url and shortlist note.
Keep the note to a short content angle. Do not invent missing values.
Leave soundTitle empty when it is null. Do not claim the rows show a trend.Replace the query, region, time frame and sort order with the values for your brief. The prompt asks for a table, not a written report. A first run of one page is enough to see the captions and engagement fields before you spend calls on a sweep
Estimated tool cost
The catalog lists anyapi.tiktok.search_top at up to $0.0036 per call, read through the Purrkey catalog on November 13, 2026. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings, not settled charges. Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| One-page keyword preview | calls x max price | $0.0036 per call | 1 | $0.0036 |
| Three-page keyword sweep | calls x max price | $0.0036 per call | 3 | $0.0108 |
The brief targets 30 videos. The plan above counts calls, not rows. Start with the one-page preview. If the first page gives enough captions, creators and sound cues, stop there
Start with the one-page preview
Run the first page for "morning routine" in your chosen region, then read the table before you extend with cursor. The tool page is Search TikTok top results
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with TikTok.FAQ
How do I search TikTok top results by keyword?
Call anyapi.tiktok.search_top with query set to the keyword. The response returns data.items with caption, author, views, likes, comments, shares and data.nextCursor for the next page.
What inputs does anyapi.tiktok.search_top take?
The contract names query as required, plus optional region, publishTime, sortBy, cursor and requireFields. region takes a 2-letter country code and sortBy takes relevance, most-liked or date-posted.
How do I paginate TikTok keyword search results?
Read data.nextCursor from a response and pass it back as cursor in the next call. A null nextCursor means that lane has no more results.
What does requireFields do?
It names output fields that a request must be able to return, such as soundClipId. It can raise the price when a dearer source serves, and a combination no single source returns together is refused as invalid input, with no charge.
How much does a TikTok keyword search cost?
The catalog lists anyapi.tiktok.search_top at up to $0.0036 per call. A one-page preview is at most $0.0036, and a three-page sweep is at most $0.0108; successful runs settle at the actual AnyAPI charge.
What does found: false mean?
It means the source returned no result for the target, with reason set to not_found. The contract says a found: false answer is a successful call, not an error.
Why can soundTitle be empty?
soundTitle is null when the serving source does not report it. Name it in requireFields when a request must be able to return that field.
Next step
Try this with TikTok
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.