A REST API wrapper for yt-dlp.
This REST API provides a simple way to fetch YouTube comments using yt-dlp. It downloads yt-dlp and ffmpeg on startup and provides an endpoint to retrieve comments for a given video ID.
- .NET SDK
- Docker (optional)
-
Clone the repository:
git clone <repository_url>
-
Navigate to the project directory:
cd yt-dlp-rest-server -
Build the project:
dotnet build
-
Run the project:
dotnet run
The service will be available at
http://localhost:<port>.
-
Build the Docker image:
docker build -t yt-dlp-rest-server . -
Run the Docker container:
docker run --name yt-dlp-rest-server-container -p 8038:8080 -d yt-dlp-rest-server
The service will be available at
http://localhost:8038.
Fetches YouTube comments for the given video ID.
videoId: The ID of the YouTube video.
GET /api/comments/GPMu_iEO5hs
[
{
"Id": "Ugw...",
"Author": "TechLead",
"AuthorId": "@TechLead",
"AuthorThumbnail": "https://...",
"Html": "This is a great video! I learned a lot.",
"Text": "This is a great video! I learned a lot.",
"Timestamp": 1678886400,
"Parent": "",
"LikeCount": 100,
"DislikeCount": 10,
"IsFavorited": false,
"AuthorIsUploader": false
}
]