API reference · TikTok
tiktok/ads/search-ads
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
tiktok/ads/search-ads01
Input Schema
12 parameters · 0 required · 12 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
like | integer | Optional | 表现排名/Performance rank (1:前1-20% 2:前21-40% 3:前41-60% 4:前61-80%) · Default: 1 |
page | integer | Optional | 页码/Page number · Default: 1 |
limit | integer | Optional | 每页数量/Items per page · Default: 20 |
period | integer | Optional | 时间段/Time period (days) · Default: 180 |
keyword | string | Optional | 搜索关键词/Search keyword |
industry | string | Optional | 行业ID/Industry ID |
order_by | string | Optional | 排序方式/Sort by (for_you, likes) · Default: "for_you" |
ad_format | integer | Optional | 广告格式/Ad format (1:视频) · Default: 1 |
objective | integer | Optional | 广告目标类型/Ad objective (1:流量 2:应用安装 3:转化 4:视频浏览 5:触达 6:潜在客户 7:产品销售) · Default: 1 |
search_id | string | Optional | 搜索ID(可选)/Search ID (optional) |
ad_language | string | Optional | 广告语言/Ad language · Default: "en" |
country_code | string | Optional | 国家代码/Country code · Default: "US" |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
03
Code Examples
Ready-to-run snippets
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "tiktok/ads/search-ads",
"like": 1,
"page": 1,
"limit": 20,
"period": 180,
"order_by": "for_you",
"ad_format": 1,
"objective": 1,
"ad_language": "en",
"country_code": "US",
"prompt": "a beautiful sunset over mountains"
}'
