# TikTok ads and creator analytics API workflow

Query public TikTok creative libraries, ad percentile metrics, and creator content signals on demand without recurring agency data retainers.

## Why teams consolidate this workflow

Marketing intelligence scripts and creative-research agents often need episodic bursts of TikTok ad metadata, keyframe retention curves, and hashtag discovery. Buying standalone enterprise social suites for occasional programmatic audits leaves budget unused between campaigns.

## Implementation sequence

1. **Discover live TikTok endpoints.** Call POST /apis/v1/discover or MCP search_tools with 'TikTok ads' at $0 to list over 130 live TikTok operations and their public IDs.
2. **Inspect parameters and per-call rates.** Call POST /apis/v1/inspect with publicId 'tiktok/ads-get-ads-detail-v1' to verify required query or body inputs and check exact per-call pricing.
3. **Extract structured creative metrics.** Execute paid lookups from your backend worker, store structured creative metadata, and pay $0 if an upstream request times out or returns 5xx.

## Example request

```python
import os
import requests

headers = {"Authorization": f"Bearer {os.environ['KEEPBAL_API_KEY']}"}
spec = requests.post(
    "https://keepbal.com/apis/v1/inspect",
    headers=headers,
    json={"publicId": "tiktok/ads-get-ads-detail-v1"},
    timeout=30,
)
spec.raise_for_status()
print(spec.json())
```

## Pricing and spend controls

Inspect each TikTok endpoint before batching. Fixed-price operations bill only on HTTP 200 completion; variable endpoints charge reported provider cost plus 35%.

## Related catalog surfaces

- [TikTok Ads Detail API](/tools/tiktok/ads-get-ads-detail-v1)
- [TikTok Ad Interactive Analysis API](/tools/tiktok/ads-get-ad-interactive-analysis-v1)
- [TikTok Ad Keyframe Analysis API](/tools/tiktok/ads-get-ad-keyframe-analysis-v1)
- [Social media category](/tools/category/social-media)
- [Agent cost calculator](/cost-calculator)

## Frequently asked questions

### Do I need a separate TikTok commercial data contract?

No. KeepBal routes public TikTok research operations under one KeepBal API key and prepaid wallet. TikTok identifies the data source and does not imply vendor affiliation.

### Can Claude Code or Cursor query TikTok ad tools over MCP?

Yes. Connect https://keepbal.com/mcp via Streamable HTTP and let your coding agent run search_tools, inspect_tool, and run_tool.

[All use cases](/use-cases) · [Cost calculator](/cost-calculator) · [MCP config generator](/mcp-config)
