Any audio URL → timestamped chunks. Sync or async.
POST /v1/audio/transcript·20 / 2 min·Media
A general-purpose audio transcription endpoint. Resolves the audio asset behind YouTube, X Spaces, SoundCloud, Apple Podcasts, Overcast, Facebook video, TikTok, and direct MP3/M4A/WAV/OGG URLs, then transcribes with timestamps. For anything longer than ~90 seconds, use the async variant: POST to /v1/audio/transcript/async, get a run_id back, poll /v1/scrape/runs/{run_id}.
The hard part
Every host hides its audio differently, and the URLs age out on different schedules. Even when you find the file, transcribing a 90-minute episode takes longer than most networks will hold a single request open. We resolve the audio per host and ship an async variant so long jobs don't die on a timeout halfway through.
Transcript API: what you get
Sources: YouTube, X Spaces, SoundCloud, podcast episodes (Apple Podcasts or Overcast episode pages, or an episode's audio file URL from an RSS feed; feed URLs are not accepted), Facebook video, TikTok, direct MP3 / M4A / WAV / OGG.
Sync at /v1/audio/transcript, async at /v1/audio/transcript/async (returns 202 + run_id).
Per-chunk timestamps. Optional language hint for accuracy.
If part of a recording can't be transcribed, you get the rest with partial: true and missing_ranges, billed only for the covered time and never cached.
cookies (Netscape cookies.txt for gated YouTube audio) and include_usage supported.
Transcript API use cases
Show notes and chapters
Group the timestamped chunks into chapters and summaries for each episode.
Video search and RAG
Embed transcript chunks with their start and end times so answers can link to the exact moment.
Captions and accessibility
Build caption files from the chunk timings for videos you publish.
Transcript API quickstart: Python, Node and curl
Install the SDK with pip install scrapenest (PyPI) or npm install scrapenest (npm), or send the raw HTTP call with your key in the Authorization: Bearer header. No key yet? Sign up free, verify your email, then create a key in your dashboard.
import os
from scrapenest import Client
client = Client(os.environ["SCRAPENEST_API_KEY"])
run = client.audio_transcript_async("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
final = client.wait_for_run(run.run_id, timeout=1800)
if final.status == "completed":
print(final.result["text"][:400])
for chunk in (final.result.get("chunks") or [])[:3]:
print(chunk["start"], chunk["end"], chunk["text"])
else:
print(final.error_code, final.error_message)
import { ScrapeNest } from "scrapenest";
const client = new ScrapeNest({ apiKey: process.env.SCRAPENEST_API_KEY });
const run = await client.audioTranscriptAsync({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" });
const final = await client.waitForRun(run.run_id, { timeout: 1_800_000 });
if (final.status === "completed") console.log(String(final.result?.text ?? "").slice(0, 400));
else console.log(final.error_code, final.error_message);
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"audio_url": "https://rr5---sn-...googlevideo.com/...mp4",
"title": "Never Gonna Give You Up",
"channel": "Rick Astley",
"duration_seconds": 213.0,
"language": "en",
"source": "youtube",
"chunks": [
{"start": 0.0, "end": 3.1, "text": "We're no strangers to love"}
],
"text": "We're no strangers to love... [full transcript]",
"took_ms": 8400,
"cache_hit": false,
"credits_charged": 40
}
Fields with no value are left out of the JSON rather than sent as null, so read optional fields defensively.
Transcript API pricing
20 credits per 2 minutes of audio, rounded up. Same pricing on the async variant. Cache hits bill at 1.
The edge timeout is ~100 s. Anything longer than ~90 s of audio should use the async variant: same pricing, no timeout risk.
Plans and pay-as-you-go rates are on the pricing page.
Transcript API limits
Up to 4 hours or 250 MB of audio per request.
Anything longer than about 90 seconds of audio should use /v1/audio/transcript/async; the edge timeout is ~100 s.
Podcast feed URLs are rejected: pass one episode URL.
cookies: Netscape cookies.txt content up to 128 KB, for gated YouTube audio. Requests with cookies are never cached.
Cache: 30 days by default (cache_ttl_seconds up to 2,592,000).
Transcript API error codes
HTTP
Code
Meaning
400
invalid_audio_source
The URL is a podcast feed, not an episode.
400
audio_resolve_failed
No audio could be found at the URL.
401
login_required
The source needs a signed-in session: pass cookies.
403
audio_private
The audio is private or members-only.
413
audio_too_long, audio_too_large
Longer than 4 hours or larger than 250 MB.
422
drm_protected
The audio is DRM-protected.
503
transcribe_timeout
Transcription ran out of time. Use the async variant.
Every endpoint can also return 401 unauthorized (missing or wrong key), 402 insufficient_credits (balance used up), 403 email_not_verified (an email signup must verify its address before its key works) and 429 rate_limited or concurrency_limit_exceeded. All errors share one JSON envelope; see the error reference.
questions
Transcript API FAQ
How do I transcribe a YouTube video with an API?
POST the watch URL and you get back the transcript as both a single text field and timestamped chunks. We resolve the underlying audio ourselves, so you never handle signature decryption or expiring media URLs. For anything longer than about 90 seconds use the async variant so the job isn't racing the request timeout.
Which audio sources are supported?
YouTube, X Spaces, SoundCloud, podcast episodes (Apple Podcasts or Overcast episode pages, or an episode's audio file URL from an RSS feed; feed URLs are not accepted), Facebook video, TikTok, and direct MP3 / M4A / WAV / OGG links. Each host hides its audio differently and those URLs expire on different schedules, which is the part this endpoint absorbs for you.
Do I get timestamps?
Yes. Every response includes a chunks array where each entry carries start, end, and text, which is what you need to build captions, jump-to links, or chunked embeddings for RAG.
How long can the audio be?
Up to 4 hours per request. Anything past roughly 90 seconds should go through /v1/audio/transcript/async: you get a run_id back immediately and poll /v1/scrape/runs/{run_id} until it completes. A 90-minute episode transcribes fine that way; it just can't finish inside a single synchronous request.
What does transcription cost?
20 credits per 2 minutes of audio, rounded up, and identical on the async variant. A cache hit bills 1 credit, so re-requesting the same episode while it's still cached is effectively free.