{"id":16432558,"url":"https://github.com/0x6a69616e/youtube-transcript-api","last_synced_at":"2025-03-16T17:35:43.247Z","repository":{"id":195219168,"uuid":"692493526","full_name":"0x6a69616e/youtube-transcript-api","owner":"0x6a69616e","description":"A YouTube video transcript extractor based on reverse-engineered youtubetranscript.com","archived":false,"fork":false,"pushed_at":"2024-05-27T05:49:32.000Z","size":57,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-17T20:54:03.490Z","etag":null,"topics":["captions","node","nodejs","subtitles","youtube","youtube-transcript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/youtube-transcript-api","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0x6a69616e.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-16T16:43:31.000Z","updated_at":"2024-09-13T01:37:35.000Z","dependencies_parsed_at":"2023-09-17T03:22:22.305Z","dependency_job_id":"6e15d1cf-899c-42fd-aa89-246cc8a3faff","html_url":"https://github.com/0x6a69616e/youtube-transcript-api","commit_stats":null,"previous_names":["0x6a69616e/youtube-transcript","0x6a69616e/youtube-transcript-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x6a69616e%2Fyoutube-transcript-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x6a69616e%2Fyoutube-transcript-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x6a69616e%2Fyoutube-transcript-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x6a69616e%2Fyoutube-transcript-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x6a69616e","download_url":"https://codeload.github.com/0x6a69616e/youtube-transcript-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221217617,"owners_count":16778804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["captions","node","nodejs","subtitles","youtube","youtube-transcript"],"created_at":"2024-10-11T08:43:46.072Z","updated_at":"2024-10-27T11:01:28.209Z","avatar_url":"https://github.com/0x6a69616e.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# youtube-transcript-api\n\u003e A YouTube video transcript extractor based on reverse-engineered youtubetranscript.com\n\n## Limitations\n- Subtitles are unretrievable for private videos.\n- No multilanguage transcript support; extractor uses the default language of a given video.\n\n## Installation\n```sh\n$ npm install youtube-transcript-api\n```\n\n## Documentation\nImport the library into your project like so. Both CJS and ESM are supported.\n```js\nimport TranscriptAPI from 'youtube-transcript-api';\n// =\u003e TranscriptAPI\n```\n\n### class TranscriptAPI\n\n#### .getTranscript(*videoID*, [*config*])\nGets the transcript of a YouTube video. If the provided video is inaccessible or does not have captions, error \"transcripts disabled for that video\" will be thrown.\n\n- `videoID`: The YouTube video ID\n- `config` (optional): Request configurations for the Axios HTTP client. See available options [here](https://axios-http.com/docs/req_config)\n\nreturns `Array`\n\n```js\n\u003e\u003e\u003e TranscriptAPI.getTranscript('dQw4w9WgXcQ').then(console.log);\n\n[\n  {\n    \"text\": \"[Music]\",\n    \"start\": \"0.0\",\n    \"duration\": \"14.65\"\n  },\n  {\n    \"text\": \"we're no strangers to\",\n    \"start\": \"18.8\",\n    \"duration\": \"7.239\"\n  },\n  {\n    \"text\": \"love you know the rules and so do\",\n    \"start\": \"21.8\",\n    \"duration\": \"7.84\"\n  },\n  {\n    \"text\": \"I I full commitments while I'm thinking\",\n    \"start\": \"26.039\",\n    \"duration\": \"5.201\"\n  },\n  {\n    \"text\": \"of\",\n    \"start\": \"29.64\",\n    \"duration\": \"5.88\"\n  },\n  {\n    \"text\": \"you wouldn't get this from any other guy\",\n    \"start\": \"31.24\",\n    \"duration\": \"8.2\"\n  },\n  ...\n]\n```\n\n#### .validateID(*videoID*, [*config*])\n**Utilizes the discontinued [video.google.com/timedtext](https://video.google.com/timedtext?lang=en-US\u0026v=dQw4w9WgXcQ\u0026fmt=vtt) endpoint.*\n\nChecks if a video with the specified ID exists on YouTube. Use is recommended when it is necessary to differentiate between a video that does not exist and one that lacks a transcript.\n- `videoID`: The YouTube video ID\n- `config` (optional): Request configurations for the Axios HTTP client. See available options [here](https://axios-http.com/docs/req_config)\n\nreturns `boolean`\n\n```js\n\u003e\u003e\u003e TranscriptAPI.validateID('dQw4w9WgXcQ').then(console.log);\n\ntrue\n```\n```js\n\u003e\u003e\u003e TranscriptAPI.validateID('somenonexistentvideoid').then(console.log);\n\nfalse\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x6a69616e%2Fyoutube-transcript-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x6a69616e%2Fyoutube-transcript-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x6a69616e%2Fyoutube-transcript-api/lists"}