Endpoints by data type
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 call costs from $0.002 to $0.004, each endpoint at its own price; a failed call is free.
Transcript · on each platform
| Platform | Endpoint | Path | A page | Price |
|---|---|---|---|---|
| YouTube | YouTube video transcript | GET /v1/youtube/videos/transcript/get | 1 | $0.004 per call |
| Instagram reel transcript | GET /v1/instagram/posts/transcript/get | 1 | $0.004 per call | |
| Reddit video transcript | GET /v1/reddit/posts/transcript/get | 1 | $0.004 per call | |
| TikTok | TikTok video transcript | GET /v1/tiktok/videos/transcript/get | 1 | $0.002 per call |
from $0.002 to $0.004 a call, each endpoint at its own price. A call that fails costs nothing.
The object it returns: 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.
# 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.