How to list TikTok videos by song ID
Pull a paginated list of TikTok videos that use one song ID, with author handles, captions and engagement counts, and cost the calls for a 20-video review
On this page
You have one song ID from a TikTok music URL and need 20 videos that use that sound for a campaign review, with the author behind each one and its engagement numbers. anyapi.tiktok.song_videos takes the song ID and returns a page of videos carrying captions, author handles, plays, likes, comments and shares
The deliverable is a worksheet with one row per video. Nothing in this article has been run, so the tables below describe the shape of that worksheet and the plan behind it, not results
Example input and the worksheet design
The contract supplies one example value for clipId, taken from a TikTok music URL. Treat it as Example and swap in the ID from your own URL
| Input | Example value |
|---|---|
clipId | 7439295283975702544 |
Each returned video becomes one row. These are the ten columns you asked for, named as the output fields name them:
| Column | What it holds |
|---|---|
videoId | the id, and the row key |
description | the caption text |
authorHandle | the creator's handle |
authorName | the creator's display name |
createTime | an integer timestamp for the post |
playCount | plays |
likeCount | likes |
commentCount | comments |
shareCount | shares |
url | the canonical TikTok URL of the video |
Values here are placeholders showing the shape: no call has been made, so no row is filled. The shortlist for outreach comes from sorting those rows by plays and likes and reading the handle and display name off the top of the list
What the tool takes
clipId is the required input and holds the song ID from a TikTok music URL. The contract also documents two optional inputs, cursor and requireFields
cursor is the opaque value from an earlier nextCursor, passed back to continue where the last page stopped. requireFields names output fields the request must be able to return, and nextCursor is the single value it accepts. Omit it and routing is unchanged, with the cheapest source serving
Naming a field can raise your 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, and a combination that no single source returns together is refused as invalid input, with no charge
Reading the output fields that drive the shortlist
found is a boolean and data is an object or null. reason appears only when found is false, and its one value is not_found: the source states the target does not exist or returned nothing for it. That answer is a successful call rather than an error, and costUsd is what it actually cost
When data is populated it holds videos, nextCursor and hasMore. Inside a video record, playCount and likeCount rank the candidates, authorHandle and authorName identify who to contact, createTime tells you how fresh the post is, and url opens the video for the review. Three media fields are signed and short-lived, so their query string is load-bearing and must be kept intact: authorImage, image and videoUrl
Companion guide for the outreach side: https://purrkey.app/blog/research-tiktok-creators
Paging with the cursor
Twenty videos may not arrive in one response, and the contract does not state how many videos a page holds. Plan on several calls and count them as you go
The limit sits in data.nextCursor: it is null when that lane has no more videos, and passing it back as cursor fetches the next page. Stop when nextCursor is null or when the worksheet holds 20 rows, whichever comes first. If the request must be able to return a cursor, name nextCursor in requireFields and accept the possible price change that comes with it
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to list TikTok videos
for one song ID. Check the current inputs and price of
anyapi.tiktok.song_videos before running anything. Call it with the clipId
below, then keep passing data.nextCursor back as cursor until the table
holds 20 videos or nextCursor is null. Return a table with videoId,
description, authorHandle, authorName, createTime, playCount, likeCount,
commentCount, shareCount and url. Report found and reason when a call
returns no data. Do not invent rows and do not fill gaps with guesses.
Example clipId: 7439295283975702544 (Example, replace with your own song ID)Keep the first run to a single page so you can see how many rows it returns before you commit to paging
Estimated tool cost
Agents call it through POST /v1/runs with toolId anyapi.tiktok.song_videos. The price is read through the Purrkey catalog on November 13, 2026, at price revision anyapi-catalog-2026-11-05. The unit is max_call, which the catalog defines as "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| First-page song lookup | calls x max price | $0.0036 per call | 1 | $0.0036 |
| Paginate through five pages | calls x max price | $0.0036 per call | 5 | $0.018 |
Model fees for the agent are not counted. A found: false answer still settles as a call. If one page already yields the 20 videos, the job costs at most $0.0036
Run it on your own song ID
Copy the song ID out of the music URL, replace the Example value in the prompt, and open the tool page at https://purrkey.app/tools/tiktok?q=song_videos
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 list TikTok videos by song ID?
Pass the song ID from a TikTok music URL as clipId to anyapi.tiktok.song_videos. The call returns a page of videos with captions, author handles and engagement counts, and data.nextCursor carries you to the next page.
What inputs does anyapi.tiktok.song_videos take?
clipId is required and holds the song ID from a TikTok music URL. The contract also documents two optional inputs: cursor, which is a nextCursor from an earlier call, and requireFields, which names output fields the request must be able to return.
What does found false mean for a song ID lookup?
found false with reason not_found means the source states the target does not exist or returned nothing for it. It is a successful call rather than an error, and costUsd is what it actually cost.
How do I get the next page of videos for a song?
Read data.nextCursor and pass it back as cursor. nextCursor is null when that lane has no more videos, and data.hasMore is an integer alongside it.
How much does it cost to list videos for one song ID?
The unit is max_call at up to $0.0036 per call. One page is at most $0.0036 and five pages are at most $0.018, and those figures are ceilings rather than settled charges.
Why would I add requireFields to the request?
Naming nextCursor in requireFields means only a source that returns it serves the request, which can raise the price. Naming a combination no single source returns together is refused as invalid input with no charge, so leaving requireFields out keeps the cheapest routing.
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.