Skip to main content

ytsearch2 is a youtube-search fork. The main focus is adding new features and patches.

Python

GitHub Release GitHub Actions Workflow Status

Example usage

Using URL

from youtube_search2 import YoutubeSearch

search_engine = YTSearch()
video_info = search_engine.search_by_url("https://www.youtube.com/watch?v=jNQXAC9IVRw")

output: {'id': 'jNQXAC9IVRw', 'title': 'Me at the zoo', 'thumbnail': 'https://i.ytimg.com/vi/jNQXAC9IVRw/maxresdefault.jpg', 'duration': '19063'}

Using keyword

from youtube_search2 import YoutubeSearch

search_engine = YTSearch()
video_info = search_engine.search_by_term("Me at the zoo", max_results=1)

output: [{'id': 'jNQXAC9IVRw', 'thumbnails': ['https://i.ytimg.com/vi/jNQXAC9IVRw/hqdefault.jpg?sqp=-oaymwE9COADEI4CSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Ab4CgALwAYoCDAgAEAEYVCBYKGUwDw==&rs=AOn4CLC4lp5lwDTP5b30m6scq6a7lKyA8Q'], 'title': 'Me at the zoo', 'long_desc': None, 'channel': 'jawed', 'duration': '0:19', 'views': '310\xa0243\xa0516 views', 'publish_time': '18 years ago', 'url_suffix': '/watch?v=jNQXAC9IVRw&pp=ygUNTWUgYXQgdGhlIHpvbw%3D%3D'}]

Plans

  • scrap more data like sub count for method search_by_url.

Please report any suggestions and issues here.

Metadata

Release files for youtube-search2 2.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for youtube-search2 2.1.7
File Size Uploaded
youtube_search2-2.1.7.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for youtube-search2 2.1.7
File Interpreter ABI Platform
youtube_search2-2.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / youtube_search2-2.1.7.tar.gz

Download URL youtube_search2-2.1.7.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4e930e4a47445afb72f155e126792f7f805061c7069300ad6fd98f21ee85b22d
BLAKE2b-256 checksum
How to use checksums
32a7c40191a8e05903f8862da8075a6825d232b0369c3a512a09c3a6c0e5be8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / youtube_search2-2.1.7-py3-none-any.whl

Download URL youtube_search2-2.1.7-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df7986d5aa722e8e8fa99740330d5c4fb4a759a65820a80ccb9cb88ceca44538
BLAKE2b-256 checksum
How to use checksums
4df8a79a0d63d049d2e2ec3b77c14378b5dbef0fbc49c52e7f58ab9925d3b3c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

2.1.7 This release

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page