YouTube video transcript by URL — captions, subtitles
scrapecreators.x.v1-youtube-video-transcriptRetrieves the captions, subtitles, or transcript of a YouTube video or short.
- Price
- $0.00188/callZum Anbieterpreis
- Success rate
- 99,3 %Last 30 days · 63.133 calls
- Latency p50
- 2.5 sp95 7.7 s
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-video-transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbjVIDXPP7UkPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameter
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Abfrageparameter | ||||
url | Zeichenkette | Erforderlich | YouTube video or short URL | https://www.youtube.com/watch?v=bjVIDXPP7Uk |
language | Zeichenkette | Optional | 2 letter language code, ie 'en', 'es', 'fr' etc. If the transcript is not available in the language you specify, the transcript will be null. | en |
cache_max_age | Zeichenkette | Optional | If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). Otherwise, scrape a live result (1 credit). [See the Cac... | 7d |
- Abfrageparameter
urlZeichenketteErforderlichYouTube video or short URL
Beispiel:
https://www.youtube.com/watch?v=bjVIDXPP7UklanguageZeichenketteOptional2 letter language code, ie 'en', 'es', 'fr' etc. If the transcript is not available in the language you specify, the transcript will be null.
Beispiel:
encache_max_ageZeichenketteOptionalIf we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). Otherwise, scrape a live result (1 credit). [See the Cac...
Beispiel:
7d
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
curl -X GET 'https://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-video-transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbjVIDXPP7Uk' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-video-transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbjVIDXPP7Uk",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/scrapecreators.x.v1-youtube-video-transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbjVIDXPP7Uk", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.00188/call einschließlich Servicegebühr abgerechnet.