> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transcriptmagic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TikTok

> Fetch transcripts from any public TikTok video with one REST call.

```http theme={null}
POST https://api.transcriptmagic.com/api/tiktok/transcript
```

Full share URLs (`/@user/video/<id>`) and `vm.tiktok.com` short links both resolve cleanly.

## Request

```bash cURL theme={null}
curl -X POST https://api.transcriptmagic.com/api/tiktok/transcript \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.tiktok.com/@user/video/7212345678901234567"}'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.transcriptmagic.com/api/tiktok/transcript",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"url": "https://www.tiktok.com/@user/video/7212345678901234567"},
)

data = response.json()
print(data["transcript"])  # plain string, newline-separated lines
```

```javascript JavaScript theme={null}
const response = await fetch("https://api.transcriptmagic.com/api/tiktok/transcript", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ url: "https://www.tiktok.com/@user/video/7212345678901234567" }),
});

const data = await response.json();
console.log(data.transcript); // plain string, newline-separated
```

```go Go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	body, _ := json.Marshal(map[string]string{
		"url": "https://www.tiktok.com/@user/video/7212345678901234567",
	})

	req, _ := http.NewRequest("POST",
		"https://api.transcriptmagic.com/api/tiktok/transcript",
		bytes.NewBuffer(body))
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()

	var data struct {
		Transcript string `json:"transcript"`
		VideoUrls  *struct {
			Sd        string `json:"sd"`
			Hd        string `json:"hd"`
			Thumbnail string `json:"thumbnail"`
		} `json:"videoUrls,omitempty"`
	}
	json.NewDecoder(resp.Body).Decode(&data)
	fmt.Println(data.Transcript)
}
```

```php PHP theme={null}
<?php
$ch = curl_init('https://api.transcriptmagic.com/api/tiktok/transcript');

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'url' => 'https://www.tiktok.com/@user/video/7212345678901234567',
]));

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
echo $data['transcript'];
```

## Response

```json theme={null}
{
  "transcript": "Okay so today I'm going to show you\nthe easiest pasta recipe\nyou'll ever make...",
  "videoUrls": {
    "sd": "https://...mp4",
    "hd": null,
    "thumbnail": "https://...jpg"
  },
  "credits": 996
}
```

`transcript` is a plain string with newlines between spoken lines — there is no per-line timing in the TikTok response, and no `title` field. `videoUrls` is included whenever the upstream exposes a video or cover image; it is omitted when neither is available. The `sd` and `hd` download links are only filled in on the **Plus and Pro** plans (video download is a Plus and Pro feature). On other plans they are `null` and only `thumbnail` is set.

## Supported URL formats

| Format | Example |
| - | - |
| Full share URL | `https://www.tiktok.com/@user/video/<19-digit id>` |
| `vm.tiktok.com` short link | `https://vm.tiktok.com/<code>` |

## FAQ

> [accordion] Do private TikTok videos work?
>
> No. The API can only fetch transcripts for publicly viewable videos. Private accounts and videos behind a follow-gate aren't supported.

> [accordion] What if the video has no spoken audio?
>
> You'll get a `404` with `error: "No transcript available for this video"` and a `code` (`no_speech` when the video has no spoken captions, `video_unavailable` when it can't be found), and you won't be charged.

> [accordion] Does it work on TikTok Lives?
>
> Live streams aren't supported. Once a Live is saved as a regular video and is publicly viewable, it works like any other URL.

> [accordion] Will the short `vm.tiktok.com` URLs work directly?
>
> Yes. We resolve them server-side — you don't need to expand the link before calling the API.

> [accordion] Does the response include the video title or author?
>
> No — the TikTok response shape is intentionally lean: `transcript`, optional `videoUrls`, and `credits`. If you need the author handle, parse it from the URL you submitted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.