Audio transcript

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.

What it does

  • Sources: YouTube, X Spaces, SoundCloud, Apple Podcasts, Overcast, 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.
  • `cookies` (Netscape cookies.txt for gated YouTube audio) and `include_usage` supported.

Send a call

curl -X POST https://scrapenest.dev/v1/audio/transcript/async \
  -H "Authorization: Bearer sn_••••" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }'

Request body

{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "language": "en"
}

Response shape

{
  "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
}

What it costs

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.

questions

Audio transcript 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 yt-dlp, 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, Apple Podcasts, Overcast, 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?

There's no fixed length cap, but 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.