Transcriptly API v1 retrieves video metadata and published closed caption tracks from public YouTube videos.
youtube.com/watch?v= and short youtu.be/ links.Last updated: December 2, 2026
Send requests to this base URL using HTTPS. Authenticate all calls using the X-API-Key header.
https://transcriptly.org/api/v1X-API-Key: your_api_key_hereX-RateLimit-* information.POST /video-info to inspect the video duration and discover available caption languages (costs 1 credit).en, es).POST /transcript with that language to retrieve timestamped text segments (costs 1 credit).Tip: If you already know the video has your desired language or wish to default to the primary track, you can skip /video-info and call /transcript directly.
/video-infoReturns video details, author information, duration, and the caption languages available for the video.
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}| Field | Type | Requirement | Description |
|---|---|---|---|
| url | string | Required | YouTube video URL (youtube.com/watch?v= or youtu.be/). |
{
"code": 200,
"message": "success",
"data": {
"videoDetails": {
"title": "string",
"description": "string",
"author": "string",
"authorUrl": "string",
"thumbnailUrl": "string",
"lengthSeconds": 0
},
"availableLanguages": [
{ "code": "en", "name": "English", "isGenerated": false }
]
}
}| Field | Type | Description |
|---|---|---|
| data.videoDetails.title | string | Video title. |
| data.videoDetails.description | string | Full video description. |
| data.videoDetails.author | string | Channel name. |
| data.videoDetails.authorUrl | string | Channel URL, if available. |
| data.videoDetails.thumbnailUrl | string | Thumbnail image URL. |
| data.videoDetails.lengthSeconds | number | Total video duration in seconds. |
| data.availableLanguages[].code | string | ISO language code (e.g. en, es). |
| data.availableLanguages[].name | string | Readable language name. |
| data.availableLanguages[].isGenerated | boolean | Indicates whether the caption track was auto-generated by YouTube (legacy field). |
availableLanguages comes from video metadata and is only a hint. An empty list does not mean captions are missing. To confirm whether captions exist, call POST /transcript. A definitive "no captions" result is HTTP 404 with body code 404.
/transcriptRetrieves published closed caption segments for a specific language. This endpoint returns pre-existing captions and does not generate AI transcripts.
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"language": "en"
}| Field | Type | Requirement | Description |
|---|---|---|---|
| url | string | Required | YouTube video URL. |
| language | string | Optional | Optional ISO language code. If omitted, the default caption track is returned. |
{
"code": 200,
"message": "success",
"data": {
"language": "en",
"languageName": "English",
"segments": [
{
"id": 0,
"text": "string",
"startMs": 0,
"endMs": 1200,
"startTimeText": "0:00"
}
],
"availableLanguages": [
{ "code": "en", "name": "English", "isGenerated": false }
]
}
}| Field | Type | Description |
|---|---|---|
| data.language | string | Language code of the returned captions. |
| data.languageName | string | Readable name of the returned language. |
| data.segments[].text | string | Caption line content. |
| data.segments[].startMs | number | Start time offset in milliseconds. |
| data.segments[].endMs | number | End time offset in milliseconds. |
| data.segments[].startTimeText | string | Formatted timestamp string (e.g. '0:00'). |
| data.availableLanguages | array | Other caption tracks available for this video. |
This is the definitive "no captions" signal: HTTP 404 with body code 404. Do not rely on an empty language list from /video-info. Consumes 1 credit. A missing video instead returns body code 4007 and does not consume credits.
{
"code": 404,
"message": "No transcript available for this video",
"data": {
"availableLanguages": []
}
}curl -X POST https://transcriptly.org/api/v1/transcript \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID","language":"en"}'const response = await fetch('https://transcriptly.org/api/v1/transcript', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key_here'
},
body: JSON.stringify({
url: 'https://www.youtube.com/watch?v=VIDEO_ID',
language: 'en'
})
})
const transcript = await response.json()
console.log(transcript.data.segments)import requests
response = requests.post(
"https://transcriptly.org/api/v1/transcript",
headers={"X-API-Key": "your_api_key_here"},
json={
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"language": "en",
},
)
print(response.json()["data"]["segments"])All error responses return standard JSON envelopes with status codes, application error codes, and descriptive messages.
| HTTP | Body code | Meaning |
|---|---|---|
| 400 | 400 | Invalid JSON body, or url parameter is missing. |
| 400 | 4001 | The provided URL is not a valid YouTube video link. No credits consumed. |
| 401 | 401 | Missing or invalid API key in X-API-Key header. |
| 402 | 4005 | Free plan accounts cannot fetch captions for YouTube videos exceeding 60 minutes. No credits consumed. |
| 403 | 4003 | Insufficient account credits to complete the request. |
| 404 | 404 | Video has no closed captions. 1 credit consumed. |
| 404 | 4007 | YouTube video not found, deleted, or private. No credits consumed. |
| 429 | 429 | Hourly rate limit exceeded (120 requests/hour). Inspect Retry-After header. |
| 500 | 5001 | Upstream YouTube extraction failed. No credits consumed. |