Hide

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. Retrieve my uploads (playlistItems.list)
  4. Create a playlist (playlists.insert)
  5. Search by keyword (search.list)
  6. Search by topic (search.list)
  7. Add a channel subscription (subscriptions.insert)
  8. Upload a video thumbnail image (thumbnails.set)
  9. Upload a video (videos.insert)
  10. Update a video (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. Retrieve my uploads (playlistItems.list)
  2. Create a playlist (playlists.insert)
  3. Search by keyword (search.list)
  4. Add a channel subscription (subscriptions.insert)
  5. Uploading a custom thumbnail for a Video (thumbnails.set)
  6. Resumable Uploads (videos.insert)
  7. Updating a Video by adding new tags (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, channels.update)
  3. Add a featured video (channels.update)
  4. Retrieve my uploads (playlistItems.list)
  5. Create a playlist (playlists.insert)
  6. Search by keyword (search.list)
  7. Search by topic (search.list)
  8. Add a channel subscription (subscriptions.insert)
  9. Upload a video thumbnail image (thumbnails.set)
  10. Upload a video (videos.insert)
  11. Rate (like) a video (videos.rate)
  12. Update a video (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)