You can explore common use cases for the YouTube Data API and YouTube Live Streaming API on the use cases and code samples page.
The page lets you select an API resource and method and then lists common use cases for that method. You can then click on any use case to populate the APIs Explorer widget with sample parameter and property values for that use case. You can also open the fullscreen APIs Explorer widget to see working code samples for Java, JavaScript, PHP, and Python. If you update parameter or property values in the APIs Explorer, the code samples also update to reflect your changes.
The following section lists code samples available in other languages.
Standalone code snippets
The lists below identify code samples available for the YouTube Data API (v3) in languages other than Java, JavaScript, PHP, and Python. As noted in the previous section, code samples for those languages are available on the use cases and code samples page.
Apps Script
Code sample | Methods |
---|---|
Add a channel subscription | subscriptions.insert |
Retrieve current user's uploads | channels.list |
Search for videos related to a keyword | search.list |
Update a video | videos.update |
Go
Code sample | Methods |
---|---|
Authorize a request | Any method requiring authorization. |
Retrieve current user's uploads | playlistItems.list |
Search for videos related to a keyword | search.list |
Upload a video | videos.insert |
.NET
Ruby
Code sample | Methods |
---|---|
Authorize a request | Any method requiring authorization. |
Create a channel subscription | subscriptions.insert |
Retrieve current user's uploads |
channels.list playlistItems.list
|
Search for videos related to a keyword | search.list |
Upload a video | videos.insert |
You may also be able to adapt one of the other Ruby samples.