This API allows you to download specific segments of YouTube videos by specifying a start timestamp and duration. It's based on ytdl-core (DisTube version), fluent-ffmep, ffmpeg-static and Nest Framework
https://yt-clip-downloader.koyeb.app
$ npm install
# development
$ npm run start
# watch mode
$ npm run dev
# production mode
$ npm run start:prod
The Swagger definition for this API is available here
-
Endpoint:
GET /download-clip
-
Query Parameters:
Parameter | Type | Description | Required |
---|---|---|---|
videoURL | string | YouTube video URL | yes |
start | number | Start time in seconds | yes |
duration | number | Clip duration in seconds | yes |
- Example:
curl -X 'GET' \
'http://localhost:3000/download-clip?videoURL=https://youtu.be/dQw4w9WgXcQ&start=60&duration=30' \
-H 'accept: application/json'
-
Endpoint:
GET /video-infos
-
Query Parameters:
Parameter | Type | Description | Required |
---|---|---|---|
videoURL | string | YouTube video URL | yes |
- Example:
curl -X 'GET' \
'http://localhost:3000/video-info?videoURL=https://youtu.be/dQw4w9WgXcQ' \
-H 'accept: application/json'