This repo is no longer supported, please consider using the official api instead.
Simple js only package to resolve YouTube Playlists. Does not require any login or Google-API-Key.
You can contact us for support on our chat server
const ytpl = require('ytpl');
const playlist = await ytpl('UU_aEa8K-EOJ3D6gOs7HcyNg');
Attempts to resolve the given playlist id
id
options
US
- Allows for localisation of the requesten
- Allows for localisation of the requestreturns a Promise
Continues a previous request by pulling yet another page.
The previous request had to be done using pages
limitation.
const ytpl = require('ytpl');
const firstResultBatch = await ytpl('UU_aEa8K-EOJ3D6gOs7HcyNg', { pages: 1 });
const secondResultBatch = ytpl.continueReq(firstResultBatch.continuation);
const thirdResultBatch = ytpl.continueReq(secondResultBatch.continuation);
// You can now use the .items property of all result batches e.g.:
console.log(firstResultBatch.items);
console.log(secondResultBatch.items);
console.log(thirdResultBatch.items);
{ continuation, items }
Returns true if able to parse out a (formally) valid playlist ID.
Returns a playlist ID from a YouTube URL. Can be called with the playlist ID directly, in which case it just resolves.
npm install --save ytpl
MIT