Maintained

    ytsearch.js — YouTube Search & Playlist Scraper

    TypeScript and Node.js library for YouTube search and playlist data. Search videos, channels, playlists, movies, and live streams, with video details and pagination without the YouTube Data API.

    Category
    Package
    Date
    July 15, 2023

    Technologies Used

    Node.jsnpm
    ytsearch.js — YouTube Search & Playlist Scraper

    ytsearch.js — YouTube Search & Playlist Scraper for Node.js

    Overview

    ytsearch.js is a TypeScript and Node.js library for YouTube search and playlist data. It allows developers to search YouTube videos, channels, playlists, movies, and live streams without requiring the official YouTube Data API. The library also provides YouTube video details, playlist items with pagination, sorting, result limits, and TypeScript support, making it useful for applications that need programmatic YouTube search and metadata.

    Features

    • 🔍 YouTube Search — Search videos, channels, playlists, movies, and live streams.
    • 📑 Playlist Pagination — Fetch playlist items across multiple pages.
    • 📊 Video Metadata — Retrieve detailed information for YouTube videos.
    • Lightweight API — Simple developer-friendly API with minimal dependencies.
    • 📦 Easy Installation — Install with npm install ytsearch.js.
    • 🛠️ TypeScript Support — Includes TypeScript declarations with CommonJS and ESM support.
    • 🎯 Search Options — Control result types, limits, and sorting.
    • 🔌 No YouTube Data API Key — Search publicly available YouTube data without an official API key.

    Installation

    npm install ytsearch.js
    

    Requires Node.js v14+.

    Usage

    const { searchYouTube } = require("ytsearch.js");
    
    (async () => {
      const results = await searchYouTube("Black Panther", {
        type: "video",
        limit: 10,
      });
      results.videos.forEach((item) => console.log(item.type, item.title));
    })();
    

    Example Output

    video Marvel Studios Black Panther - Official Trailer
    video Wakanda Battle - I’m Not Dead Scene - Black Panther Returns
    video Hiding in the Shadows | The Real Black Panther | National Geographic Wild UK
    video Meet The K2 Black Panther – One Of The World’s Best Tanks
    video (Black Panther) Best Action Hollywood Blockbuster Movie in Hindi
    video Black Panther - Car Chase Scene - Movie clip Epic 4K UHD
    

    Tech Stack

    • TypeScript — Type-safe library development and declarations.
    • Node.js — Core runtime environment.
    • npm — Package distribution.

    Related Project

    ytsearch-cli — YouTube Search from the Terminal

    ytsearch-cli is the command-line interface powered by ytsearch.js. It brings YouTube video, channel, and playlist search directly to the terminal with formatted output, JSON support, and interactive search.

    Status

    🛠️ Actively maintained with continuous updates — including playlist pagination, advanced metadata fetching, sortable search results, and planned API enhancements.

    Links

    Related Projects

    Discover more projects with similar technologies or categories.

    PersonalActive

    Minecraft Cat Adventure: Infinite Falling (2D)

    A real-time Phaser + Matter.js survival game where live YouTube chat and keyboard commands directly control gameplay through a resilient command queue and cooldown system.

    Phaser 3Matter.js+7
    View Project
    Full-StackActive

    ZUA Dashboard - Discord Bot Dashboard (MERN)

    A modern MERN-based Discord management dashboard for the ZUA bot, with applications, tickets, moderation tools, analytics, and webhook integrations.

    MySQLExpress.js+7
    View Project
    PackageMaintained

    ytsearch-cli — YouTube Search Command-Line Tool

    A powerful and interactive CLI tool for searching YouTube videos, channels, and playlists directly from your terminal, built on top of ytsearch.js.

    Node.jsnpm+1
    View Project