Get playlist video IDs

Fetch all video IDs in a playlist (auto-paginates).

GET
/api/playlist/{id}/ids

Path Parameters

id*string

Playlist ID or URL

Response Body

application/json

application/json

import { Router } from 'express'import { client } from '../lib.js'const router = Router()router.get('/playlist/:id/ids', async (req, res) => {  const { id } = req.params  const ids = await client!.playlistVideoIds(id)  res.json({ id, videoIds: ids, count: ids.length })})export const routes = router
{
  "id": "string",
  "videoIds": [
    "string"
  ],
  "count": 0
}
{
  "error": {
    "code": 0,
    "message": "string",
    "details": [
      "string"
    ]
  }
}