{"id":14979868,"url":"https://github.com/mikeesto/youtube-subtitle-transcript","last_synced_at":"2025-07-17T00:07:03.402Z","repository":{"id":212028169,"uuid":"730519783","full_name":"mikeesto/youtube-subtitle-transcript","owner":"mikeesto","description":"This library fetches transcripts of YouTube videos. It leverages YouTube's built-in captions and parses them into a friendly JSON format.","archived":false,"fork":false,"pushed_at":"2024-07-03T05:23:18.000Z","size":61,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T20:27:44.872Z","etag":null,"topics":["captions","javascript","subtitles","transcripts","typescript","youtube"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/mikeesto.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-12-12T05:21:44.000Z","updated_at":"2025-05-20T19:30:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"9edddba7-e655-4b93-9e95-ade0a96858e0","html_url":"https://github.com/mikeesto/youtube-subtitle-transcript","commit_stats":null,"previous_names":["mikeesto/youtube-subtitle-transcript"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mikeesto/youtube-subtitle-transcript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Fyoutube-subtitle-transcript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Fyoutube-subtitle-transcript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Fyoutube-subtitle-transcript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Fyoutube-subtitle-transcript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeesto","download_url":"https://codeload.github.com/mikeesto/youtube-subtitle-transcript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Fyoutube-subtitle-transcript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265253398,"owners_count":23735094,"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","javascript","subtitles","transcripts","typescript","youtube"],"created_at":"2024-09-24T14:00:48.935Z","updated_at":"2025-07-17T00:07:03.379Z","avatar_url":"https://github.com/mikeesto.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube Subtitle Transcript\n\nThis library fetches transcripts of YouTube videos. It leverages YouTube's built-in captions and parses them into a friendly JSON format.\n\n## Installation\n\n`npm install youtube-subtitle-transcript`\n\n## Usage\n\n```ts\nimport { fetchTranscript } from \"youtube-subtitle-transcript\";\n\nconst { transcript, error } = await fetchTranscript(\"dQw4w9WgXcQ\");\nconsole.log(transcript);\n```\n\n## API Reference\n\n```ts\nfetchTranscript(videoId: string, languageCode?: string): Promise\u003cFetchTranscriptResult\u003e\n```\n\n- `videoId`: YouTube video ID (required).\n- `languageCode`: Language code for the transcript (defaults to \"en\"). The library will always return manually created transcripts over automatically generated ones.\n- Returns a Promise resolving to a `FetchTranscriptResult` object.\n\n`FetchTranscriptResult` interface\n\n- `transcript`: An array of `TranscriptEntry` objects. If no transcript can be found, the array will be empty.\n- `error`: An optional error message that will be present when a transcript cannot be found. Primarily to assist with debugging.\n\n`TranscriptEntry` interface\n\n- `text`: The transcript text content.\n- `start`: Starting time of the transcript segment in seconds (e.g. \"1.23\").\n- `end`: Ending time of the transcript segment in seconds (e.g. \"2.34\").\n- `duration`: Duration of the transcript segment in seconds (e.g. \"1.11\").\n\n## Credit\n\nThis library was highly inspired by [youtube-transcript-api](https://github.com/jdepoix/youtube-transcript-api). It is written in Python and has a lot more features than this one.\n\n## License and disclaimer\n\nMIT. This library uses undocumented parts of the YouTube API. It may break tomorrow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeesto%2Fyoutube-subtitle-transcript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeesto%2Fyoutube-subtitle-transcript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeesto%2Fyoutube-subtitle-transcript/lists"}