Add endpoints for retrieving Youtube content data
The main goal with this API is to provide a caching and verification layer to requests made with our API token. This prevents abuse through skimming our token and provides stability through caching to preserve the rate limit.
Endpoints:
GET /media/youtube/video
- Requires a channel query parameter, returns multiple videos
GET /media/youtube/video/{videoID}
- Returns a single video that exists for a configured user
GET /media/youtube/playlist
- Requires a channel query parameter, returns multiple playlist definitions
GET /media/youtube/playlist/{playlistID}
- Returns a single playlist that exists for a configured user.
Query parameters:
- channel: the channel name to retrieve items for
- ids: to retrieve a set of known content definitions
Sample outputs:
Playlist sample output:
{
"etag": "vCXvcdPR68NC_dQXQPnkl8RbzxE",
"id": "PLy7t4z5SYNaRbW51Q667Zh81YhOK89RQA",
"snippet": {
"publishedAt": "2022-06-16T11:44:05Z",
"channelId": "UCej18QqbZDxuYxyERPgs2Fw",
"title": "Eclipse IDE Working Group",
"description": "",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/J3kAVrV-lfA/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/J3kAVrV-lfA/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/J3kAVrV-lfA/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/J3kAVrV-lfA/sddefault.jpg",
"width": 640,
"height": 480
}
},
"channelTitle": "Eclipse Foundation",
"localized": {
"title": "Eclipse IDE Working Group",
"description": ""
}
},
"player": {
"embedHtml": "\u003ciframe width=\"640\" height=\"360\" src=\"http://www.youtube.com/embed/videoseries?list=PLy7t4z5SYNaRbW51Q667Zh81YhOK89RQA\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\u003e\u003c/iframe\u003e"
}
}
Video endpoint sample:
{
"etag": "PUZpj5qDWJNhg9tTIJCIF27X8wI",
"id": "fzQ6gRAEoy0",
"snippet": {
"publishedAt": "2016-10-18T18:00:03Z",
"channelId": "UCKKKYE55BVswHgKihx5YXew",
"title": "Porter Robinson & Madeon - Shelter (Official Video) (Short Film with A-1 Pictures & Crunchyroll)",
"description": "Porter Robinson & Madeon - Shelter (Official Video) (Short Film with A-1 Pictures & Crunchyroll)\n\nShelter tells the story of Rin, a 17-year-old girl who lives her life inside of a futuristic simulation completely by herself in infinite, beautiful loneliness. Each day, Rin awakens in virtual reality and uses a tablet which controls the simulation to create a new, different, beautiful world for herself. Until one day, everything changes, and Rin comes to learn the true origins behind her life inside a simulation.\n\nsubscribe to my channel for more music & videos: http://porter.fm/youtube \n\nOriginal Story by: Porter Robinson\n\nMusic: Porter Robinson and Madeon \n\nStoryboard Animation Director: Toshihumi Akai\n\nCharacter Design Drawing Director: Megumi Kouno\n\nCast: \nRin - Sachika Misawa",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/fzQ6gRAEoy0/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/fzQ6gRAEoy0/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/fzQ6gRAEoy0/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/fzQ6gRAEoy0/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/fzQ6gRAEoy0/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "Porter Robinson",
"tags": [
"Porter Robinson Madeon Shelter",
"Shelter porter robinson madeon",
"Shelter porter robinson",
"Shelter porter",
"Shelter madeon",
],
"categoryId": "10",
"liveBroadcastContent": "none",
"defaultLanguage": "en-US",
"localized": {
"title": "Porter Robinson & Madeon - Shelter (Official Video) (Short Film with A-1 Pictures & Crunchyroll)",
"description": "Porter Robinson & Madeon - Shelter (Official Video) (Short Film with A-1 Pictures & Crunchyroll)\n\nShelter tells the story of Rin, a 17-year-old girl who lives her life inside of a futuristic simulation completely by herself in infinite, beautiful loneliness. Each day, Rin awakens in virtual reality and uses a tablet which controls the simulation to create a new, different, beautiful world for herself. Until one day, everything changes, and Rin comes to learn the true origins behind her life inside a simulation.\n\nsubscribe to my channel for more music & videos: http://porter.fm/youtube \n\nOriginal Story by: Porter Robinson\n\nMusic: Porter Robinson and Madeon \n\nStoryboard Animation Director: Toshihumi Akai\n\nCharacter Design Drawing Director: Megumi Kouno\n\nCast: \nRin - Sachika Misawa"
},
"defaultAudioLanguage": "en"
},
"player": {
"embedHtml": "\u003ciframe width=\"480\" height=\"270\" src=\"//www.youtube.com/embed/fzQ6gRAEoy0\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\u003e\u003c/iframe\u003e"
}
}