API reference · TikTok

tiktok/ads/search-ads

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

APISynchronousOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDtiktok/ads/search-ads
01

Input Schema

12 parameters · 0 required · 12 optional

ParameterTypeRequiredDescription
likeintegerOptional表现排名/Performance rank (1:前1-20% 2:前21-40% 3:前41-60% 4:前61-80%) · Default: 1
pageintegerOptional页码/Page number · Default: 1
limitintegerOptional每页数量/Items per page · Default: 20
periodintegerOptional时间段/Time period (days) · Default: 180
keywordstringOptional搜索关键词/Search keyword
industrystringOptional行业ID/Industry ID
order_bystringOptional排序方式/Sort by (for_you, likes) · Default: "for_you"
ad_formatintegerOptional广告格式/Ad format (1:视频) · Default: 1
objectiveintegerOptional广告目标类型/Ad objective (1:流量 2:应用安装 3:转化 4:视频浏览 5:触达 6:潜在客户 7:产品销售) · Default: 1
search_idstringOptional搜索ID(可选)/Search ID (optional)
ad_languagestringOptional广告语言/Ad language · Default: "en"
country_codestringOptional国家代码/Country code · Default: "US"
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-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"
}'