https://github.com/adidoes/youtube-fetch-transcript
Fetch transcript from a YouTube video
https://github.com/adidoes/youtube-fetch-transcript
transcript youtube
Last synced: 12 months ago
JSON representation
Fetch transcript from a YouTube video
- Host: GitHub
- URL: https://github.com/adidoes/youtube-fetch-transcript
- Owner: adidoes
- License: mit
- Created: 2023-10-02T14:16:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T19:22:46.000Z (over 2 years ago)
- Last Synced: 2025-02-11T23:07:49.644Z (about 1 year ago)
- Topics: transcript, youtube
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/youtube-fetch-transcript
- Size: 48.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# youtube-fetch-transcript
[](https://badge.fury.io/js/youtube-fetch-transcript)
Fetch transcript from a YouTube video.
This package uses internal APIs so it can be broken over the time if no update appears.
## Usage
```js
import { fetchTranscript } from "youtube-fetch-transcript";
const segments = await fetchTranscript("dQw4w9WgXcQ");
// segments [
// { text: '[Music]', duration: 14650, offset: 0 },
// { text: 'thank you', duration: 5701, offset: 16699 },
// { text: "we're no strangers to love", duration: 7401, offset: 18779 },
// ...
// ]
```
### Methods
- fetchTranscript(videoId: string [,options: TranscriptConfig]): Promise;
## Contribution
PRs are welcome. Testing and coding guidlines are still in the works so I will try to get those created at a later point. Try to keep similar code syntax to the rest of the code.
## Credits
This is a fork of the `youtube-transcript` module created by @Kakulukian but uses native `fetch` for requests.
View the original project on [NPM](https://www.npmjs.com/package/youtube-transcript).
## License
Distributed under MIT License (`The MIT License`).
See [LICENSE](LICENSE) for more information.