Skip to content

CertifiedCoders/ytlookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 ytlookup

Blazing-fast async YouTube search library

Python Version License GitHub Stars PyPI Version

✨ Why ytlookup?

  • ⚑ Blazing fast: Typical response time is around 50-100ms with optimized InnerTube requests.
  • πŸ” No API key needed: Zero setup, no quotas, and no external credential configuration.
  • 🎯 Simple developer experience: Clean async API with typed return structures and predictable fields.
  • πŸš€ Production-ready by design: Includes robust parsing, fallback handling, and stable response formatting.
  • 🐍 Modern Python support: Works on Python 3.8-3.14 with a minimal dependency footprint (aiohttp).

πŸ“¦ Installation

Quick Install

pip install ytlookup

From Source

git clone https://github.com/CertifiedCoders/ytlookup
cd ytlookup
pip install -e .

Requirements: Python 3.8+ and aiohttp

πŸš€ Quick Start

Get Video Information (Fast Mode)

import asyncio
from ytlookup import Video

async def main():
    # Lightning fast - ~50ms response time! ⚑
    video = await Video.get("dQw4w9WgXcQ")
    
    print(f"πŸ“Ή {video['title']}")
    print(f"πŸ‘€ {video['channel']['name']}")
    print(f"πŸ‘οΈ  {video['viewCount']['short']}")
    print(f"⏱️  {video['duration']['text']}")

asyncio.run(main())

Get Complete Information (With Extras)

import asyncio
from ytlookup import Video

async def main():
    # Includes publishedTime and may include likes (~500ms)
    video = await Video.get("dQw4w9WgXcQ", fetch_extras=True)
    if not video:
        print("Video not found")
        return

    print(f"πŸ“… Published: {video.get('publishedTime', 'N/A')}")
    likes = video.get("likesCount", {}).get("short", "N/A")
    print(f"πŸ‘ Likes: {likes}")

asyncio.run(main())

Search YouTube Videos

import asyncio
from ytlookup import videosearch

async def main():
    # Search with metadata
    videos = await videosearch("Python tutorial", limit=5)

    for video in videos:
        print(f"🎬 {video['title']}")
        print(f"   πŸ“Š {video['viewCount']['short']} β€’ {video['duration']['text']}")
        print(f"   πŸ”— {video['url']}\n")

asyncio.run(main())

Get Playlist Information

import asyncio
from ytlookup import Playlist

async def main():
    # Fetch playlist with videos
    playlist = await Playlist.get("PLxxx...", limit=10)
    if not playlist:
        print("Playlist not found")
        return

    print(f"πŸ“‹ {playlist['title']}")
    print(f"🎬 {playlist['videoCount']} videos")
    print(f"πŸ‘€ {playlist['channel']['name']}")

    for video in playlist['videos']:
        print(f"  β€’ {video['title']}")

asyncio.run(main())

πŸ“š Detailed Guide

For complete API contracts, response shapes, and advanced usage patterns, see DOCUMENTATION.md.

πŸ› οΈ Requirements

Minimal Dependencies

  • Python: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
  • aiohttp: >= 3.8.0

That's it! No complex dependencies.

🀝 Contributing

Contributions are welcome and appreciated.

Quick Start

  1. Fork this repository
  2. Create a branch (git checkout -b feature/your-change)
  3. Make your changes and test locally
  4. Commit with a clear message
  5. Open a Pull Request

Not sure where to start?

  • Found a bug? Open an issue: GitHub Issues
  • Have a feature idea? Share it in GitHub Issues
  • Want to improve docs or examples? PRs are always welcome

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright Β© 2026 CertifiedCoders

πŸ”– Credits & Acknowledgments

About

πŸ”Ž Search for YouTube videos, & playlists.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages