URL:
POST /youtube/
Description:
This endpoint offers a comprehensive overview of metadata for a YouTube video. By supplying the YouTube video URL, users can gain access to data such as the video’s title, uploader, description, duration, available formats, thumbnails, view count, and much more.
Potential Use Cases:
Request Payload:
url
(required): The direct link to the YouTube video, typically in the format https://www.youtube.com/watch?v=videoID
.Sample Request:
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
Response Format:
Returns a JSON object containing detailed metadata:
title
: The title of the video.uploader
: The channel or user that uploaded the video.description
: A summary of the video’s content.duration
: The duration of the video, given in seconds.formats
: An array detailing available formats, encompassing resolution, codec, etc.thumbnail
: A URL to the video’s thumbnail.view_count
: The number of times the video has been viewed.like_count
: The number of likes the video has garnered.dislike_count
: The count of dislikes for the video.comments
: A selection or total count of user comments.tags
: An array of tags linked to the video.Sample Response:
{
"title": "Example Video Title",
"uploader": "Example Channel",
"description": "This is a sample description.",
"duration": 605,
"formats": [...],
"thumbnail": "https://example.com/thumbnail.jpg",
"view_count": 123456,
"like_count": 7890,
"dislike_count": 123,
"comments": [...],
"tags": ["sample", "video", "example"]
}
Error Codes:
404 Not Found
: Implies the given URL doesn’t match a valid YouTube video or the video was not found.500 Internal Server Error
: Signifies an unexpected error during request processing.