Skip to main content

Lightweight YouTube search library with async support - Search for videos, channels, playlists and get playlist details

Project description

YT Search

A lightweight, modern YouTube search library with async/await support. Search for videos, channels, playlists, and retrieve complete playlist information with ease.

PyPI version Python License

Features

Search Functionality

  • 🎥 Search for videos with filters
  • 👤 Search for channels
  • 📝 Search for playlists
  • 🔍 Custom search with sorting options
  • 🔄 Pagination support

Playlist Features

  • 📋 Get full playlist information with videos
  • ℹ️ Get playlist metadata only
  • 🎬 Get playlist videos only
  • ♾️ Pagination for large playlists (100+ videos)

Modern API

  • ⚡ Async/await support
  • 🎯 Type hints
  • 🚀 Fast and lightweight
  • 🛡️ No API key required

Installation

pip install yt-search

Quick Start

Search for Videos

import asyncio
from ytSearch import VideosSearch

async def main():
    search = VideosSearch('Python tutorials', limit=5)
    result = await search.next()
    
    for video in result['result']:
        print(f"{video['title']} - {video['link']}")

asyncio.run(main())

Get Playlist Information

import asyncio
from ytSearch import Playlist

async def main():
    # Get full playlist with videos
    playlist = await Playlist.get('https://www.youtube.com/playlist?list=PLRBp0Fe2GpgmsW46rJyudVFlY6IYjFBIK')
    
    print(f"Playlist: {playlist['info']['title']}")
    print(f"Videos: {len(playlist['videos'])}")

asyncio.run(main())

Requirements

  • Python 3.7+
  • httpx >= 0.28.1

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yt_search_py-1.0.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_search_py-1.0.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file yt_search_py-1.0.0.tar.gz.

File metadata

  • Download URL: yt_search_py-1.0.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for yt_search_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fda0ad25ef9e83703d7ea35ef213f2054fb4b3ae0421a0cec87767d480064038
MD5 66c74ef9dd4fc6d19c964cc561260c00
BLAKE2b-256 efd6d5be440c171a7cf9eb447555c6bf9de85071508759afb34e2dcd735a2d98

See more details on using hashes here.

File details

Details for the file yt_search_py-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: yt_search_py-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for yt_search_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07637dc8bc0e4a240a79763b8d5dbf38368613af084e80b686b983e1650e9c2f
MD5 2d6376c37c1dc6a78b39f35956b81afa
BLAKE2b-256 0cee53453da8aeb68568717640374759634073024ece8732a0b1fd7ade823c64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page