Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

youtubei-dts

LuanRT12MIT1.1.0TypeScript support: included

TypeScript type definitions for InnerTube (YouTube Internal API)

definitions, typescript, types, typings, InnerTube, youtubei, YouTube.js, youtube-js

readme

TypeScript type definitions for InnerTube (YouTube Internal API)

Installation

npm install youtubei-dts

Usage

import type youtubei from 'youtubei-dts';
import { Innertube } from 'youtubei.js';

const innertube = await Innertube.create();
const playerResponse = await innertube.actions.execute('/player', { videoId: 'CsyYVkf6oC0' });
const responseData = playerResponse.data as youtubei.IYoutubeApiInnertubePlayerResponse;
console.log(responseData);

License

Distributed under the MIT License.

(back to top)