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-py

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.1.0.tar.gz (17.1 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.1.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yt_search_py-1.1.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yt_search_py-1.1.0.tar.gz
Algorithm Hash digest
SHA256 cd2203f7bae1a2252c8af13e7345692a2c8ddcf43665ff78a12457faa3982415
MD5 fb0e0bb2fe1ec0aad9b30dabe992f0de
BLAKE2b-256 8d1e139bce22eada3f03ca35d2e4efa11bf82083e34bd0fd3aea6ccaef93b407

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_search_py-1.1.0.tar.gz:

Publisher: publish.yml on sparrow9616/yt-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: yt_search_py-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yt_search_py-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d05346cdb1aaf56a4b4a59989a684e0297407746410b3629f91e38103fe82388
MD5 de1d9d38e84f21edb9ebccec44268d6e
BLAKE2b-256 b5fd7b2760ba914560f203207c304ff15bd636acd308cd0258871641cf40faea

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_search_py-1.1.0-py3-none-any.whl:

Publisher: publish.yml on sparrow9616/yt-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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