🕔 Time To Watch Later (TTWL) calculates the amount of time needed to watch all videos in the "Watch Later" playlist on YouTube.
- 🤔 Why?
- 📉 My First Approach
- 📈 Second Approach
- 🔧 How it Works
- 🏃 How to Get TTWL Running
- 📋 Example Output
My "Watch Later" playlist had grown to over 250 videos and I was curious how long it would take to watch them all. Since I'm a fan of Go, I thought about doing that programmatically.
I thought that it wouldn't be that deep. In my head, it was:
- Get all playlists a user has.
- Find the "Watch Later" playlist.
- Use the
IDof the "Watch Later" playlist to get all video IDs. - Calculate the duration of all videos with the videos endpoint.
So, I started reading the API documentation to find out which endpoints I would have to use. To get familiar with them, I used an API Client, Bruno, to play a bit with the endpoints.
I tried to get the Watch Later playlist — with no luck.
So I did what every developer does: I googled it. I found this Reddit post explaining that Google had removed the ability to get information about the "Watch Later" playlist from the YouTube API. I double checked this by searching the official revision history.
At that point, I thought that it was impossible to get the Watch Later playlist. However, in the same Reddit thread, a solution was hidden in the comment.
The Reddit comment I found described a way to get my hands on the video IDs of the "Watch Later" playlist, though the process is a bit cumbersome. You have to download the playlist data from Google Takeout.
- Go to Google Takeout and create a new export.
- Click Deselect all.
- Scroll down to YouTube and select it.
- Click on the chip All YouTube data included.
- Deselect everything except
playlists.
- Finish the export. You will be notified via email when the download is ready.
Do you remember the steps of the first approach? The process stays the same, except that the first two steps are skipped.
TTWL utilizes the YouTube Data API v3 to calculate the total duration.
It reads the csv file from your Google Takeout export to get all video IDs. Those are passed to the YouTube Data API, and then the duration of all videos is calculated.
- Enable the YouTube Data API v3.
- Click on Manage.
- Then, navigate to the Credentials tab.
- Click on + Create credentials and select API Key.
- Set a name for the key. Ensure all other settings are identical to those shown in the screenshot. For security reasons, restrict the API key to the YouTube Data API v3.
- Clone this repository:
git clone https://github.com/Edchja/time-to-watch-later.git- Ensure Docker is installed.
- Change your directory to the cloned repository.
- Build the image:
docker build -t ttwl .- Run the container, replacing
your-keyand the path to your CSV file:
docker run --rm -e API_KEY=your-key -v path/to/watch-later.csv:/wl.csv ttwl -file=wl.csv- Ensure Go is installed.
- Change your directory to the cloned repository.
- Create a
.envfile in the project's root directory. Inside this file, add the lineAPI_KEY=your_api_key, replacingyour_api_keywith the key you created. - Follow the steps in the second approach to download your Watch Later Playlist CSV file.
- Now, you can run TTWL 🚀
go run . -file='path/to/Watch later-videos.csv'2025/09/29 00:15:57 playlist video count: 447
2025/09/29 00:15:59 available video count: 440
The duration to get through the Watch Later playlist is:
6 days
5 hours
15 minutes
36 seconds






