# Fix "YouTubeTranscriptApi has no attribute get_transcript"

Source: https://transcript-yt.com/blog/youtube-transcript-api-get-transcript-attributeerror · Updated 2026-11-10 · TranscriptYT

> youtube-transcript-api 1.2 removed get_transcript and list_transcripts. Create an instance and call fetch() or list() instead, and read snippets as attributes or call to_raw_data().

Code that worked for years now fails with AttributeError: type object 'YouTubeTranscriptApi' has no attribute 'get_transcript'. Nothing is wrong with your video. Version 1.2 of the youtube-transcript-api package removed the old static methods, and every tutorial written before 2025 still uses them.

## The error

Any call to the old class-level methods fails the same way, whatever the video:

```
from youtube_transcript_api import YouTubeTranscriptApi

YouTubeTranscriptApi.get_transcript("5f3Pn-N6yLc")
# AttributeError: type object 'YouTubeTranscriptApi' has no attribute 'get_transcript'

YouTubeTranscriptApi.list_transcripts("5f3Pn-N6yLc")
# AttributeError: type object 'YouTubeTranscriptApi' has no attribute 'list_transcripts'
```

## The fix: create an instance and call fetch()

fetch() takes the same video ID and languages list. It returns a FetchedTranscript; to_raw_data() turns it into exactly what get_transcript used to return, so the rest of your code keeps working.

```
from youtube_transcript_api import YouTubeTranscriptApi

ytt = YouTubeTranscriptApi()

# Before: YouTubeTranscriptApi.get_transcript(video_id, languages=["en"])
transcript = ytt.fetch("5f3Pn-N6yLc", languages=["en"]).to_raw_data()
# [{'text': '...', 'start': 1.36, 'duration': 1.68}, ...]

# Before: YouTubeTranscriptApi.list_transcripts(video_id)
for t in ytt.list("5f3Pn-N6yLc"):
    print(t.language_code, t.is_generated)
```

## Old to new, method by method

- get_transcript(id, languages) → YouTubeTranscriptApi().fetch(id, languages).to_raw_data()
- list_transcripts(id) → YouTubeTranscriptApi().list(id)
- get_transcripts([ids]) → a loop over fetch(); the batch method is gone
- proxies={...} on each call → YouTubeTranscriptApi(proxy_config=GenericProxyConfig(...)) once
- snippet["text"] → snippet.text (or index into to_raw_data())

## The next error: 'FetchedTranscriptSnippet' object is not subscriptable

If you switch to fetch() but keep reading each line as a dict, you get TypeError: 'FetchedTranscriptSnippet' object is not subscriptable. Either read attributes (snippet.text, snippet.start, snippet.duration) or call to_raw_data() once, as above.

## Or skip the library's upkeep

The library tracks YouTube's private endpoints, so it changes when YouTube does, and on cloud servers it is blocked by IP. A hosted API keeps one stable HTTP contract: the [TranscriptYT API](https://transcript-yt.com/api) returns the same text, start, and duration fields, works from any server, and transcribes videos without captions with AI. The first 100 transcripts are free and failed requests aren't billed.

```
import os, requests

res = requests.get(
    "https://transcript-yt.com/v1/transcript",
    params={"url": "5f3Pn-N6yLc", "language": "en"},
    headers={"Authorization": f"Bearer {os.environ['TRANSCRIPTYT_KEY']}"},
    timeout=120,
)
res.raise_for_status()
transcript = res.json()["segments"]  # [{'text', 'start', 'duration'}, ...]
```

## FAQ

### Why does youtube-transcript-api say it has no attribute get_transcript?

Version 1.2 removed the static methods get_transcript, get_transcripts, and list_transcripts. Create an instance with YouTubeTranscriptApi() and call fetch(video_id) or list(video_id) on it.

### What replaced YouTubeTranscriptApi.get_transcript?

YouTubeTranscriptApi().fetch(video_id, languages=["en"]). It returns a FetchedTranscript object; call .to_raw_data() on it to get the old list of dicts with text, start, and duration.

### Why do I get 'FetchedTranscriptSnippet' object is not subscriptable?

fetch() returns snippet objects, not dicts. Use snippet.text and snippet.start instead of snippet["text"], or convert the whole transcript with to_raw_data().

### Can I pin the old version instead?

pip install "youtube-transcript-api<1.2" keeps get_transcript working, but older versions miss fixes for YouTube's changes and fail more often. Migrating is a few lines.

### Does the new version fix RequestBlocked errors on servers?

No. The API change is unrelated to IP blocking. On AWS, Google Cloud, and other servers, YouTube still blocks the requests; see the RequestBlocked guide for the fixes.
