YouTube Data API (v3) Code Samples

The lists below identify the code samples available for the YouTube Data API (v3). Full samples can be downloaded from our GitHub projects.

Apps Script

  1. Post channel bulletin (activities.insert)
  2. Retrieve my uploads (channels.list)
  3. Search by keyword (search.list)
  4. Search by topic (search.list)
  5. Subscribe to channel (subscriptions.insert)
  6. Update video (videos.update)

Go

  1. Authorize a request
  2. Post a channel bulletin (activities.insert)
  3. Retrieve my uploads (playlistItems.list)
  4. Search by keyword (search.list)
  5. Search by topic (search.list)
  6. Upload a video (videos.insert)

Java

  1. Post a channel bulletin (activities.insert)
  2. Add a featured video (channels.update)
  3. Set and retrieve localized channel metadata (channels.list and channels.update)
  4. Set and retrieve localized channel section metadata (channelSections.list and channelSections.update)
  5. Retrieve my uploads (playlistItems.list)
  6. Create a playlist (playlists.insert)
  7. Set and retrieve localized playlist metadata (playlists.list and playlists.update)
  8. Search by keyword (search.list)
  9. Search by topic (search.list)
  10. Add a channel subscription (subscriptions.insert)
  11. Upload a video thumbnail image (thumbnails.set)
  12. Upload a video (videos.insert)
  13. Update a video (videos.update)
  14. Set and retrieve localized video metadata (videos.list and videos.update)

JavaScript

  1. Authorizing requests
  2. My uploaded videos (playlistItems.list)
  3. Create a playlist (playlists.insert)
  4. Search by keyword (search.list)

.NET

  1. Retrieve my uploads (playlistItems.list)
  2. Create a playlist (playlists.insert)
  3. Search by keyword (search.list)
  4. Upload a video (videos.insert)

PHP

  1. Set and retrieve localized channel metadata (channels.list and channels.update)
  2. Set and retrieve localized channel section metadata (channelSections.list and channelSections.update)
  3. Retrieve my uploads (playlistItems.list)
  4. Create a playlist (playlists.insert)
  5. Set and retrieve localized playlist metadata (playlists.list and playlists.update)
  6. Search by keyword (search.list)
  7. Add a channel subscription (subscriptions.insert)
  8. Uploading a custom thumbnail for a Video (thumbnails.set)
  9. Resumable Uploads (videos.insert)
  10. Updating a Video by adding new tags (videos.list and videos.update)
  11. Set and retrieve localized video metadata (videos.list and videos.update)

Python

  1. Post a channel bulletin (activities.insert)
  2. Upload a banner image and set as channel's banner (channelBanners.insert and channels.update)
  3. Add a featured video (channels.update)
  4. Set and retrieve localized channel metadata (channels.list and channels.update)
  5. Set and retrieve localized channel section metadata (channelSections.list and channelSections.update)
  6. Retrieve my uploads (playlistItems.list)
  7. Create a playlist (playlists.insert)
  8. Set and retrieve localized playlist metadata (playlists.list and playlists.update)
  9. Search by keyword (search.list)
  10. Search by topic (search.list)
  11. Add a channel subscription (subscriptions.insert)
  12. Upload a video thumbnail image (thumbnails.set)
  13. Upload a video (videos.insert)
  14. Rate (like) a video (videos.rate)
  15. Update a video (videos.update)
  16. Set and retrieve localized video metadata (videos.list and videos.update)

Ruby

  1. Authorize a request
  2. Post a channel bulletin (activities.insert)
  3. Retrieve my uploads (playlistItems.list)
  4. Search by keyword (search.list)
  5. Add a channel subscription (subscriptions.insert)
  6. Upload a video (videos.insert)