---
title: "Get a video's transcript"
description: "What is said in a video: the platform's own captions where they exist, speech-to-text where they don't."
url: https://docs.sonderlabs.co.uk/media/transcript
---

# Get a video's transcript

What is said in a video: the platform's own captions where they exist, speech-to-text where they don't.

`GET /v1/posts/{id}/transcript` (coming soon)

> **Coming soon:** this endpoint is not served yet; the shape below is what it will look like. [Ask for it](https://docs.sonderlabs.co.uk/access) if you need it.

`source` says where the words came from: `captions` (the platform's) or `speech` (Sonder's speech-to-text). Speech-to-text covers the first 90 seconds of videos up to 10 minutes long.

With `timed=true`, YouTube captions come back with start and end times per line.

## Platform support

- TikTok: Live
- Instagram: Limited. Speech-to-text on Reels with 20,000 views or more; Instagram has no captions to read.
- YouTube: Live
- Facebook: Not available. No speech on this platform's posts: text posts, or no video file to read.
- X: Not available. No speech on this platform's posts: text posts, or no video file to read.
- Threads: Not available. No speech on this platform's posts: text posts, or no video file to read.
- Reddit: Not available. No speech on this platform's posts: text posts, or no video file to read.
- Snapchat: Limited. Spotlights only.

## Parameters

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | A Sonder post id, from any endpoint that returns posts or from [post lookup](https://docs.sonderlabs.co.uk/posts/lookup). |
| `timed` | query | boolean | no | Return lines with start and end seconds, where available. |

## Example

cURL:

```bash
curl https://yourteam.sonderlabs.co.uk/v1/posts/abf505e6a8dd939360d5beaec605b807/transcript \
  -H "Authorization: Bearer $SONDER_API_KEY"
```

JavaScript:

```js
const res = await fetch("https://yourteam.sonderlabs.co.uk/v1/posts/abf505e6a8dd939360d5beaec605b807/transcript", {
  headers: {
    Authorization: `Bearer ${process.env.SONDER_API_KEY}`,
  },
});
const data = await res.json();
```

Python:

```python
import os, requests

res = requests.get(
    "https://yourteam.sonderlabs.co.uk/v1/posts/abf505e6a8dd939360d5beaec605b807/transcript",
    headers={"Authorization": f"Bearer {os.environ['SONDER_API_KEY']}"},
)
data = res.json()
```

Response:

```json
{
  "postId": "abf505e6a8dd939360d5beaec605b807",
  "platform": "youtube",
  "source": "captions",
  "language": "en",
  "text": "As a child, did you fantasize about doing other things? Did you kind of think, \"When I grow up, I might not be king. I'll do this.\" >> Uh yes, there was elements of that growing up, >> [laughter] >> and I'm roughly trying to think about what I can say on telev…"
}
```
