YouTube · API
YouTube Transcript API
The full spoken transcript of a public YouTube video, with timed segments.
EndpointGET /v1/youtube/transcript
Cost2 credits live
Cache hit0 credits
ReturnsOne object
Call it
curl -G 'https://api.sourcevine.io/v1/youtube/transcript' \
-H 'Authorization: Bearer sv_live_...' \
--data-urlencode 'url=https://www.youtube.com/watch?v=dQw4w9WgXcQ'const res = await fetch(
'https://api.sourcevine.io/v1/youtube/transcript?' + new URLSearchParams({
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
}),
{ headers: { Authorization: 'Bearer sv_live_...' } },
);
const { success, data } = await res.json();import requests
r = requests.get(
"https://api.sourcevine.io/v1/youtube/transcript",
params={"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
headers={"Authorization": "Bearer sv_live_..."},
)
data = r.json()["data"]Parameters
| Name | Required | Notes |
|---|---|---|
| url | Yes | A public YouTube URL. |
| access_key | Yes | Your key. Send it as Authorization: Bearer orx-access-key where you can — a key in a query string ends up in proxy logs and browser history. |
| cache | No | Defaults to true. Set false to force a live read, which always costs credits. |
Billing
A live read costs 2 credits and a cache hit costs nothing. Every response says which it was, in thecached field and in the X-Credits-Chargedheader. A resource that turns out to be private, deleted, or that we could not reach is never charged.
Other APIs
TikTok Video Stats API/v1/tiktok/statsTikTok Profile API/v1/tiktok/profileTikTok Channel Videos API/v1/tiktok/postsYouTube Video Stats API/v1/youtube/statsYouTube Channel API/v1/youtube/channelYouTube Channel Videos API/v1/youtube/videos
All APIs →