Platform APIs
TikTok API
Video metadata, transcripts with timestamps, profile stats and comment threads from public posts.
GET /tiktok/transcript?url=...3 credits per videoauth: x-api-keycontent-type: application/jsonenvelope: data + meta
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Public TikTok video URL. |
| lang | string | no | Preferred caption language, for example en or es. |
| timestamps | boolean | no | Return caption segments with start and end times. |
request.sh
curl -s "https://api.cleanfetch.dev/v1/tiktok/transcript?url=https://www.tiktok.com/@nasa/video/7300000000000000000" \ -H "x-api-key: cf_live_your_key_here"
response.json
200 OK / application/json
{
"data": {
"platform": "tiktok",
"video": {
"id": "7300000000000000000",
"author": "nasa",
"description": "A view from the ISS",
"duration": 34,
"views": 2400000,
"likes": 310000,
"transcript": [
{ "start": 0.0, "end": 3.2, "text": "Here is the view from orbit." }
]
}
},
"meta": {
"requestId": "req_cf_01j9k955z8a",
"lookupStatus": "found",
"creditsCharged": 3,
"latencyMs": 1680,
"cached": false
}
}Endpoints
Use /v1/tiktok/transcript for captions, /v1/tiktok/video for metadata and /v1/tiktok/profile for public account stats. Comment threads are available at /v1/tiktok/comments. The directory lists 26 TikTok endpoints.
Credits
A profile or video lookup costs 3 credits. The free tier allows 2 TikTok lookups a day. A missing video costs 3 credits, a blocked upstream costs none, and a cache hit costs zero.
Transcript shape
With timestamps enabled, transcript is an array of start, end and text segments. Without it, the same content is returned as one plain text string. Caption language falls back to the video default.