Video transcript (any URL) API
Detects the platform from the URL and runs its transcript endpoint.
- Cost
- 1 creditAI transcription is billed by the started minute after 2
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
YouTube, TikTok, Instagram, X, Facebook, LinkedIn, Reddit, Twitch clips, Kick clips and Rumble. Same price, same cache.
You send url.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/transcript" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'url=https://www.youtube.com/watch?v=dQw4w9WgXcQ'import os
import requests
params = {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
}
res = requests.get(
"https://api.socialscrape.io/v1/transcript",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/transcript");
url.search = new URLSearchParams({
url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Transcript from any video URL",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/transcript",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | yes | Video URL on any supported platform. |
language | string | Preferred caption language (BCP 47). Also accepted as lang. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_54e6289e14c7b0e7ad9acc2d",
"data": {
"object": "transcript",
"platform": "youtube",
"video_id": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"language": "en",
"source": "captions",
"duration_seconds": 213,
"text": "Example transcript text. This is illustrative, not the video's real captions.",
"segments": [
{
"start": 0,
"end": 4,
"text": "Example transcript text."
},
{
"start": 4,
"end": 9,
"text": "This is illustrative, not the video's real captions."
}
],
"available_languages": [
"en"
],
"extra": null
},
"cursor": null,
"has_more": null
}Fields
One Transcript in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "transcript" | ||
platform | Platform | yes | |
video_id | string or null | ||
url | string or null | ||
language | string or null | BCP 47, "en" | |
source | "captions" or "auto_captions" or "ai" | yes | |
duration_seconds | number or null | ||
text | string | yes | |
segments | TranscriptSegment[] or null | ||
available_languages | string[] or null | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), transcript_unavailable (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
Is there an SDK call for it?
The preview Python client has client.transcript(...) and the TypeScript client client.transcript(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.