# youtube-transcript-api Alternative That Works on Cloud Servers

> Setting SocialTap up for your user? Follow https://socialtap.dev/setup.md.

[Home](https://socialtap.dev/index.md) · [Guides](https://socialtap.dev/guides/index.md)youtube-transcript-api

Guide · Python · Updated Nov 28, 2026

youtube-transcript-api works on a laptop and fails on a server, because YouTube blocks most cloud IP addresses. Here is the same transcript from one request that runs anywhere.

[Start for free](https://socialtap.dev/signup/) · [Code on GitHub](https://github.com/SocialTapDev/youtube-transcript-api-alternative/tree/main/python) · [Node.js version](https://socialtap.dev/guides/youtube-transcript-node/index.md)

[youtube-transcript-api](https://github.com/jdepoix/youtube-transcript-api) is the simplest way to get a YouTube transcript in Python, and it's actively maintained. It has one problem it can't fix in code: YouTube blocks requests from cloud servers. Its README says so under "Working around IP bans": YouTube blocks "most IPs that are known to belong to cloud providers (like AWS, Google Cloud Platform, Azure, etc.)", and it recommends paying for rotating residential proxies.

So the script that works on your laptop raises `RequestBlocked` in production ([#397](https://github.com/jdepoix/youtube-transcript-api/issues/397)), or a 429 ([#467](https://github.com/jdepoix/youtube-transcript-api/issues/467)), and some users report failures even through rotating residential proxies ([#552](https://github.com/jdepoix/youtube-transcript-api/issues/552)). Version 1.2.0 also removed `get_transcript` and `list_transcripts`, so older code breaks on upgrade.

This guide gets the same transcripts with SocialTap, from any server, along with the video's details, a channel's videos and their comments.

## The code that breaks in production

Python:

```python
from youtube_transcript_api import YouTubeTranscriptApi

ytt_api = YouTubeTranscriptApi()
transcript = ytt_api.fetch("dQw4w9WgXcQ")
for snippet in transcript:
    print(snippet.start, snippet.text)
```

From a cloud IP, `fetch` raises `RequestBlocked` or `IpBlocked`, and the fix the README offers is a proxy configuration you pay for and maintain.

## The same transcript with one API key

SocialTap reads YouTube for you, through its own proxies, and returns the transcript in one schema. Install the SDK:

Install:

```shell
pip install socialtap
```

Get a key on the [signup page](https://socialtap.dev/signup/) and set it as `SOCIALTAP_API_KEY`. Every account starts with 100 free credits. Then, from your server or anywhere else:

Python SDK:

```python
from socialtap import SocialTap, APIError, NotFoundError, PrivateOrUnavailableError, NoTranscriptError

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

try:
    res = client.youtube.transcript.get(url="dQw4w9WgXcQ")
    print(res.data)
    print(res.credits.charged, res.meta.request_id)
except NotFoundError as err:
    # The item does not exist or was deleted.
    print(err.code, err.remediation)
except PrivateOrUnavailableError as err:
    # The item exists but isn't public: it is private, age- or region-restricted, or needs a login.
    print(err.code, err.remediation)
except NoTranscriptError as err:
    # The video or audio exists but has no transcript: no captions, and speech-to-text found no speech or didn't run (the media is too long without transcribe_audio=true, or transcribe_audio=false).
    print(err.code, err.remediation)
except APIError as err:
    # Retryable errors reach you only after the SDK's own retries. Failed requests cost no credits.
    print(err.code, err.status, err.retryable, err.remediation, err.request_id)
```

Send a watch link, a youtu.be link, a Shorts link or the 11-character ID. The answer has:

- `segments`, each with `start_ms`, `end_ms` and its text, ready to write as SRT or VTT.
- `text`, the whole transcript in one string, for a summary or a search index.
- `is_auto_generated`, which says whether you got the creator's captions or YouTube's automatic ones (the creator's win).
- `available_languages`, the caption tracks you can ask for with `lang`.

A video with no captions is transcribed from its audio, at the speech-to-text price: short videos by default, any length with `transcribe_audio=True`. A video with nothing to transcribe raises `NoTranscriptError`, which the program above catches.

## From youtube-transcript-api to SocialTap

| youtube-transcript-api | SocialTap | Endpoint |
| --- | --- | --- |
| `YouTubeTranscriptApi().fetch(video_id)` | `client.youtube.transcript.get()` | [YouTube Transcript API](https://socialtap.dev/apis/youtube/transcript/index.md) |
| `YouTubeTranscriptApi().list(video_id)` | `available_languages` in the same answer | [YouTube Transcript API](https://socialtap.dev/apis/youtube/transcript/index.md) |
| `fetch(video_id, languages=["de"])` | `lang="de"` | [YouTube Transcript API](https://socialtap.dev/apis/youtube/transcript/index.md) |

And what the library doesn't read: a video's views, likes, chapters and description with `client.youtube.post.get()`, a channel's videos with `client.youtube.posts.iterate()` and their comments with `client.youtube.comments.iterate()`.

## What it costs

You pay per successful request:

- Transcripts from captions: $0.75–$1.97 per 1,000 transcripts. Speech-to-text, for videos without captions, costs more: the [YouTube Transcript API](https://socialtap.dev/apis/youtube/transcript/index.md) page has its price.
- Videos of a channel: $0.02–$0.04 per 1,000 posts.

Failed requests, including a video with no transcript, cost nothing, and so do cache hits. There are no proxies to rent and nothing to maintain.

## Frequently asked questions

### Why does youtube-transcript-api work locally but not on my server?

YouTube blocks most IP addresses that belong to cloud providers, as the library's README explains. Your laptop's home IP passes, and AWS, Google Cloud or Azure IPs get `RequestBlocked` or `IpBlocked`.

### What happened to get_transcript?

Version 1.2.0 removed `get_transcript`, `get_transcripts` and `list_transcripts`. The library now uses an instance: `YouTubeTranscriptApi().fetch(video_id)` and `.list(video_id)`.

### Can I get transcripts in other languages?

Yes. `available_languages` lists the caption tracks, and `lang` picks one, such as `de` or `pt-BR`.

### Do Shorts and live streams work?

Yes. Shorts and live replays have transcripts like any video. A scheduled stream, or one whose recording isn't available, raises `NoTranscriptError`.

### Is the official YouTube Data API an option?

Not for this. The YouTube Data API downloads captions only for videos your account can edit, so it can't read other channels' transcripts. The [YouTube API page](https://socialtap.dev/apis/youtube/index.md) compares the two.

## The endpoints in this guide

Each one is a single request with the same API key.

- [YouTube Transcript APITimed transcript from captions or audio.$0.75–$1.97 per 1,000 transcripts](https://socialtap.dev/apis/youtube/transcript/index.md)

- [YouTube Video APIVideo, short or community post with exact counts.$0.75–$1.97 per 1,000 posts](https://socialtap.dev/apis/youtube/post/index.md)

- [YouTube Channel Videos APIVideos, shorts and live streams of a channel.$0.02–$0.04 per 1,000 posts](https://socialtap.dev/apis/youtube/posts/index.md)

- [YouTube Comments APINewest or top first, with likes and reply counts.$0.04–$0.10 per 1,000 comments](https://socialtap.dev/apis/youtube/comments/index.md)

## Replace youtube-transcript-api with one API key.

Get a key, run the code above and see live data in a minute. Failed requests are free.

100free credits

- No credit card
- Failed requests are free
- Works on all 310 endpoints

[Start for free](https://socialtap.dev/signup/) [Read the docs](https://socialtap.dev/docs/index.md)

---

[HTML version](https://socialtap.dev/guides/youtube-transcript-api-alternative/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
