Skip to content

feat: Add official YouTube Data API as a transcript fallback - #1

Merged
labib2002 merged 1 commit into
mainfrom
feature/add-official-api-fallback
Sep 30, 2025
Merged

feat: Add official YouTube Data API as a transcript fallback#1
labib2002 merged 1 commit into
mainfrom
feature/add-official-api-fallback

Conversation

@labib2002

Copy link
Copy Markdown
Owner

This commit introduces a fallback mechanism for fetching YouTube video transcripts.

The primary method uses an unofficial client (youtubei.js). If this method fails, the extension now attempts to fetch the transcript using the official YouTube Data API v3.

This involves:

  • A new function fetchTranscriptWithOfficialApi that uses the captions.list and captions.download endpoints.
  • Updated handler functions (handleCopyTranscript and handleSummarizeInStudio) to include the fallback logic.
  • A placeholder for the user's YouTube Data API key, as this is required for the official API and cannot be managed within this environment.

This commit introduces a fallback mechanism for fetching YouTube video transcripts.

The primary method uses an unofficial client (`youtubei.js`). If this method fails, the extension now attempts to fetch the transcript using the official YouTube Data API v3.

This involves:
- A new function `fetchTranscriptWithOfficialApi` that uses the `captions.list` and `captions.download` endpoints.
- Updated handler functions (`handleCopyTranscript` and `handleSummarizeInStudio`) to include the fallback logic.
- A placeholder for the user's YouTube Data API key, as this is required for the official API and cannot be managed within this environment.
@labib2002
labib2002 merged commit 89d3606 into main Sep 30, 2025
@labib2002
labib2002 deleted the feature/add-official-api-fallback branch September 30, 2025 17:49
labib2002 added a commit that referenced this pull request Jul 10, 2026
feat: Add official YouTube Data API as a transcript fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant