API playground

I'm in the process of building out APIs that query my Google Sheets "database". Here's a list of links for testing the query parameters I intend to use for this first version. No guarantees they all work.

Trigger APIs

These are API endpoints that trigger some action. I would like to eventually run these on some cron job.

Scrape YouTube videos

This scrapes a YouTube channel and populates the title, url, duration, and thumbnail columns of the DB for every upload to the channel. It will not add duplicate rows. If the "instructor" input is populated, this will also be saved.

The playlist ID for a typical playlist can be captured from the playlist URL, e.g.
https://www.youtube.com/playlist?list=PLc0asrzrjtZJk3jlJZXqP8C95h1uQvN7-

You can also capture all the uploads from a given user's channel by inspecting the source of a channel page and looking for the canonical URL. It will contain a channel ID of the format UCFKE7WVJfvaHW5q283SxchA. The user's uploads playlist ID starts with UU instead of UC, e.g. UUFKE7WVJfvaHW5q283SxchA.

NB: There's no frontend validation on this form.

Exclude video

When I scrape a YouTube channel of a yoga teacher I like such as Yoga with Adriene, all of her uploads are pulled into my spreadsheet "database", but not all of them are yoga videos. She has some blogs, meditations, and course introductions, for example.

The exclude API lets me mark a video as "excluded" so that it will not appear in the find me yoga flow in future.

Scrape Commune

A scraper for Commune's online library.

At the time of writing there are 27 pages of content in the full library. The scraper accepts one page at a time.

NB: There is no authentication in this scraper so it only works for me when running the project locally. Given the fact that I intend to be the only user who is allowed to write to the DB, this is good enough for me.