Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
I need help getting video ids from a playlist in youtube

I'm trying to fetch all the video ids from a playlist on YouTube. Currently, I have things almost working, except the ids that YouTube is returning a much longer than usual and don't seem to work. Here's part of my code:

const requestUrl = `https://www.googleapis.com/youtube/v3/playlistItems?key=${process.env.KEY}&playlistId=${id}&part=id&maxResults=40`

The result under data.items looks like this:

[
  {
    kind: 'youtube#playlistItem',
    etag: 'DxS1pY8G6dwZwfAUJeE8naJEvXM',
    id: 'T0xBSzV1eV9uUHdpaDVQbWY3aEJWQ1Q2LU14bVFOTGFBSVAwellYVGsuRUVCNzhFRENBQzBENDM4MA'
  },
  {
    kind: 'youtube#playlistItem',
    etag: 'hi9WR5RovxYzHpBXddP__e5nFSA',
    id: 'T0xBSzV1eV9uUHdpaDVQbWY3aEJWQ1Q2LU14bVFOTGFBSVAwellYVGsuQzVBOTAwNjQ1OTJFMTVBRg'
  }
etc...

However those ids are much longer than normal and when I go to for example

youtube.com/watch?v=T0xBSzV1eV9uUHdpaDVQbWY3aEJWQ1Q2LU14bVFOTGFBSVAwellYVGsuRUVCNzhFRENBQzBENDM4MA the url automatically gets shortened to https://www.youtube.com/watch?v=T0xBSzV1eV9 and I get a video unavailable screen. When I changed &part=id to &part=snippet, the same thing happened, I just got more video info.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!