Skip to main content

Python Client for Google's Private InnerTube API. Works with Youtube, YouTube Music and more!

Project description

innertube

Python Client for Google's Private InnerTube API. Works with YouTube, YouTube Music, YouTube Kids, YouTube Studio and more!

About

This library handles low-level interactions with the underlying InnerTube API used by each of the YouTube services.

Here are a few articles available online relating to the InnerTube API:

Installation

innertube uses Poetry under the hood and can easily be installed from source or from PyPI using pip.

Latest Release

pip install innertube

Bleeding Edge

pip install git+https://github.com/tombulled/innertube@develop

Usage

>>> import innertube
>>>
>>> # Construct a client
>>> client = innertube.InnerTube("WEB")
>>>
>>> # Get some data!
>>> data = client.search(query="foo fighters")
>>>
>>> # Power user? No problem, dispatch requests yourself
>>> data = client("browse", body={"browseId": "FEwhat_to_watch"})
>>>
>>> # The core endpoints are implemented, so the above is equivalent to:
>>> data = client.browse("FEwhat_to_watch")

Comparison with the YouTube Data API

The InnerTube API provides access to data you can't get from the Data API, however it comes at somewhat of a cost (explained below).

This Library YouTube Data API
Google account required No Yes
Request limit No Yes
Clean data No Yes

As the InnerTube API is used by the variety of YouTube services and is not designed for consumption by users. Therefore, the data returned by the InnerTube API will need to be parsed and sanitised to extract data of interest.

Endpoints

Currently only the following core, unauthenticated endpoints are implemented:

YouTube YouTubeMusic YouTubeKids YouTubeStudio
config
browse
player
next
search
guide
music/get_search_suggestions
music/get_queue

Authentication

The InnerTube API uses OAuth2, however this has not yet been implemented, therefore this library currently only provides unauthenticated API access.

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

innertube-2.0.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

innertube-2.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file innertube-2.0.1.tar.gz.

File metadata

  • Download URL: innertube-2.0.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-117-generic

File hashes

Hashes for innertube-2.0.1.tar.gz
Algorithm Hash digest
SHA256 7d7fd06ff1e5facada853232ec4fb7011b10e9c211d7b9fc1646765e35fd7476
MD5 c05bd2f669c3a3b5647f950c412ae311
BLAKE2b-256 0afd674af005c331c0eba3f74b581968c75e42ac24d348e179ac764e6acb5aeb

See more details on using hashes here.

File details

Details for the file innertube-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: innertube-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-117-generic

File hashes

Hashes for innertube-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ebaecdbb283a82c39cb2f62541df0a75be06075b670efe60ffd7c4d24098916
MD5 7e0a84d9d95a3e8f8be302aa0d6d6fa1
BLAKE2b-256 e80f9ce92c800b9bbc6e2455dcaa43c5a803561d106aa1f858bd82f7a6ed4daa

See more details on using hashes here.

Supported by

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