tiktok search_ads
curl --request POST \
--url https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ad_format": 123,
"ad_language": "<string>",
"cookie": "<string>",
"country_code": "US",
"duration": 123,
"industry": "<string>",
"keyword": "<string>",
"like": 123,
"limit": 20,
"objective": 123,
"order_by": "for_you",
"page": 1,
"pattern_label": "<string>",
"period": 180,
"search_id": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads"
payload = {
"ad_format": 123,
"ad_language": "<string>",
"cookie": "<string>",
"country_code": "US",
"duration": 123,
"industry": "<string>",
"keyword": "<string>",
"like": 123,
"limit": 20,
"objective": 123,
"order_by": "for_you",
"page": 1,
"pattern_label": "<string>",
"period": 180,
"search_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ad_format: 123,
ad_language: '<string>',
cookie: '<string>',
country_code: 'US',
duration: 123,
industry: '<string>',
keyword: '<string>',
like: 123,
limit: 20,
objective: 123,
order_by: 'for_you',
page: 1,
pattern_label: '<string>',
period: 180,
search_id: '<string>'
})
};
fetch('https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ad_format' => 123,
'ad_language' => '<string>',
'cookie' => '<string>',
'country_code' => 'US',
'duration' => 123,
'industry' => '<string>',
'keyword' => '<string>',
'like' => 123,
'limit' => 20,
'objective' => 123,
'order_by' => 'for_you',
'page' => 1,
'pattern_label' => '<string>',
'period' => 180,
'search_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads"
payload := strings.NewReader("{\n \"ad_format\": 123,\n \"ad_language\": \"<string>\",\n \"cookie\": \"<string>\",\n \"country_code\": \"US\",\n \"duration\": 123,\n \"industry\": \"<string>\",\n \"keyword\": \"<string>\",\n \"like\": 123,\n \"limit\": 20,\n \"objective\": 123,\n \"order_by\": \"for_you\",\n \"page\": 1,\n \"pattern_label\": \"<string>\",\n \"period\": 180,\n \"search_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ad_format\": 123,\n \"ad_language\": \"<string>\",\n \"cookie\": \"<string>\",\n \"country_code\": \"US\",\n \"duration\": 123,\n \"industry\": \"<string>\",\n \"keyword\": \"<string>\",\n \"like\": 123,\n \"limit\": 20,\n \"objective\": 123,\n \"order_by\": \"for_you\",\n \"page\": 1,\n \"pattern_label\": \"<string>\",\n \"period\": 180,\n \"search_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ad_format\": 123,\n \"ad_language\": \"<string>\",\n \"cookie\": \"<string>\",\n \"country_code\": \"US\",\n \"duration\": 123,\n \"industry\": \"<string>\",\n \"keyword\": \"<string>\",\n \"like\": 123,\n \"limit\": 20,\n \"objective\": 123,\n \"order_by\": \"for_you\",\n \"page\": 1,\n \"pattern_label\": \"<string>\",\n \"period\": 180,\n \"search_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"materials": [
{
"ads_info": {
"advertiser_name": "PetToys Inc.",
"landing_page": "https://example.com/cat-toys"
},
"aweme_id": "7213258221116751874",
"create_time": 1680234567,
"desc": "Best interactive cat toys! Keep your cats entertained 🐱",
"id": "7213258221116751874",
"statistics": {
"comment_count": 3421,
"digg_count": 128456,
"share_count": 892
},
"video_info": {
"cover": "https://p16-ad-sg.tiktokcdn.com/img/xxx.jpeg",
"duration": 15
}
}
],
"pagination": {
"has_more": true,
"limit": 20,
"page": 1,
"total": 1523
}
},
"params": {
"industry": "27000000000",
"keyword": "cat toy",
"limit": 20,
"page": 1,
"period": 180
},
"router": "/api/v1/tiktok/ads/search_ads"
}Commercial
tiktok search_ads
Search ads
POST
https://api.aisa.one
/
apis
/
v1
/
tikhub
/
tiktok
/
ads
/
search_ads
tiktok search_ads
curl --request POST \
--url https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ad_format": 123,
"ad_language": "<string>",
"cookie": "<string>",
"country_code": "US",
"duration": 123,
"industry": "<string>",
"keyword": "<string>",
"like": 123,
"limit": 20,
"objective": 123,
"order_by": "for_you",
"page": 1,
"pattern_label": "<string>",
"period": 180,
"search_id": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads"
payload = {
"ad_format": 123,
"ad_language": "<string>",
"cookie": "<string>",
"country_code": "US",
"duration": 123,
"industry": "<string>",
"keyword": "<string>",
"like": 123,
"limit": 20,
"objective": 123,
"order_by": "for_you",
"page": 1,
"pattern_label": "<string>",
"period": 180,
"search_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ad_format: 123,
ad_language: '<string>',
cookie: '<string>',
country_code: 'US',
duration: 123,
industry: '<string>',
keyword: '<string>',
like: 123,
limit: 20,
objective: 123,
order_by: 'for_you',
page: 1,
pattern_label: '<string>',
period: 180,
search_id: '<string>'
})
};
fetch('https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ad_format' => 123,
'ad_language' => '<string>',
'cookie' => '<string>',
'country_code' => 'US',
'duration' => 123,
'industry' => '<string>',
'keyword' => '<string>',
'like' => 123,
'limit' => 20,
'objective' => 123,
'order_by' => 'for_you',
'page' => 1,
'pattern_label' => '<string>',
'period' => 180,
'search_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads"
payload := strings.NewReader("{\n \"ad_format\": 123,\n \"ad_language\": \"<string>\",\n \"cookie\": \"<string>\",\n \"country_code\": \"US\",\n \"duration\": 123,\n \"industry\": \"<string>\",\n \"keyword\": \"<string>\",\n \"like\": 123,\n \"limit\": 20,\n \"objective\": 123,\n \"order_by\": \"for_you\",\n \"page\": 1,\n \"pattern_label\": \"<string>\",\n \"period\": 180,\n \"search_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ad_format\": 123,\n \"ad_language\": \"<string>\",\n \"cookie\": \"<string>\",\n \"country_code\": \"US\",\n \"duration\": 123,\n \"industry\": \"<string>\",\n \"keyword\": \"<string>\",\n \"like\": 123,\n \"limit\": 20,\n \"objective\": 123,\n \"order_by\": \"for_you\",\n \"page\": 1,\n \"pattern_label\": \"<string>\",\n \"period\": 180,\n \"search_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ad_format\": 123,\n \"ad_language\": \"<string>\",\n \"cookie\": \"<string>\",\n \"country_code\": \"US\",\n \"duration\": 123,\n \"industry\": \"<string>\",\n \"keyword\": \"<string>\",\n \"like\": 123,\n \"limit\": 20,\n \"objective\": 123,\n \"order_by\": \"for_you\",\n \"page\": 1,\n \"pattern_label\": \"<string>\",\n \"period\": 180,\n \"search_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"materials": [
{
"ads_info": {
"advertiser_name": "PetToys Inc.",
"landing_page": "https://example.com/cat-toys"
},
"aweme_id": "7213258221116751874",
"create_time": 1680234567,
"desc": "Best interactive cat toys! Keep your cats entertained 🐱",
"id": "7213258221116751874",
"statistics": {
"comment_count": 3421,
"digg_count": 128456,
"share_count": 892
},
"video_info": {
"cover": "https://p16-ad-sg.tiktokcdn.com/img/xxx.jpeg",
"duration": 15
}
}
],
"pagination": {
"has_more": true,
"limit": 20,
"page": 1,
"total": 1523
}
},
"params": {
"industry": "27000000000",
"keyword": "cat toy",
"limit": 20,
"page": 1,
"period": 180
},
"router": "/api/v1/tiktok/ads/search_ads"
}Search ads
Pricing — billed per successful call; the final charge scales by your plan multiplier. Charged only when the upstream response body
code is 200.
Example
curl -X POST "https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' # see request schema below
Request contract
- Method and path: POST /apis/v1/tikhub/tiktok/ads/search_ads
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/tikhub/tiktok/ads/search_ads
{
"operationId": "post_tikhub_tiktok_ads_search_ads",
"method": "POST",
"path": "/apis/v1/tikhub/tiktok/ads/search_ads",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"ad_format": {
"description": "Ad format (optional): 1=Spark Ads, 2=Non-Spark Ads",
"title": "Ad Format",
"type": [
"integer",
"null"
]
},
"ad_language": {
"description": "Ad language (optional)",
"title": "Ad Language",
"type": [
"string",
"null"
]
},
"cookie": {
"description": "Custom Cookie string, optional parameter, can be used to fetch more data",
"title": "Cookie",
"type": "string"
},
"country_code": {
"default": "US",
"description": "Country code",
"title": "Country Code",
"type": "string"
},
"duration": {
"description": "Video duration filter value (optional)",
"title": "Duration",
"type": [
"integer",
"null"
]
},
"industry": {
"description": "Industry ID list, multiple IDs separated by commas. Full industry ID list: https://github.com/TikHub/TikTok-Ads-Industry-Code",
"title": "Industry",
"type": "string"
},
"keyword": {
"description": "Search keyword, optional, returns all ads if empty",
"title": "Keyword",
"type": "string"
},
"like": {
"description": "Performance rank (optional; 1=top 1-20%, 2=top 21-40%, 3=top 41-60%, 4=top 61-80%, 5=top 81-100%)",
"title": "Like",
"type": [
"integer",
"null"
]
},
"limit": {
"default": 20,
"description": "Items per page, default 20, max 50",
"maximum": 50,
"title": "Limit",
"type": "integer"
},
"objective": {
"description": "Ad objective (optional): 1=Traffic, 2=App install, 3=Conversion, 4=Video views, 5=Reach, 6=Lead generation, 7=Product sales",
"title": "Objective",
"type": [
"integer",
"null"
]
},
"order_by": {
"default": "for_you",
"description": "Sort method, \"for_you\"=Recommended, \"likes\"=Sort by likes",
"title": "Order By",
"type": "string"
},
"page": {
"default": 1,
"description": "Page number, default 1",
"title": "Page",
"type": "integer"
},
"pattern_label": {
"description": "Creative pattern label (optional)",
"title": "Pattern Label",
"type": [
"string",
"null"
]
},
"period": {
"default": 180,
"description": "Time period in days, e.g., 7, 30, 120, 180 days",
"title": "Period",
"type": "integer"
},
"search_id": {
"description": "Search ID (optional)",
"title": "Search Id",
"type": "string"
}
},
"title": "Body_search_ads_api_v1_tiktok_ads_search_ads_post",
"type": "object"
}
}
}
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Request pricing. Default request estimate: $0.001 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
application/json
Industry ID list, multiple IDs separated by commas. Full industry ID list: https://github.com/TikHub/TikTok-Ads-Industry-Code
Response
Successful Response
Return Description
materials: List of ad materialsid: Ad material IDaweme_id: Ad video IDdesc: Ad descriptioncreate_time: Creation timevideo_info: Video informationcover: Cover image URLduration: Duration in seconds
statistics: Statisticsdigg_count: Number of likescomment_count: Number of commentsshare_count: Number of shares
ads_info: Ad informationadvertiser_name: Advertiser namelanding_page: Landing page URL
pagination: Pagination infopage: Current pagelimit: Items per pagetotal: Total counthas_more: Whether there are more items
The media-type example is an illustrative response from the official documentation, not a live response. Its router and params metadata use upstream naming.
Endpoint-specific response payload. The official shared model does not declare a fixed type or field set. Use the operation's documented return fields or response example; an operation-specific schema, when present, describes the documented fields. Undocumented fields must be read from the actual response rather than assumed.