How to fetch TikTok ad details by ad ID
Fetch a single TikTok ad's brand, spend, CTR, objectives, landing page, and video details by ad ID
On this page
You have 12 TikTok ad IDs from a competitor campaign and need each ad's brand, objective, cost, CTR, landing page, and video details for a creative-brief review. The deliverable is one table row per ad, with the ad identity, benchmark numbers, creative links and a reason when no data is found. No run has been executed for this guide, so the values below are placeholders showing the shape
The 12-ad table
The agent should return these columns: found, adId, adTitle, brandName, cost, ctr, objective, landingPage, countries, videoUrl, coverUrl, likes, comments, shares, industry, durationSeconds, width, height and reason. The table design below is not a result. Values here are placeholders showing the shape
| Row state | found | adId | adTitle | brandName | cost | ctr | objective | reason |
|---|---|---|---|---|---|---|---|---|
| Example | true | 7648493525660270612 | (ad title) | (brand) | (number) | (number) | (objective) |
Plan for 12 rows, one per submitted ID. A row with found: false keeps the adId and puts not_found in reason; the data fields stay empty. That row still counts as a successful call, not a failed lookup. Keep the row so the batch has a record for each ID you submitted
Input: one ad ID per call
The tool is anyapi.tiktok.ad_library_ad, called through POST /v1/runs with toolId anyapi.tiktok.ad_library_ad. The contract lists adId as required. Its description says the value is a TikTok Top Ads material/ad ID, or a Top Ads detail URL, copied from the ad record you are checking. The Example ad ID for this guide is 7648493525660270612; replace it with each ID from your 12-ad list. The contract's input example is an object with adId; the call count follows the number of IDs you submit
Place the not-found rule next to this lookup step: a found: false answer is a successful call, not an error, and costUsd is what it actually cost. Record the row and move to the next ID rather than retrying it as a failure
How to read the output fields
found tells you whether the provider has a result. When it is true, data holds the ad record. When it is false, data is null and reason is not_found. The contract says a false answer is a successful call, so keep it in the table
Use adTitle, brandName and adId to confirm the row is the ad you meant to check. objective gives the campaign intent for the brief, and landingPage gives the offer page to review. countries lists the two-letter country codes where the ad ran
For the benchmark decision, read cost and ctr next to likes, comments and shares. industry adds the category label when the provider has it. For the creative review, read videoUrl, coverUrl, durationSeconds, width and height. When a row is not usable, reason records why; note which offer to compare next in your own records. Leave the columns in the table even when a row has no value for one of them
For a cross-ad comparison after the table is filled, see compare competitor ads. That companion workflow uses the same table columns
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch TikTok ad details for 12 ad IDs. Check the current inputs and price of anyapi.tiktok.ad_library_ad before running anything. Call the tool once per ad ID. Return a table with found, adId, adTitle, brandName, cost, ctr, objective, landingPage, countries, videoUrl, coverUrl, likes, comments, shares, industry, durationSeconds, width, height and reason. If found is false, put not_found in reason and leave the data fields empty. Do not retry a not_found row as an error. The Example ad ID below shows the format; replace it with your 12 IDs.
Example ad ID: 7648493525660270612Replace the Example ID with your own list before the run. Keep the prompt's table columns as written so the output matches the review table
Estimated tool cost
The listed price is up to $0.0012 per call. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The cost table below uses ceilings. Agent model fees are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single ad lookup | calls x max_call price | $0.0012 per call | 1 | $0.0012 |
| 12-ad benchmark batch | calls x max_call price | $0.0012 per call | 12 | $0.0144 |
A found: false row still comes from a call you planned, so the 12-ad batch total stays at most $0.0144 for 12 submitted IDs. The planned quantity equals the number of ad IDs you submit. The single lookup is the first-row test before the batch
Run one ad first
Open TikTok ad library ad and run the Example ad ID before you submit the full 12-ad batch
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 fetch TikTok ad details by ad ID?
Pass the TikTok Top Ads material/ad ID or a Top Ads detail URL as adId to the TikTok ad library tool. The output has found and data, or found false with reason not found.
What input does the TikTok ad lookup take?
It takes adId as a required input. The value can be a TikTok Top Ads material/ad ID or a Top Ads detail URL copied from the ad record.
What does found false mean for a TikTok ad lookup?
It means the source returned no result for that adId and the reason is not found. The contract says a found false answer is a successful call, not an error, and costUsd is what it actually cost.
Which output fields feed a creative brief?
adTitle, brandName, objective, landingPage, videoUrl, coverUrl, durationSeconds, width and height are the brief fields. cost, ctr, likes, comments and shares are the benchmark fields.
How much does it cost to fetch 12 TikTok ads?
At the listed price of $0.0012 per call, 12 calls are at most $0.0144. A single lookup is at most $0.0012.
Can I pass a detail URL instead of a numeric ad ID?
Yes. The contract says adId can be a TikTok Top Ads material/ad ID or a Top Ads detail URL.
What happens when a TikTok ad ID has no data?
The tool returns found false with reason not found. Keep the row, put not found in reason, and move to the next ad ID.
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.