@akukodein/tubyx v0.0.2
@akukodein/tubyx
@akukodein/tubyx is a simple, lightweight library to scrape YouTube video metadata like title, views, likes, comments, and more — without needing an API key.
⭐ Features
- Retrieve metadata such as:
- Video Title
- Duration
- View Count
- Like Count
- Comment Count
- Author (Channel)
- Upload Date
- and much more!
- No API key required — avoid quota limits
- Fast and easy to use
📦 Installation
Install @akukodein/tubyx using your favorite package manager:
# NPM
npm install @akukodein/tubyx
# Yarn
yarn add @akukodein/tubyx
# PNPM
pnpm add @akukodein/tubyx⚙️ Usage
Here’s a basic example of how to use @akukodein/tubyx:
import { Tubyx } from '@akukodein/tubyx';
async function main() {
const videoId = '5v6u_U6QRQA';
const metadata = await Tubyx({ videoId });
console.log(metadata);
}
main().catch(console.error);Replace videoId with any valid YouTube video ID.
✅ Output Example
{
shortlink: 'https://youtu.be/5v6u_U6QRQA',
link: 'https://www.youtube.com/watch?v=5v6u_U6QRQA',
title: 'Wonders of Indonesia | The Most Amazing Places in Indonesia | Travel Video 4K',
thumbnail: 'https://i.ytimg.com/vi/5v6u_U6QRQA/maxresdefault.jpg',
thumbnailWidth: 1280,
thumbnailHeight: 720,
duration: '38.11',
durationMs: 2291000,
keywords: [
'video',
'sharing',
'camera phone',
'video phone',
'free',
'upload'
],
description: "In today's video, we take you on an unforgettable adventure through the enchanting archipelago of Indonesia. 🇮🇩 From the bustling metropolis of Jakarta to the tranquil shores of Bali, come along as we explore the rich history, vibrant cultures, and stunning natural beauty that make Indonesia a truly magical destination.\n" +
'\n' +
'✨ Experience the awe-inspiring majesty of Borobudur and Prambanan temples, the picturesque rice terraces of Ubud, and the dynamic urban vibes of Yogyakarta. Dive into the crystal-clear waters of the Raja Ampat Islands and discover the unique traditions of the Toraja people in Sulawesi. Marvel at the dramatic landscapes of Mount Bromo and Mount Rinjani, and lose yourself in the colorful markets of Bandung.\n' +
'\n' +
'Share your favorite Indonesian experiences in the comments below – we’d love to hear your stories! Selamat jalan and happy travels!\n' +
'\n' +
'#Indonesia #DiscoverIndonesia #IndonesianAdventure #TravelVlog #Jakarta #Bali #Borobudur #RajaAmpat #Ubud\n' +
'\n' +
'Thank you for watching! 🙏\n' +
'\n' +
'00:00 Intro\n' +
'00:57 Fun facts about Indonesia\n' +
'05:11 Jakarta\n' +
'09:52 Belitung Island\n' +
'13:02 Yogyakarta\n' +
'16:19 Mount Bromo \n' +
'19:03 Bali\n' +
'22:02 Gili Islands \n' +
'24:37 Lombok\n' +
'26:59 Wakatobi National Park \n' +
'29:32 Sulawesi\n' +
'32:27 Raja Ampat \n' +
'34:56 Kalimantan\n' +
'37:00 Outro',
author: {
name: 'Top Travel',
avatar: 'https://yt3.ggpht.com/PScgROKeIxam3wANQ6CexipUHjPsGioiGAdUwyw95X3fGh7vGgk2TkXTyntXur33D74d2kmTig=s48-c-k-c0x00ffffff-no-rj',
subscribers: '286K',
url: 'http://www.youtube.com/@TopTravel_YT'
},
uploadDate: 'Jul 20, 2024',
relativeDate: '9 months ago',
views: '1,690,743',
viewsShort: '1.6M',
likes: '16K',
comments: '984'
}📘 API
The main function is:
Tubyx({ videoId: string }): Promise<Metadata>Parameters
- videoId (required): The YouTube video ID (e.g., x8zFL-0rBAw)
Returns
A Promise that resolves to an object containing:
shortlink: A shortened YouTube URL
link: Full YouTube URL
title: Video title
thumbnail: Thumbnail image URL
duration: Duration (formatted as mm:ss)
durationMs: Duration in milliseconds
views: Formatted view count
likes: Formatted like count
comments: Number of comments
keywords: Array of tags/keywords
description: Full description text
author: Channel info (name, URL, avatar)
uploadDate: Publish date
relativeDate: Human-friendly time (e.g., "9 months ago")
⚠️ Disclaimer
@akukodein/tubyx is developed for educational and personal use only.
This tool does not harm, interfere with, or manipulate any of YouTube’s services.
It does not bypass paywalls or access restricted/private content.
It simply retrieves publicly available metadata from YouTube pages, similar to what a browser sees.
No official APIs are called, and no terms of service are violated.
Please use responsibly and respect content creators and platform terms.
Do not use this tool for piracy, data scraping at scale, or any kind of abuse.
Let's build ethically and support open-source in the right spirit.