Data
Video Details
Fetch detailed normalized metadata for a YouTube video by ID with getVideoDetails.
js
import { getVideoDetails } from "ytsearch.js";
const video = await getVideoDetails("dQw4w9WgXcQ");
console.log(video.title);
console.log(video.channel.name);
console.log(video.views);The returned VideoDetailsResult contains title, description, duration, views, upload date, channel information, likes, privacy flags, category and rating information.