InsightSocial API
YouTube

Video › Transcript

GET
/v1/youtube/video/transcript

Returns the spoken transcript of a video as timestamped segments, each with text, start time and duration, plus language, word count, and speech rate.

Use it for a single video URL; when the video has no captions the reply is a 404 naming the reason, which is expected rather than a failure.

60 credits per call.

Re-running the exact same call within 6h is free.

x-api-key<token>

Your key from the dashboard. It starts with isk_.

In: header

Query Parameters

url*string

Full URL of the YouTube video

language?string

2 letter language code, ie 'en', 'es', 'fr' etc. If no caption track matches the language you specify, the request returns 404 RESOURCE_NOT_FOUND (reason no_captions).

moments?string

Optional CSV of moment kinds to find in the timestamped transcript: brand, sponsor_read, product_demo, call_to_action. Returns data.moments = [{ kind, start_ms, end_ms, quote }]. Quote is copied from the transcript. Times come from the segments, never from the judge. Price of the extra step is an owner decision; today it does not add credits.

brand?string

Optional, with moments=. The company or product to look for, so a namesake is not counted.

q?string

Optional question about the video, up to 300 characters, for example q=what discount code do they give. Returns data.moments = [{ kind: "answers_query", start_ms, end_ms, quote }] for each stretch of about six transcript lines that states the answer: a stretch that only shares the topic is left out, and a question the video never answers returns an empty list. The quote is one line copied from the transcript and the times come from the segments. Send moments= or q=, not both. If the step cannot run, the transcript is returned without data.moments and data._warnings carries moments_unavailable. Today it does not add credits.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/youtube/video/transcript?url=string"
{  "success": true,  "platform": "instagram",  "endpoint": "/v1/instagram/profile/posts",  "data": {    "items": [      "…"    ],    "dropped": 0  },  "pagination": {    "next_cursor": "is2.eyJwIjoyfQ",    "has_more": true,    "page_size": 12  },  "credits_used": 20,  "credits_remaining": 9980,  "request_id": "req_1a2b3c4d5e6f",  "cached": false,  "idempotent_replay": false,  "charge_reason": "miss",  "free_call": false}