Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/faraasaaay/inner/llms.txt

Use this file to discover all available pages before exploring further.

Inner is a Kotlin Multiplatform library that wraps YouTube Music’s internal youtubei/v1/ InnerTube API. It runs on Android and iOS, exposes a clean coroutine-based surface via the YouTube singleton (Android) or PortableInnertube class (KMP), and handles authentication, PoToken generation, playlist management, and audio stream resolution out of the box.

Quickstart

Get Inner integrated and making your first API call in minutes.

Installation

Add the Gradle dependency to your Android or KMP project.

Core Concepts

Understand the layered architecture, clients, and auth model.

API Reference

Full reference for every method on the YouTube object.

What Inner covers

Search

Search songs, albums, artists, playlists, and get suggestions.

Browse

Home feed, explore, charts, mood & genres, artists, albums.

Playback

Resolve audio streams, manage the queue, and fetch lyrics.

Playlists

Create, edit, and manage user playlists with full CRUD.

Library

Access listening history, liked songs, and saved playlists.

Authentication

Cookie-based login, PoTokens, and SAPISIDHASH signing.

Quick example

MainActivity.kt
import com.tamed.music.innertube.YouTube
import com.tamed.music.innertube.YouTube.SearchFilter

// Set your auth cookie (optional — unauthenticated browsing works too)
YouTube.cookie = "YOUR_COOKIE_STRING"

// Search for songs
val result = YouTube.search("Bohemian Rhapsody", SearchFilter.FILTER_SONG).getOrThrow()
result.items.forEach { song ->
    println("${song.title}${song.id}")
}
1

Add the dependency

Add the innertube module to your Gradle project. See Installation for the full setup.
2

Configure authentication

Set YouTube.cookie with your YouTube Music session cookie for authenticated features, or leave it unset for anonymous browsing.
3

Make your first call

All methods return Result<T> and are suspend functions — call them from a coroutine scope.
4

Handle pagination

Many results return a continuation token. Pass it back to the matching *Continuation method to fetch the next page.

Build docs developers (and LLMs) love