# Transcript API

> 4 endpoints on 4 platforms return transcripts as the same Transcript object. What is said in a video, as timed segments and as one block of plain text, with the language of the track returned. A ca…

Canonical page: https://okdata.online/roles/transcripts-get/

4 endpoints on 4 platforms return transcripts as the same Transcript object. What is said in a video, as timed segments and as one block of plain text, with the language of the track returned. A call costs from $0.002 to $0.004, each endpoint at its own price; a failed call is free.

## on each platform

| Platform | Endpoint | Path | A page | Price |
|---|---|---|---|---|
| YouTube | [YouTube video transcript](https://okdata.online/apis/youtube/videos/transcript/get/) | `GET /v1/youtube/videos/transcript/get` | 1 | $0.004 per call |
| Instagram | [Instagram reel transcript](https://okdata.online/apis/instagram/posts/transcript/get/) | `GET /v1/instagram/posts/transcript/get` | 1 | $0.004 per call |
| Reddit | [Reddit video transcript](https://okdata.online/apis/reddit/posts/transcript/get/) | `GET /v1/reddit/posts/transcript/get` | 1 | $0.004 per call |
| TikTok | [TikTok video transcript](https://okdata.online/apis/tiktok/videos/transcript/get/) | `GET /v1/tiktok/videos/transcript/get` | 1 | $0.002 per call |

## The object it returns: [Transcript](https://okdata.online/docs/objects/transcript/)

Every endpoint above returns these fields with the same names and types. A field a platform does not show comes back null and is named in meta.unavailable.

| Field | Type | Meaning |
|---|---|---|
| `video_id` | `string` | ID of the video. |
| `lang` | `string` | Language of this transcript. |
| `segments` | `Segment[]` | Timed segments in order. |
| `text` | `string` | All segments joined as plain text. |

## The same call on two platforms

Same parameters, same paging, same response shape. Only the path changes.

```bash
# YouTube
curl -G "https://api.okdata.online/v1/youtube/videos/transcript/get" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=dQw4w9WgXcQ'

# Instagram
curl -G "https://api.okdata.online/v1/instagram/posts/transcript/get" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=DeCPVhERA8e'
```

## What people use it for

- Summarise a long video without watching it.
- Index a channel’s talks for search or a RAG chatbot.
- Find every mention of a product across a batch of review videos.

## Questions

### What if a video has no transcript?

The call answers not_found and costs nothing. Instagram’s endpoint covers videos up to two minutes long; the limits of each platform are on its endpoint page.

### Can I choose the language?

On YouTube, pass lang for the track you prefer; the lang in the result says which track you actually got. Other platforms return the track they have.

### Do I get timestamps?

Yes. segments holds the start and end of each piece in seconds with its text, and text joins them all, so you can quote a moment or hand the whole thing to a model.

## Other data types

- [Comments API](https://okdata.online/roles/posts-comments-list/)
- [Trending topics API](https://okdata.online/roles/trends-list/)
- [Comment replies API](https://okdata.online/roles/comments-replies-list/)
- [Hashtag posts API](https://okdata.online/roles/topics-posts-list/)
- [Profile API](https://okdata.online/roles/accounts-get/)
- [Account posts API](https://okdata.online/roles/accounts-posts-list/)
- [Post detail API](https://okdata.online/roles/posts-get/)
- [Post search API](https://okdata.online/roles/posts-search/)
- [Trending posts API](https://okdata.online/roles/posts-trending/)
- [Account search API](https://okdata.online/roles/accounts-search/)
- [Post metrics API](https://okdata.online/roles/posts-metrics/)
- [Community posts API](https://okdata.online/roles/communities-posts-list/)
- [Ad detail API](https://okdata.online/roles/ads-get/)
- [Advertiser ads API](https://okdata.online/roles/advertisers-ads-list/)
- [Ad search API](https://okdata.online/roles/ads-search/)
- [Followers list API](https://okdata.online/roles/accounts-followers-list/)
- [Product detail API](https://okdata.online/roles/products-get/)
- [Product reviews API](https://okdata.online/roles/products-reviews-list/)
- [Product search API](https://okdata.online/roles/products-search/)
- [Creator search API](https://okdata.online/roles/creators-search/)
- [Creator profile API](https://okdata.online/roles/creators-get/)
- [Creator audience API](https://okdata.online/roles/creators-audience-get/)
