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.
trob avatar
trob
youtubeSearchResults
HTTP
@jsxImportSource https://esm.sh/react
0
mvmattgray avatar
mvmattgray
YouTubeSubmissions
HTTP
// This approach uses HTML for the form and Blob storage for persistence.
0
mux avatar
mux
youTubeCommentWatcher
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
0
syncretizm avatar
syncretizm
youtubeEndpoint
HTTP
An interactive, runnable TypeScript val by syncretizm
0
wilt avatar
wilt
getYoutubeLinkFromPage
Script
An interactive, runnable TypeScript val by wilt
0
pdebie avatar
pdebie
youtubeFeed
Script
Fetches all videos for a Youtube channel, by using its RSS feed.
3
zzz avatar
zzz
YoutubeTranscript
Script
An interactive, runnable TypeScript val by zzz
1
park avatar
park
YoutubeTranscript
Script
An interactive, runnable TypeScript val by park
0
CoachCompanion avatar
CoachCompanion
efficientAmberUnicorn
HTTP
Forked from CoachCompanion/CoachCompanionbackup
0
nbbaier avatar
nbbaier
getVideoInfo
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).
0
pdebie avatar
pdebie
publishYoutubeToLemmy
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!
3
wilt avatar
wilt
getYoutubeLinkFromPageAPI
Script
An interactive, runnable TypeScript val by wilt
0
zzz avatar
zzz
YoutubeSummary
Script
// https://api.val.town/v1/express/zzz.rime?text=Hello%20Val%20Town
1
supersayan avatar
supersayan
getAllVideosInYoutubePlaylist
Script
Get All Videos in a Youtube Playlist using the Youtube Data API v3 Reference: https://developers.google.com/youtube/v3/docs/playlistItems/list
1
CoachCompanion avatar
CoachCompanion
curiousTurquoiseDormouse
HTTP
Forked from CoachCompanion/CoachCompanionbackup
0
CoachCompanion avatar
CoachCompanion
CoachCompanionbackup
HTTP
Forked from CoachCompanion/CoachCompanionMain
0