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:prodThe Swagger definition for this API is available here
-
Endpoint:
GET /download-clip -
Query Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
| ytLink | 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?ytLink=https://youtu.be/dQw4w9WgXcQ&start=60&duration=30' \
-H 'accept: application/json'
-
Endpoint:
GET /info -
Query Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
| ytLink | string | YouTube video URL | yes |
- Example:
curl -X 'GET' \
'http://localhost:3000/video-info?ytLink=https://youtu.be/dQw4w9WgXcQ' \
-H 'accept: application/json'