I wanted a simple way to get chapters from a YouTube video.

That sounded like something the YouTube API would already handle, but I could not find a clean built-in way to do it. So I ended up making a small package: youtube-chapters-finder.

The package is very small on purpose. You pass in a video id and get back a list of chapters with title, time, and chapter URL.

import YoutubeChaptersGetter from 'youtube-chapters-finder'

async function getChapters() {
  return await YoutubeChaptersGetter.getChapter('Gi8LUnhP5yU')
}

That returns data in this shape:

[
  {
    title: 'Introduction',
    time: '0:00',
    url: 'https://youtube.com/watch?v=Gi8LUnhP5yU'
  },
  {
    title: 'Are there intelligent life out there',
    time: '2:27',
    url: 'https://youtube.com/watch?v=Gi8LUnhP5yU&t=147s'
  },
  {
    title: 'We dont mean all of space',
    time: '3:02',
    url: 'https://youtube.com/watch?v=Gi8LUnhP5yU&t=182s'
  },
  {
    title: 'Intelligent life',
    time: '5:42',
    url: 'https://youtube.com/watch?v=Gi8LUnhP5yU&t=342s'
  },
  ...
]

I built it mainly for server-side use. It fits cases where you want to analyze video structure, build a better content index, or just avoid manually copying timestamps from a description.

This is not a large project. It is more of a utility package for one specific gap. But I like these kinds of tools: small surface area, clear input, clear output, and immediately useful when you need them.