irotechlab-yt-search
YouTube search without official API - fast, reliable, and completely free.
📌 Features
- 🔍 Search videos, channels, and playlists without API key
- ⚡ Async/await support for high performance
- 🎯 Filter by type (video, channel, playlist, live, movie)
- 📊 Sort by relevance, upload date, view count, rating
- 🌍 Region and language support
- 🔄 Pagination for unlimited results
- 📹 Video info extraction (title, channel, views, likes, comments)
- 💬 Comment scraping with replies
- 📑 Chapter extraction
- 🛡️ Rate limiting and retry logic
- 📦 Clean dataclass models (Video, Channel, Playlist)
📦 Installation
pip install irotechlab-yt-search
Or install from source:
git clone https://github.com/irotechlab/irotechlab-yt-search
cd irotechlab-yt-search
pip install -e .
🚀 Quick Start
import asyncio
from irotechlab_yt_search import YouTubeSearch
async def main():
search = YouTubeSearch()
# Search for videos
videos = await search.search("python programming", max_results=5)
for video in videos:
print(f"{video.title}")
print(f" Channel: {video.channel}")
print(f" Views: {video.views}")
print(f" URL: {video.url}\n")
await search.close()
asyncio.run(main())
📹 Video Info
from irotechlab_yt_search import VideoInfo, extract_video_id
async def get_video_info():
info = VideoInfo()
video_url = "https://youtube.com/watch?v=VIDEO_ID"
video_id = extract_video_id(video_url)
details = await info.get_video_info(video_id)
print(f"Title: {details['title']}")
print(f"Views: {details['views']}")
print(f"Likes: {details['likes']}")
print(f"Comments: {details['comment_count']}")
await info.close()
📺 Channel Info
from irotechlab_yt_search import ChannelInfo
async def get_channel():
channel_info = ChannelInfo()
channel = await channel_info.get_channel_info("@channelname")
print(f"Name: {channel['name']}")
print(f"Subscribers: {channel['subscribers']}")
print(f"Videos: {channel['video_count']}")
await channel_info.close()
📋 Playlist Info
from irotechlab_yt_search import PlaylistInfo
async def get_playlist():
playlist_info = PlaylistInfo()
playlist = await playlist_info.get_playlist_info("PLAYLIST_ID", max_videos=10)
print(f"Title: {playlist['title']}")
print(f"Author: {playlist['author']}")
print(f"Videos: {playlist['video_count']}")
for video in playlist['videos']:
print(f" - {video['title']}")
await playlist_info.close()
🔍 Advanced Search
Filter by type
# Only videos
videos = await search.search(
"python tutorial",
filter_type="video",
max_results=10
)
Sort results
# Sort by view count
videos = await search.search(
"python tutorial",
sort_by="view_count"
)
# Sort by upload date
videos = await search.search(
"python tutorial",
sort_by="upload_date"
)
Region and language
videos = await search.search(
"python tutorial",
region_code="IN",
language="hi"
)
🛠️ API Reference
YouTubeSearch
Parameters:
query(str): Search querymax_results(int): Maximum number of results (default: 10)filter_type(str):all,video,channel,playlist,movie,livesort_by(str):relevance,upload_date,view_count,ratingregion_code(str): Two-letter country codelanguage(str): Language code
Returns: List[Video]
Video Object
@dataclass
class Video:
id: str
title: str
channel: str
channel_id: Optional[str]
url: str
thumbnail: str
duration: str
duration_seconds: Optional[int]
views: str
view_count: Optional[int]
published: str
published_date: Optional[datetime]
is_live: bool
📂 Examples
Check the examples/ directory for more usage examples:
basic_search.py- Simple searchadvanced_search.py- Advanced filtering and sortingall_in_one.py- Complete demo of all features
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📞 Support & Community
- Telegram Channel: @irotechcoders
- Telegram Contact: @ironmanhindigaming
- GitHub Issues: Report a bug
📄 License
MIT License - see LICENSE file for details
⚠️ Disclaimer
This package scrapes YouTube's internal API and may break if YouTube changes their structure. Use responsibly and respect YouTube's terms of service.
Made with ❤️ by IrotechLab
Metadata
Release files for irotechlab-yt-search 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| irotechlab_yt_search-1.0.1.tar.gz | 26.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| irotechlab_yt_search-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.8 kB
Release files / irotechlab_yt_search-1.0.1.tar.gz
| Download URL | irotechlab_yt_search-1.0.1.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8ed8c07d8442f390b72072f7614368c3668a66fcf3b745c6ed3642da0da972d
|
|
BLAKE2b-256 checksum How to use checksums |
b03b3a0989f2b167e3d6c888b625d3b2969c5f6506113eb24e8739711c188bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / irotechlab_yt_search-1.0.1-py3-none-any.whl
| Download URL | irotechlab_yt_search-1.0.1-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5de534f11b7a62edb9b1b4c06b3cc2d9cd5b53fb963639bc7953411fb78975c2
|
|
BLAKE2b-256 checksum How to use checksums |
f3eab97a6a0edd30ca7deb786d4a6bb1234712450bac2aa3538bf120f7e3bd45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency log