How to Use TikTok ad search in Codex
Returns Creative Center ad examples with descriptions, advertiser names, landing pages, and engagement counts. Use it to research product messaging and creative references alongside TikTok's hashtag trends.
Prompts to try with TikTok ad search in Codex
Copy an example into Codex, or ask in your own words.
Use TikTok ad search for 'cat toy' over the past 30 days. Create a research table in this project with advertiser names, ad descriptions, landing pages, and engagement counts.
Use TikTok ad search for 'running shoes' over the past 180 days. Add the returned descriptions and advertiser names to a campaign reference page, then draft three original messaging tests.
Use TikTok ad search to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from TikTok ad search and tell me what changed since last week.
Check TikTok ad search and summarize what you find in three bullet points.
How to set up TikTok ad search in Codex
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
codex mcp add spiral --url https://api.spiral.ai/mcp
- Sign in
Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.
codex mcp login spiral
Use the Spiral skill
- Send Codex this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run TikTok ad search
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "tikhub", "model": "tikhub/tiktok-ads-search-ads", "input": { "like": 1 } }'
Then paste one of the prompts above: Codex finds TikTok ad search on Spiral, shows the price and runs it.
TikTok ad search providers and prices
Spiral runs TikTok ad search through TikHub. Open a card for today's price, with every fee included.
Settings you can ask for
Ask Codex for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Like | a whole number | ||
| Page | a whole number | 1 | Page number |
| Limit | a whole number | 20 | Items per page |
| Period | a whole number | 180 | Time period (days) |
| Duration | a whole number | Video duration filter value (optional) | |
| Ad format | a whole number | Ad format (optional; 1:Spark Ads 2:Non-Spark Ads) | |
| Objective | a whole number |
Every API field of TikTok Ads · Search ads is on its tool page: open its card above.
What can you do with TikTok ad search in Codex?
Build a research view that puts TikTok trend evidence and ad references beside a campaign brief. A coding agent can organize Creative Center responses in project files and show the evidence behind each proposed content idea.
Product launch research
Prepare a skincare launch brief with hashtag rankings, audience context, and relevant ad examples. Separate the observed data from proposed messages to test.
Seasonal content planning
Plan holiday content using trending topics, their popularity curves, and seasonal ad descriptions. Turn the findings into original concepts with a clear reference for each idea.
Agency research briefs
Build a client briefing that brings together category trends, hashtag audience summaries, and public advertiser examples. Explain which evidence supports each proposed content direction.
Creative test planning
Create a backlog of content hypotheses from hashtag momentum, audience profiles, and ad messaging. Give each hypothesis an observed reference and a proposed test.
Ad reference library
Organize product-related ad examples by advertiser, description, landing page, and engagement counts. Use the library as a reference for writing original campaign briefs.
More on TikTok ad search and Codex
Overview
TikTok ad search in other agents
Questions about TikTok ad search in Codex
Can Codex use TikTok ad search?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run TikTok ad search like any built-in tool.
How much does TikTok ad search cost in Codex?
$0.0013 per request. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.
Do I need a TikHub account to use TikTok ad search in Codex?
No. Spiral runs TikTok ad search on its own TikHub account. You sign in to Spiral once and never paste a key.
How long does it take to set up TikTok ad search in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while TikTok ad search runs?
TikTok ad search runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.
What public data does TikTok Creative Center cover?
Creative Center provides public trend information and ad examples. Its hashtag rankings include views and post counts, while ad search includes advertiser names, landing pages, and engagement counts.
Does Creative Center show every TikTok advertiser?
Top Ads only includes creatives authorized by advertisers for display in Creative Center. A missing advertiser or campaign therefore does not establish that it has never advertised on TikTok.
What audience information does Creative Center provide for hashtags?
Hashtag analytics provides an audience age profile and representative countries alongside the popularity curve and related videos. These are audience summaries for a hashtag, rather than individual viewer records.
How many ad examples can a search return at once?
Ad search documents a maximum of 50 results per page, with 20 as the default. That is a page limit, not the size of TikTok's advertising inventory.
Can I download Creative Center ads to reuse in my campaign?
TikTok says Top Ads creatives are watermarked and unavailable for download for copyright reasons. Use the examples to inform an original creative brief; their public display does not establish permission to reuse them.
Start using TikTok ad search in Codex
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Codex:
set up https://spiral.ai/SKILL.md


