material_idstringwajib
Ad material ID, required parameter
https://api.sandbase.ai/v1/api/tiktok/ads/ad-interactive-analysisReturns audience retention and interaction analytics across video timestamps for a specified ad creative. Supports filtering by analysis metric and time period.
[
{
"data": {
"keyframe": {
"code": 0,
"data": {
"analysis": [
{
"second": 0,
"value": 1
},
{
"second": 1,
"value": 0.25249169435215946
},
{
"second": 2,
"value": 0.132890365448505
},
"… 16 more items in the full response"
],
"duration": 19,
"highlight": []
},
"msg": "OK"
},
"percentile": {
"code": 0,
"data": {
"show_cnt_percentile": 0.99
},
"msg": "OK"
}
}
}
]Pilih contoh untuk memuat input dan hasilnya ke playground.
Returns audience retention and interaction analytics across video timestamps for one TikTok ad creative. The response has a keyframe block and a percentile block. The call needs a material_id, and you can add metric_type and period_type to filter the result.
period_type to see how results change over time.curl -X POST "https://api.sandbase.ai/v1/api/tiktok/ads/ad-interactive-analysis" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"material_id": "<material_id>"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
material_id | string | Yes | Ad material ID, required parameter |
metric_type | string | No | Analysis type |
period_type | integer | No | Time range, default 180 days |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"keyframe": {
"code": 40000,
"msg": "strconv.ParseInt: parsing \"<material_id>\": invalid syntax"
},
"percentile": {
"code": 40000,
"msg": "strconv.ParseInt: parsing \"<material_id>\": invalid syntax"
}
}
| Field | Meaning |
|---|---|
keyframe | Result block for the keyframe part of the analysis. In the sample response it holds only code and msg, because the call failed. |
percentile | Result block for the percentile part of the analysis. In the sample response it holds only code and msg, because the call failed. |
keyframe.code / percentile.code | Status code for each block. The sample shows 40000, which came back because the material_id was not a valid number. |
keyframe.msg / percentile.msg | Error text for each block. In the sample it says the material_id value could not be parsed as an integer. |
material_id as a string of digits. The placeholder value in the sample request failed with a parse error in both blocks.code and msg, so check both keyframe and percentile after every call.period_type is an integer for the time range and defaults to 180 days. metric_type is a string that selects the analysis type.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/ads/ad-interactive-analysis" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"material_id": "7164467399885864962"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
material_idstringwajibAd material ID, required parameter
metric_typestringAnalysis type
period_typeintegerTime range, default 180 days
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
[
{
"data": {
"keyframe": {
"code": 0,
"data": {
"analysis": [
{
"second": 0,
"value": 1
},
{
"second": 1,
"value": 0.25249169435215946
},
{
"second": 2,
"value": 0.132890365448505
},
"… 16 more items in the full response"
],
"duration": 19,
"highlight": []
},
"msg": "OK"
},
"percentile": {
"code": 0,
"data": {
"show_cnt_percentile": 0.99
},
"msg": "OK"
}
}
}
]Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
TikTok | $0.001 per panggilan | JSON |
TikTok | $0.001 per panggilan | JSON |
TikTok | $0.001 per panggilan | JSON |
TikTok | $0.001 per panggilan | JSON |
TikTok | $0.001 per panggilan | JSON |
TikTok | $0.001 per panggilan | JSON |
Panduan:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/tiktok/ads/ad-interactive-analysis dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: material_id (string). Opsional: metric_type (string) dan period_type (integer). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. TikTok Ad Interactive Analysis berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API TikTok secara terpisah.