Repository navigation
Add GetYouTubeTranscript adapter - #1819
Open
pushkarsingh32 wants to merge 1 commit into
Open
pushkarsingh32 wants to merge 1 commit into
pushkarsingh32 wants to merge 1 commit into
Conversation
REST adapter for the GetYouTubeTranscript API (https://getyoutubetranscript.com/api/v1), as discussed in HelpCode-ai#1810. One API key, sent as the x-api-key header. Six read-only GET tools: transcript (optional timestamps and translation), caption languages, YouTube search, a channel's latest uploads, playlist videos, and the credit balance. The free /credits call is the setup probe, so the install check spends no credit. verifyHints cover 401 and 429. The spec checks the base URL, auth header, routes, that every declared parameter reaches the query, and the probe; live calls run behind RUN_GETYOUTUBETRANSCRIPT_LIVE=1. Catalog regenerated, counts bumped to 958, llms.txt regenerated, logo added under public/logos/connectors.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1810
Adds a REST adapter for the GetYouTubeTranscript API (
https://getyoutubetranscript.com/api/v1), following the REST route suggested in #1810. The user pastes one API key; it is sent as thex-api-keyheader.Tools
All GET, all read-only. Every successful call costs 1 credit except
getyoutubetranscript_get_credits, which is free.getyoutubetranscript_get_transcriptGET /transcript?v=&language=×tamps=&translate=timestamps=trueadds per-line segments;translatemachine-translates itgetyoutubetranscript_list_languagesGET /transcript/languages?v=getyoutubetranscript_searchGET /search?q=&type=&country=&language=&limit=&page_token=continuation_tokengetyoutubetranscript_get_channel_latestGET /channel/latest?channel=getyoutubetranscript_list_playlist_videosGET /playlist?list=&continuation=continuation_tokengetyoutubetranscript_get_creditsGET /creditsEndpoints, parameters and answer shapes are taken from the public spec at https://getyoutubetranscript.com/openapi.json.
Setup check
probe:getyoutubetranscript_get_creditswith no parameters. It costs no credit, so the install check never spends the user's balance.verifyHints:401(wrong or revoked key, where to create a new one) and429(plan rate limit).envVarMeta.GETYOUTUBETRANSCRIPT_API_KEY: secret, links to https://getyoutubetranscript.com, pattern^sk_live_[A-Za-z0-9_-]{20,}$(keys start withsk_live_).{success: false, code, message}body, so noerrorWhenrule is needed.Other files
packages/frontend/public/logos/connectors/getyoutubetranscript.svg.catalog.tsregenerated, adapter counts bumped 957 to 958,llms.txtandllms-full.txtregenerated.getyoutubetranscript.live.spec.ts: static checks (base URL, auth header, routes, every declared parameter reaches the query, all GET, probe, every tool named in the instructions) that always run, plus a live part behindRUN_GETYOUTUBETRANSCRIPT_LIVE=1(without a key it only checks that/creditsanswers 401MISSING_API_KEY; withGETYOUTUBETRANSCRIPT_API_KEYit reads the balance and one transcript, 1 credit).Validation
Run locally on this branch:
node scripts/validate-adapters.mjs:Validated 976 adapters: 976 passed, 0 failed.With--warn, no warning names this adapter.node scripts/adapter-count.mjs --check:OK: every quoted count equals 958 adapters (51 keyless, 20022 tools).node scripts/generate-llms-txt.mjs --check: exit 0.node scripts/regenerate-catalog.mjs: the committedcatalog.tsmatches.node --test scripts/validate-adapters.test.mjs scripts/adapter-new.test.mjs scripts/generate-llms-txt.test.mjs: 73 pass, 0 fail.npx jest src/adapters/intl/getyoutubetranscript(packages/backend): 7 passed, 2 skipped (live part).RUN_GETYOUTUBETRANSCRIPT_LIVE=1 npx jest src/adapters/intl/getyoutubetranscript, no key: 8 passed, 1 skipped (/creditsanswered 401MISSING_API_KEY).npx jest src/adapters/catalog.spec.ts src/adapters/catalog-summary.spec.ts: 23294 passed.npx jest src/mcp-server/catalog-patterns: 12 passed (the key pattern passes the slow-regex check).npx eslint src/adapters/intl/getyoutubetranscript.live.spec.ts: clean.I can test it against a real account once it is in a build, as offered in #1810.