YouTube Data API (v3) рдХреЛрдб рд╕реИрдВрдкрд▓
рд╕рдВрдЧреНрд░рд╣ рдХреА рдорджрдж рд╕реЗ рд╡реНрдпрд╡рд╕реНрдерд┐рдд рд░рд╣реЗрдВ
рдЕрдкрдиреА рдкреНрд░рд╛рдердорд┐рдХрддрд╛рдУрдВ рдХреЗ рдЖрдзрд╛рд░ рдкрд░, рдХреЙрдиреНрдЯреЗрдВрдЯ рдХреЛ рд╕реЗрд╡ рдХрд░реЗрдВ рдФрд░ рдХреИрдЯрдЧрд░реА рдореЗрдВ рдмрд╛рдВрдЯреЗрдВ.
рдЗрд╕реНрддреЗрдорд╛рд▓ рдХреЗ рдЙрджрд╛рд╣рд░рдг рдФрд░ рдХреЛрдб рд╕реИрдВрдкрд▓ рдкреЗрдЬ рдкрд░, YouTube Data API рдФрд░ YouTube Live Streaming API рдХреЗ рдЗрд╕реНрддреЗрдорд╛рд▓ рдХреЗ рд╕рд╛рдорд╛рдиреНрдп рдЙрджрд╛рд╣рд░рдг рджреЗрдЦреЗ рдЬрд╛ рд╕рдХрддреЗ рд╣реИрдВ.
рдЗрд╕ рдкреЗрдЬ рдкрд░, рдПрдкреАрдЖрдИ рд╕рдВрд╕рд╛рдзрди рдФрд░ рддрд░реАрдХрд╛ рдЪреБрдирд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ. рдЗрд╕рдХреЗ рдмрд╛рдж, рдЙрд╕ рддрд░реАрдХреЗ рдХреЗ рд▓рд┐рдП рдЗрд╕реНрддреЗрдорд╛рд▓ рдХреЗ рд╕рд╛рдорд╛рдиреНрдп рдЙрджрд╛рд╣рд░рдгреЛрдВ рдХреА рд╕реВрдЪреА рджрд┐рдЦрддреА рд╣реИ. рдЗрд╕рдХреЗ рдмрд╛рдж, рдХрд┐рд╕реА рднреА рдЗрд╕реНрддреЗрдорд╛рд▓ рдХреЗ рдЙрджрд╛рд╣рд░рдг рдкрд░ рдХреНрд▓рд┐рдХ рдХрд░рдХреЗ, рдПрдкреАрдЖрдИ рдПрдХреНрд╕рдкреНрд▓реЛрд░рд░ рд╡рд┐рдЬреЗрдЯ рдХреЛ рдЙрд╕ рдЙрджрд╛рд╣рд░рдг рдХреЗ рд▓рд┐рдП рд╕реИрдВрдкрд▓ рдкреИрд░рд╛рдореАрдЯрд░ рдФрд░ рдкреНрд░реЙрдкрд░реНрдЯреА рд╡реИрд▓реНрдпреВ рд╕реЗ рдкреЙрдкреНрдпреБрд▓реЗрдЯ рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ. Java, JavaScript, PHP, рдФрд░ Python рдХреЗ рд▓рд┐рдП рдХрд╛рдо рдХрд░рдиреЗ рд╡рд╛рд▓реЗ рдХреЛрдб рдХреЗ рд╕реИрдВрдкрд▓ рджреЗрдЦрдиреЗ рдХреЗ рд▓рд┐рдП, рдлрд╝реБрд▓рд╕реНрдХреНрд░реАрди APIs Explorer рд╡рд┐рдЬреЗрдЯ рднреА рдЦреЛрд▓рд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ. рдЕрдЧрд░ рдЖрдкрдиреЗ рдПрдкреАрдЖрдИ рдПрдХреНрд╕рдкреНрд▓реЛрд░рд░ рдореЗрдВ рдкреИрд░рд╛рдореАрдЯрд░ рдпрд╛ рдкреНрд░реЙрдкрд░реНрдЯреА рдХреА рд╡реИрд▓реНрдпреВ рдЕрдкрдбреЗрдЯ рдХреА рд╣реИрдВ, рддреЛ рдЖрдкрдХреЗ рдмрджрд▓рд╛рд╡реЛрдВ рдХреЛ рджрд┐рдЦрд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдХреЛрдб рд╕реИрдВрдкрд▓ рднреА рдЕрдкрдбреЗрдЯ рд╣реЛ рдЬрд╛рдПрдВрдЧреЗ.
рдиреАрдЪреЗ рджрд┐рдП рдЧрдП рд╕реЗрдХреНрд╢рди рдореЗрдВ, рджреВрд╕рд░реА рднрд╛рд╖рд╛рдУрдВ рдореЗрдВ рдЙрдкрд▓рдмреНрдз рдХреЛрдб рд╕реИрдВрдкрд▓ рдХреА рд╕реВрдЪреА рджреА рдЧрдИ рд╣реИ.
рд╕реНрдЯреИрдВрдбрдЕрд▓реЛрди рдХреЛрдб рд╕реНрдирд┐рдкреЗрдЯ
рдпрд╣рд╛рдВ рджреА рдЧрдИ рд╕реВрдЪрд┐рдпреЛрдВ рдореЗрдВ, Java, JavaScript, PHP, рдФрд░ Python рдХреЗ рдЕрд▓рд╛рд╡рд╛ рдЕрдиреНрдп рднрд╛рд╖рд╛рдУрдВ рдореЗрдВ, YouTube Data API (v3) рдХреЗ рд▓рд┐рдП рдЙрдкрд▓рдмреНрдз рдХреЛрдб рд╕реИрдВрдкрд▓ рдХреА рдЬрд╛рдирдХрд╛рд░реА рджреА рдЧрдИ рд╣реИ. рдкрд┐рдЫрд▓реЗ рд╕реЗрдХреНрд╢рди рдореЗрдВ рдмрддрд╛рдпрд╛ рдЧрдпрд╛ рд╣реИ рдХрд┐ рдЗрди рднрд╛рд╖рд╛рдУрдВ рдХреЗ рд▓рд┐рдП рдХреЛрдб рд╕реИрдВрдкрд▓, рдЗрд╕реНрддреЗрдорд╛рд▓ рдХреЗ рдЙрджрд╛рд╣рд░рдг рдФрд░ рдХреЛрдб рд╕реИрдВрдкрд▓ рдкреЗрдЬ рдкрд░ рдЙрдкрд▓рдмреНрдз рд╣реИрдВ.
рд╢реБрд░реВ рдХрд░реЗрдВ
Ruby
рдЖрдкрдХреЗ рдкрд╛рд╕ рдХрд┐рд╕реА рджреВрд╕рд░реЗ Ruby рд╕реИрдВрдкрд▓ рдХреЛ рднреА рдЗрд╕реНрддреЗрдорд╛рд▓ рдХрд░рдиреЗ рдХрд╛ рд╡рд┐рдХрд▓реНрдк рд╣реИ.
рдЬрдм рддрдХ рдХреБрдЫ рдЕрд▓рдЧ рд╕реЗ рди рдмрддрд╛рдпрд╛ рдЬрд╛рдП, рддрдм рддрдХ рдЗрд╕ рдкреЗрдЬ рдХреА рд╕рд╛рдордЧреНрд░реА рдХреЛ Creative Commons Attribution 4.0 License рдХреЗ рддрд╣рдд рдФрд░ рдХреЛрдб рдХреЗ рдирдореВрдиреЛрдВ рдХреЛ Apache 2.0 License рдХреЗ рддрд╣рдд рд▓рд╛рдЗрд╕реЗрдВрд╕ рдорд┐рд▓рд╛ рд╣реИ. рдЬрд╝реНрдпрд╛рджрд╛ рдЬрд╛рдирдХрд╛рд░реА рдХреЗ рд▓рд┐рдП, Google Developers рд╕рд╛рдЗрдЯ рдиреАрддрд┐рдпрд╛рдВ рджреЗрдЦреЗрдВ. Oracle рдФрд░/рдпрд╛ рдЗрд╕рд╕реЗ рдЬреБрдбрд╝реА рд╣реБрдИ рдХрдВрдкрдирд┐рдпреЛрдВ рдХрд╛, Java рдПрдХ рд░рдЬрд┐рд╕реНрдЯрд░ рдХрд┐рдпрд╛ рд╣реБрдЖ рдЯреНрд░реЗрдбрдорд╛рд░реНрдХ рд╣реИ.
рдЖрдЦрд┐рд░реА рдмрд╛рд░ 2025-08-21 (UTC) рдХреЛ рдЕрдкрдбреЗрдЯ рдХрд┐рдпрд╛ рдЧрдпрд╛.
[[["рд╕рдордЭрдиреЗ рдореЗрдВ рдЖрд╕рд╛рди рд╣реИ","easyToUnderstand","thumb-up"],["рдореЗрд░реА рд╕рдорд╕реНрдпрд╛ рд╣рд▓ рд╣реЛ рдЧрдИ","solvedMyProblem","thumb-up"],["рдЕрдиреНрдп","otherUp","thumb-up"]],[["рд╡рд╣ рдЬрд╛рдирдХрд╛рд░реА рдореМрдЬреВрдж рдирд╣реАрдВ рд╣реИ рдЬреЛ рдореБрдЭреЗ рдЪрд╛рд╣рд┐рдП","missingTheInformationINeed","thumb-down"],["рдмрд╣реБрдд рдореБрд╢реНрдХрд┐рд▓ рд╣реИ / рдмрд╣реБрдд рд╕рд╛рд░реЗ рдЪрд░рдг рд╣реИрдВ","tooComplicatedTooManySteps","thumb-down"],["рдкреБрд░рд╛рдирд╛","outOfDate","thumb-down"],["рдЕрдиреБрд╡рд╛рдж рд╕реЗ рдЬреБрдбрд╝реА рд╕рдорд╕реНрдпрд╛","translationIssue","thumb-down"],["рд╕реИрдВрдкрд▓ / рдХреЛрдб рд╕реЗ рдЬреБрдбрд╝реА рд╕рдорд╕реНрдпрд╛","samplesCodeIssue","thumb-down"],["рдЕрдиреНрдп","otherDown","thumb-down"]],["рдЖрдЦрд┐рд░реА рдмрд╛рд░ 2025-08-21 (UTC) рдХреЛ рдЕрдкрдбреЗрдЯ рдХрд┐рдпрд╛ рдЧрдпрд╛."],[[["\u003cp\u003eExplore the use cases and code samples page to find examples for the YouTube Data API and YouTube Live Streaming API.\u003c/p\u003e\n"],["\u003cp\u003eThe use cases and code samples page provides interactive samples in Java, JavaScript, PHP, and Python, allowing you to adjust parameters and see updated code.\u003c/p\u003e\n"],["\u003cp\u003eStandalone code snippets are available for Apps Script, Go, .NET, and Ruby, demonstrating common methods like uploading videos, searching for videos, and managing playlists.\u003c/p\u003e\n"],["\u003cp\u003eThe page provides code samples for several common methods including subscriptions.insert, channels.list, search.list, and videos.update, allowing developers to find quick snippets for their use cases.\u003c/p\u003e\n"],["\u003cp\u003eCode samples are provided for various common tasks such as authorization, uploading, and searching for videos, as well as creating playlists and subscriptions.\u003c/p\u003e\n"]]],["The document details code samples for the YouTube Data API and YouTube Live Streaming API. Users can find examples for common use cases by selecting an API resource and method. The APIs Explorer widget allows interaction with samples, including parameter adjustments, with working code in Java, JavaScript, PHP, and Python. Additional code snippets are available in Apps Script, Go, .NET, and Ruby, covering actions like subscribing to channels, retrieving uploads, searching videos, updating videos, and creating playlists.\n"],null,["# YouTube Data API (v3) Code Samples\n\nYou can explore common use cases for the YouTube Data API and YouTube Live Streaming API on the [use cases and code samples](/youtube/v3/code_samples/code_snippets) page.\n\nThe 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.\n\nThe following section lists code samples available in other languages.\n\nStandalone code snippets\n------------------------\n\nThe 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](/youtube/v3/code_samples/code_snippets) page. \n\n### Apps Script\n\n| Code sample | Methods |\n|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------|\n| [Add a channel subscription](/youtube/v3/code_samples/apps-script#subscribe_to_channel) | [subscriptions.insert](/youtube/v3/docs/subscriptions/insert) |\n| [Retrieve current user's uploads](/youtube/v3/code_samples/apps-script#retrieve_my_uploads) | [channels.list](/youtube/v3/docs/channels/list) |\n| [Search for videos related to a keyword](/youtube/v3/code_samples/apps-script#search_by_keyword) | [search.list](/youtube/v3/docs/search/list) |\n| [Update a video](/youtube/v3/code_samples/apps-script#update_video) | [videos.update](/youtube/v3/docs/videos/update) |\n\n### Go\n\n| Code sample | Methods |\n|-----------------------------------------------------------------------------------------|-----------------------------------------------------------|\n| [Authorize a request](/youtube/v3/code_samples/go#authorize_a_request) | Any method requiring authorization |\n| [Retrieve current user's uploads](/youtube/v3/code_samples/go#retrieve_my_uploads) | [playlistItems.list](/youtube/v3/docs/playlistItems/list) |\n| [Search for videos related to a keyword](/youtube/v3/code_samples/go#search_by_keyword) | [search.list](/youtube/v3/docs/search/list) |\n| [Upload a video](/youtube/v3/code_samples/go#upload_a_video) | [videos.insert](/youtube/v3/docs/videos/insert) |\n\n### .NET\n\n| Code sample | Methods |\n|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| [Create a playlist](/youtube/v3/code_samples/dotnet#create_a_playlist) | [playlists.insert](/youtube/v3/docs/playlists/insert) |\n| [Retrieve current user's uploaded videos](/youtube/v3/code_samples/dotnet#retrieve_my_uploads) | [channels.list](/youtube/v3/docs/channels/list) [playlistItems.list](/youtube/v3/docs/playlistItems/list) |\n| [Search for videos related to a keyword](/youtube/v3/code_samples/dotnet#search_by_keyword) | [search.list](/youtube/v3/docs/search/list) |\n| [Upload a video](/youtube/v3/code_samples/dotnet#upload_a_video) | [videos.insert](/youtube/v3/docs/videos/insert) |\n\n### Ruby\n\n| Code sample | Methods |\n|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| [Authorize a request](/youtube/v3/code_samples/ruby#authorize_a_request) | Any method requiring authorization |\n| [Create a channel subscription](/youtube/v3/code_samples/ruby#add_a_channel_subscription) | [subscriptions.insert](/youtube/v3/docs/subscriptions/insert) |\n| [Retrieve current user's uploads](/youtube/v3/code_samples/ruby#retrieve_my_uploads) | [channels.list](/youtube/v3/docs/channels/list) [playlistItems.list](/youtube/v3/docs/playlistItems/list) |\n| [Search for videos related to a keyword](/youtube/v3/code_samples/ruby#search_by_keyword) | [search.list](/youtube/v3/docs/search/list) |\n| [Upload a video](/youtube/v3/code_samples/ruby#upload_a_video) | [videos.insert](/youtube/v3/docs/videos/insert) |\n\nYou may also be able to adapt one of the other\n[Ruby samples](https://github.com/googleapis/google-api-ruby-client/tree/main/samples)."]]