Back to APIs list

YouTube API examples & templates

Use these vals as a playground to view and fork YouTube API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
mux avatar
youTubeCommentWatcher
@mux
Cron
YouTube Comment Watcher Only a few people on the team were getting the comment updates from YouTube, but we wanted everyone to see them just in case. This monitors all the YouTube videos in our channel and sends out an email whenever we get a new comment so the team can pop in if they need to. Usage Set the environment variables for YOUTUBE_API_KEY and YOUTUBE_CHANNEL_ID Fork this Go
syncretizm avatar
youtubeEndpoint
@syncretizm
HTTP
An interactive, runnable TypeScript val by syncretizm
wilt avatar
getYoutubeLinkFromPage
@wilt
Script
An interactive, runnable TypeScript val by wilt
pdebie avatar
publishYoutubeToLemmy
@pdebie
Script
Publish a Youtube feed to Lemmy This allows you to automatically publish a Youtube channel to to a Lemmy community. Example usage: async function publishMyFeed() { try { return @pdebie.publishYoutubeToLemmy({ instance: "lemm.ee", auth: @me.secrets.lemmee, communityId: 23316, youtubeChannelId: "UChZgikssAJkmiQOv_sO-ngQ", lastSyncTime: @pdebie.spacexLemmyDb.lastSync, }); } finally { @pdebie.spacexLemmyDb.lastSync = new Date().toISOString(); } } Get a Youtube channel ID here . Make sure to set your lastSync properly, since otherwise you'll keep publishing new posts!
pdebie avatar
youtubeFeed
@pdebie
Script
Fetches all videos for a Youtube channel, by using its RSS feed.
zzz avatar
YoutubeTranscript
@zzz
Script
An interactive, runnable TypeScript val by zzz
park avatar
YoutubeTranscript
@park
Script
An interactive, runnable TypeScript val by park
nbbaier avatar
getVideoInfo
@nbbaier
Script
Get YT Video Information Given a youtube video url, this val returns a small amount of information about the video: title, channel title, and the description. It uses the Youtube Data API v3, so you need to bring your own API key to get it to work (see here about setting up an API key).
wilt avatar
getYoutubeLinkFromPageAPI
@wilt
Script
An interactive, runnable TypeScript val by wilt
zzz avatar
YoutubeSummary
@zzz
Script
// https://api.val.town/v1/express/zzz.rime?text=Hello%20Val%20Town
supersayan avatar
getAllVideosInYoutubePlaylist
@supersayan
Script
Get All Videos in a Youtube Playlist using the Youtube Data API v3 Reference: https://developers.google.com/youtube/v3/docs/playlistItems/list
curtcox avatar
markdown_download
@curtcox
HTTP
markdown.download Handy microservice/library to convert various data sources into markdown. Intended to make it easier to consume the web in ereaders Introductory blog post: https://taras.glek.net/post/markdown.download/ Package: https://jsr.io/@tarasglek/markdown-download Features Apply readability Further convert article into markdown to simplify it Allow webpages to be viewable as markdown via curl Serve markdown converted to html to browsers Extract youtube subtitles Source https://github.com/tarasglek/markdown-download https://www.val.town/v/taras/markdown_download License: MIT Usage: https://markdown.download/ + URL Dev: https://val.markdown.download/ + URL
taras avatar
scrape2md
@taras
HTTP
This is a deno/valtown port in progress of https://github.com/tarasglek/scrape2md License: MIT Handy script to scrape various data sources into markdown. Intended to feed llms in https://chatcraft.org Usage: https://taras-scrape2md.web.val.run/ + URL_TO_SCRAPE Or just visit in browser and paste your url TODO https://chatcraft.org/api/share/tarasglek/IDYChVAilfePgVZb_T5pH POST from browser https://www.val.town/v/nbbaier/valToGH sync to github Metadata for use with https://github.com/tarasglek/valtown2js: { "typeCheck": false, "mappings": { "https://esm.sh/linkedom": { "name": "linkedom", "version": "^0.16.8" } }, "package": { "name": "scrape2md", "version": "1.0.0", "devDependencies": { "@types/turndown": "^5.0.4" } } }
yawnxyz avatar
markdown_download
@yawnxyz
HTTP
markdown.download Handy microservice/library to convert various data sources into markdown. Intended to make it easier to consume the web in ereaders https://jsr.io/@tarasglek/markdown-download Features Apply readability Further convert article into markdown to simplify it Allow webpages to be viewable as markdown via curl Serve markdown converted to html to browsers Extract youtube subtitles Source https://github.com/tarasglek/markdown-download https://www.val.town/v/taras/markdown_download License: MIT Usage: https://markdown.download/ + URL Dev: https://val.markdown.download/ + URL
taras avatar
markdown_download
@taras
HTTP
markdown.download Handy microservice/library to convert various data sources into markdown. Intended to make it easier to consume the web in ereaders Introductory blog post: https://taras.glek.net/post/markdown.download/ Package: https://jsr.io/@tarasglek/markdown-download Features Apply readability Further convert article into markdown to simplify it Allow webpages to be viewable as markdown via curl Serve markdown converted to html to browsers Extract youtube subtitles Can paste htmlContent in curl 'https://val.markdown.download/' -H 'content-type: application/x-www-form-urlencoded' --data-urlencode "htmlContent@$HOME/Downloads/oai-reference.html" Source https://github.com/tarasglek/markdown-download https://www.val.town/v/taras/markdown_download License: MIT Usage: https://markdown.download/ + URL Dev: https://val.markdown.download/ + URL
horatiothomas avatar
dot_com
@horatiothomas
HTTP
stevekrouse.com - my personal website This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite. It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still. Todos [ ] Speed up page load by loading sqlite data later like in @healeycodes/steve_web [ ] Store more (legally storable) analytics data, and maybe make a sparkline! [ ] Add some sort of way to contact me [ ] Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)