You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 21bbdf0
Browse filesBrowse the repository at this point in the historyBrowse files
Release 1.0.0: full endpoint coverage, accurate platform docs
The public docs promise the SDKs follow semver, but 0.x reserves the right to
break anything. Freeze the surface at 1.0.0 and make it match the API first.
- Add me() and transcripts.job() to both the sync and async clients, which
completes coverage of all 8 v1 endpoints.
- A 202 (no captions, so the API transcribes the audio) used to raise a Pydantic
validation error, because Transcript.kind was pinned to the literal
"transcript" while the 202 carries "transcript_job". kind is now a str and the
envelope's status/job_id/poll_url are lifted onto the model, so the documented
poll-until-done flow actually works.
- Document what the video/batch inputs really are: YouTube, TikTok, Instagram
and direct media file URLs. Behavior is unchanged, the clients always passed
the input straight through. channel/playlist/search stay described as
YouTube-only, because that is what they are.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ksoEUHvR7DHdNujkGv8UT
Copy file name to clipboardExpand all lines: README.md
+26-8Lines changed: 26 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# TranscriptFetch Python SDK
2
2
3
-
Official, typed Python client for the [TranscriptFetch](https://transcriptfetch.com) API: fetch YouTube transcripts, channels, playlists, and search results as clean, structured data. Sync + async, fully type-hinted.
3
+
Official, typed Python client for the [TranscriptFetch](https://transcriptfetch.com) API: fetch transcripts as clean, structured data, plus YouTube channel, playlist and search listings. Sync + async, fully type-hinted.
4
+
5
+
Transcripts come from **YouTube, TikTok, Instagram, or a direct media file URL** (mp3/mp4/wav and friends). Channel, playlist and search are YouTube-only, since no other supported platform has those concepts.
4
6
5
7
```bash
6
8
pip install transcriptfetch-sdk
@@ -14,7 +16,7 @@ from transcriptfetch import TranscriptFetch
14
16
# api_key falls back to the TRANSCRIPTFETCH_API_KEY env var
15
17
tf = TranscriptFetch(api_key="tf_live_...")
16
18
17
-
t = tf.transcripts.video("https://youtu.be/aircAruvnKk")
19
+
t = tf.transcripts.video("https://youtu.be/aircAruvnKk")# or a TikTok / Instagram / file URL
18
20
print(t.title)
19
21
print(t.text)
20
22
for seg in t.segments:
@@ -28,15 +30,31 @@ Get an API key (100 free credits) at <https://transcriptfetch.com/app>. One cred
28
30
## Endpoints
29
31
30
32
```python
31
-
tf.transcripts.video(video) # single transcript (text + segments)
32
-
tf.transcripts.channel(channel, limit=, cursor=) # a channel's videos (metadata)
33
-
tf.transcripts.playlist(playlist, limit=, cursor=) # a playlist's videos
33
+
tf.transcripts.video(video) # single transcript (text + segments)
34
+
tf.transcripts.batch(video_ids) # up to 50 transcripts in one call
35
+
tf.transcripts.channel(channel, limit=, cursor=) # a YouTube channel's videos (metadata)
36
+
tf.transcripts.playlist(playlist, limit=, cursor=) # a YouTube playlist's videos
tf.transcripts.batch(video_ids) # up to 50 transcripts in one call
36
-
tf.health() # unauthenticated liveness probe
38
+
tf.transcripts.job(job_id) # poll an audio-transcription job (free)
39
+
tf.me() # validate the key + read the balance (free)
40
+
tf.health() # unauthenticated liveness probe
37
41
```
38
42
39
-
`video`/`channel`/`playlist` accept URLs or raw IDs (normalized automatically).
43
+
`video` and `batch` take a YouTube, TikTok or Instagram URL, a direct media file URL, or a bare YouTube ID. `channel`/`playlist` take a URL, an `@handle`/`PL…` ID, or a raw ID. IDs and URLs are normalized automatically.
44
+
45
+
## Videos without captions
46
+
47
+
When a source has no captions, the API transcribes its audio and answers with a job instead of a transcript. That comes back as a `Transcript` with `status == "processing"` and a `job_id`; poll it for free until it completes:
48
+
49
+
```python
50
+
import time
51
+
52
+
t = tf.transcripts.video("https://www.tiktok.com/@user/video/7137723462233555205")
description = "Official Python SDK for the TranscriptFetch API: fetch YouTube transcripts, channels, playlists, and search as clean, typed data."
8
+
description = "Official Python SDK for the TranscriptFetch API: fetch transcripts from YouTube, TikTok, Instagram and direct media URLs as clean, typed data."
9
9
readme = "README.md"
10
10
license = "MIT"
11
11
requires-python = ">=3.9"
12
12
authors = [{ name = "TranscriptFetch", email = "support@transcriptfetch.com" }]
0 commit comments