CINXE.COM
YouTube Data API Overview | Google for Developers
<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Google for Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#ff0000"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/developers/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/css/app.css"> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/favicon-new.png"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/touchicon-180-new.png"><link rel="canonical" href="https://developers.google.com/youtube/v3/getting-started"><link rel="search" type="application/opensearchdescription+xml" title="Google for Developers" href="https://developers.google.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://developers.google.com/youtube/v3/getting-started" /><link rel="alternate" hreflang="x-default" href="https://developers.google.com/youtube/v3/getting-started" /><link rel="alternate" hreflang="ar" href="https://developers.google.com/youtube/v3/getting-started?hl=ar" /><link rel="alternate" hreflang="bn" href="https://developers.google.com/youtube/v3/getting-started?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://developers.google.com/youtube/v3/getting-started?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://developers.google.com/youtube/v3/getting-started?hl=zh-tw" /><link rel="alternate" hreflang="fa" href="https://developers.google.com/youtube/v3/getting-started?hl=fa" /><link rel="alternate" hreflang="fr" href="https://developers.google.com/youtube/v3/getting-started?hl=fr" /><link rel="alternate" hreflang="de" href="https://developers.google.com/youtube/v3/getting-started?hl=de" /><link rel="alternate" hreflang="he" href="https://developers.google.com/youtube/v3/getting-started?hl=he" /><link rel="alternate" hreflang="hi" href="https://developers.google.com/youtube/v3/getting-started?hl=hi" /><link rel="alternate" hreflang="id" href="https://developers.google.com/youtube/v3/getting-started?hl=id" /><link rel="alternate" hreflang="it" href="https://developers.google.com/youtube/v3/getting-started?hl=it" /><link rel="alternate" hreflang="ja" href="https://developers.google.com/youtube/v3/getting-started?hl=ja" /><link rel="alternate" hreflang="ko" href="https://developers.google.com/youtube/v3/getting-started?hl=ko" /><link rel="alternate" hreflang="pl" href="https://developers.google.com/youtube/v3/getting-started?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://developers.google.com/youtube/v3/getting-started?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://developers.google.com/youtube/v3/getting-started?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://developers.google.com/youtube/v3/getting-started?hl=es-419" /><link rel="alternate" hreflang="th" href="https://developers.google.com/youtube/v3/getting-started?hl=th" /><link rel="alternate" hreflang="tr" href="https://developers.google.com/youtube/v3/getting-started?hl=tr" /><link rel="alternate" hreflang="vi" href="https://developers.google.com/youtube/v3/getting-started?hl=vi" /><title>YouTube Data API Overview | Google for Developers</title> <meta property="og:title" content="YouTube Data API Overview | Google for Developers"><meta property="og:url" content="https://developers.google.com/youtube/v3/getting-started"><meta property="og:image" content="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/opengraph/youtube-theme.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "YouTube Data API Overview" } </script><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "YouTube", "item": "https://developers.google.com/youtube" },{ "@type": "ListItem", "position": 2, "name": "Data API", "item": "https://developers.google.com/youtube/v3" },{ "@type": "ListItem", "position": 3, "name": "YouTube Data API Overview", "item": "https://developers.google.com/youtube/v3/getting-started" }] } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="" template="page" theme="youtube-theme" type="article" layout="docs" concierge='closed' display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner"> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="https://developers.google.com/youtube"> <div class="devsite-product-logo-container" size="medium" > <picture> <img class="devsite-product-logo" alt="YouTube" src="https://developers.google.com/static/site-assets/logo-youtube.svg" srcset=" /static/site-assets/logo-youtube.svg" sizes="64px" loading="lazy" > </picture> </div> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" aria-label="Product breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developers.google.com/youtube" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="YouTube" > YouTube </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/youtube/v3" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="YouTube Data API" > Data API </a> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="YouTube Data API" tenant-name="Google for Developers" project-scope="/youtube/v3" url-scoped="https://developers.google.com/s/results/youtube/v3" > <form class="devsite-search-form" action="https://developers.google.com/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es" >Español</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <devsite-user enable-profiles fp-auth id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab > <a href="https://developers.google.com/youtube/v3" track-metadata-eventdetail="https://developers.google.com/youtube/v3" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - home" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Home" track-name="home" > Home </a> </tab> <tab class="devsite-active"> <a href="https://developers.google.com/youtube/v3/getting-started" track-metadata-eventdetail="https://developers.google.com/youtube/v3/getting-started" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - guides" track-metadata-module="primary nav" aria-label="Guides, selected" data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" > Guides </a> </tab> <tab > <a href="https://developers.google.com/youtube/v3/docs" track-metadata-eventdetail="https://developers.google.com/youtube/v3/docs" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - reference" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" > Reference </a> </tab> <tab > <a href="https://developers.google.com/youtube/v3/code_samples" track-metadata-eventdetail="https://developers.google.com/youtube/v3/code_samples" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - samples" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" > Samples </a> </tab> <tab > <a href="https://developers.google.com/youtube/v3/support" track-metadata-eventdetail="https://developers.google.com/youtube/v3/support" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - support" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Support" track-name="support" > Support </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" > <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="https://developers.google.com/youtube"> <div class="devsite-product-logo-container" size="medium" > <picture> <img class="devsite-product-logo" alt="YouTube" src="https://developers.google.com/static/site-assets/logo-youtube.svg" srcset=" /static/site-assets/logo-youtube.svg" sizes="64px" loading="lazy" > </picture> </div> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" aria-label="Upper header breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developers.google.com/youtube" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="YouTube" > YouTube </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/youtube/v3" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Upper Header" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="YouTube Data API" > Data API </a> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/youtube/v3" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Home" track-name="home" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Home" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Home </span> </a> </li> <li class="devsite-nav-item"> <a href="/youtube/v3/getting-started" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Guides" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Guides </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/youtube/v3/docs" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Reference" track-name="reference" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Reference" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Reference </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/youtube/v3/code_samples" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Samples </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/youtube/v3/support" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Support" track-name="support" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Support" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Support </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item"><a href="/youtube/v3/getting-started" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/getting-started" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/getting-started" ><span class="devsite-nav-text" tooltip>Overview</span></a></li> <li class="devsite-nav-item"><a href="/youtube/v3/libraries" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/libraries" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/libraries" ><span class="devsite-nav-text" tooltip>Client Libraries</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Authorize Requests</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/youtube/v3/guides/authentication" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/authentication" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/authentication" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/youtube/registering_an_application" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/registering_an_application" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/registering_an_application" ><span class="devsite-nav-text" tooltip>Get Auth Credentials</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/auth/server-side-web-apps" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/auth/server-side-web-apps" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/auth/server-side-web-apps" ><span class="devsite-nav-text" tooltip>Server-side Web Apps</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/auth/client-side-web-apps" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/auth/client-side-web-apps" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/auth/client-side-web-apps" ><span class="devsite-nav-text" tooltip>Client-side Web Apps</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/auth/installed-apps" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/auth/installed-apps" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/auth/installed-apps" ><span class="devsite-nav-text" tooltip>Installed Apps</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/auth/devices" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/auth/devices" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/auth/devices" ><span class="devsite-nav-text" tooltip>Devices</span></a></li></ul></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Quickstarts</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/android" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/android" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/android" ><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/apps-script" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/apps-script" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/apps-script" ><span class="devsite-nav-text" tooltip>Apps Script</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/go" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/go" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/go" ><span class="devsite-nav-text" tooltip>Go</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/ios" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/ios" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/ios" ><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/java" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/java" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/java" ><span class="devsite-nav-text" tooltip>Java</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/js" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/js" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/js" ><span class="devsite-nav-text" tooltip>JavaScript</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/nodejs" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/nodejs" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/nodejs" ><span class="devsite-nav-text" tooltip>Node.js</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/php" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/php" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/php" ><span class="devsite-nav-text" tooltip>PHP</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/python" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/python" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/python" ><span class="devsite-nav-text" tooltip>Python</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/quickstart/ruby" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/quickstart/ruby" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/quickstart/ruby" ><span class="devsite-nav-text" tooltip>Ruby</span></a></li></ul></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Guides and Tutorials</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/youtube/v3/determine_quota_cost" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/determine_quota_cost" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/determine_quota_cost" ><span class="devsite-nav-text" tooltip>Quota costs for API requests</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/quota_and_compliance_audits" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/quota_and_compliance_audits" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/quota_and_compliance_audits" ><span class="devsite-nav-text" tooltip>Quota and Compliance Audits</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/uploading_a_video" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/uploading_a_video" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/uploading_a_video" ><span class="devsite-nav-text" tooltip>Upload a Video</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/using_resumable_upload_protocol" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/using_resumable_upload_protocol" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/using_resumable_upload_protocol" ><span class="devsite-nav-text" tooltip>Send Resumable Uploads</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/made_for_kids_status" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/made_for_kids_status" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/made_for_kids_status" ><span class="devsite-nav-text" tooltip>Find MadeForKids video status</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/push_notifications" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/push_notifications" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/push_notifications" ><span class="devsite-nav-text" tooltip>Subscribe to Push Notifications</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/working_with_channel_ids" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/working_with_channel_ids" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/working_with_channel_ids" ><span class="devsite-nav-text" tooltip>Work with Channel IDs</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/moving_to_oauth" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/moving_to_oauth" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/moving_to_oauth" ><span class="devsite-nav-text" tooltip>Move from ClientLogin to OAuth</span></a></li></ul></li> <li class="devsite-nav-item"><a href="/youtube/v3/sample_requests" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/sample_requests" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/sample_requests" ><span class="devsite-nav-text" tooltip>Sample Requests</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Implementation Guide</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/activities" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/activities" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/activities" ><span class="devsite-nav-text" tooltip>Activities</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/captions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/captions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/captions" ><span class="devsite-nav-text" tooltip>Captions</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/channels" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/channels" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/channels" ><span class="devsite-nav-text" tooltip>Channels</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/comments" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/comments" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/comments" ><span class="devsite-nav-text" tooltip>Comments</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/pagination" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/pagination" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/pagination" ><span class="devsite-nav-text" tooltip>Pagination</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/partial" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/partial" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/partial" ><span class="devsite-nav-text" tooltip>Partial responses</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/playlists" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/playlists" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/playlists" ><span class="devsite-nav-text" tooltip>Playlists</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/ratings" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/ratings" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/ratings" ><span class="devsite-nav-text" tooltip>Ratings</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/search" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/search" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/search" ><span class="devsite-nav-text" tooltip>Search requests</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/subscriptions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/subscriptions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/subscriptions" ><span class="devsite-nav-text" tooltip>Subscriptions</span></a></li><li class="devsite-nav-item"><a href="/youtube/v3/guides/implementation/videos" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /youtube/v3/guides/implementation/videos" track-type="bookNav" track-name="click" track-metadata-eventdetail="/youtube/v3/guides/implementation/videos" ><span class="devsite-nav-text" tooltip>Videos</span></a></li></ul></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Tools</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-external"><a href="https://developers.google.com/apis-explorer/#p/youtube/v3/" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: https://developers.google.com/apis-explorer/#p/youtube/v3/" track-type="bookNav" track-name="click" track-metadata-eventdetail="https://developers.google.com/apis-explorer/#p/youtube/v3/" ><span class="devsite-nav-text" tooltip>APIs Explorer</span><span class="devsite-nav-icon material-icons" data-icon="external" data-title="External" aria-hidden="true"></span></a></li></ul></li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav > <devsite-content> <article class="devsite-article"> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developers.google.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="" > Home </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/products" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="" > Products </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/youtube" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="YouTube" > YouTube </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/youtube/v3" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="4" track-type="globalNav" track-name="breadcrumb" track-metadata-position="4" track-metadata-eventdetail="YouTube Data API" > Data API </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developers.google.com/youtube/v3/getting-started" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="5" track-type="globalNav" track-name="breadcrumb" track-metadata-position="5" track-metadata-eventdetail="" > Guides </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <h1 class="devsite-page-title" tabindex="-1"> YouTube Data API Overview </h1> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <div class="devsite-page-title-meta"><devsite-view-release-notes></devsite-view-release-notes></div> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <div class="devsite-article-body clearfix "> <h2 id="intro" data-text="Introduction" tabindex="-1">Introduction</h2> <p>This document is intended for developers who want to write applications that interact with YouTube. It explains basic concepts of YouTube and of the API itself. It also provides an overview of the different functions that the API supports.</p> <h3 id="before-you-start" data-text="Before you start" tabindex="-1">Before you start</h3> <ol> <li> <p>You need a <a href="https://www.google.com/accounts/NewAccount">Google Account</a> to access the Google API Console, request an API key, and register your application.</p> </li> <li> <p>Create a project in the <a href="https://console.developers.google.com">Google Developers Console</a> and <a href="/youtube/registering_an_application">obtain authorization credentials</a> so your application can submit API requests.</p> </li> <li> <p>After creating your project, make sure the YouTube Data API is one of the services that your application is registered to use:</p> <p><ol> <li>Go to the <a href="https://console.cloud.google.com/">API Console</a> and select the project that you just registered.</li> <li> Visit the <a href="https://console.cloud.google.com/apis/enabled">Enabled APIs page</a>. In the list of APIs, make sure the status is <b>ON</b> for the <b>YouTube Data API v3</b>. </li> </ol></p> </li> <li> <p>If your application will use any API methods that require user authorization, read the <a href="/youtube/v3/guides/authentication">authentication</a> guide to learn how to implement OAuth 2.0 authorization.</p> </li> <li> <p>Select a <a href="/youtube/v3/libraries">client library</a> to simplify your API implementation.</p> </li> <li> <p>Familiarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. JSON is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see <a href="http://json.org">json.org</a>.</p> </li> </ol> <h2 id="resources" data-text="Resources and resource types" tabindex="-1">Resources and resource types</h2> <p>A resource is an individual data entity with a unique identifier. The table below describes the different types of resources that you can interact with using the API.</p> <table class="responsive"> <tr> <th colspan="2">Resources</th> </tr> <tr> <td><code translate="no" dir="ltr">activity</code></td> <td>Contains information about an action that a particular user has taken on the YouTube site. User actions that are reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, and posting a channel bulletin, among others.</td> </tr> <tr> <td><code translate="no" dir="ltr">channel</code></td> <td>Contains information about a single YouTube channel.</td> </tr> <tr> <td><code translate="no" dir="ltr">channelBanner</code></td> <td>Identifies the URL to use to set a newly uploaded image as the banner image for a channel.</td> </tr> <tr> <td><code translate="no" dir="ltr">channelSection</code></td> <td>Contains information about a set of videos that a channel has chosen to feature. For example, a section could feature a channel's latest uploads, most popular uploads, or videos from one or more playlists.</td> </tr> <tr> <td><code translate="no" dir="ltr">guideCategory</code></td> <td>Identifies a category that YouTube associates with channels based on their content or other indicators, such as popularity. Guide categories seek to organize channels in a way that makes it easier for YouTube users to find the content they're looking for. While channels could be associated with one or more guide categories, they are not guaranteed to be in any guide categories.</td> </tr> <tr> <td><code translate="no" dir="ltr">i18nLanguage</code></td> <td>Identifies an application language that the YouTube website supports. The application language can also be referred to as a UI language.</td> </tr> <tr> <td><code translate="no" dir="ltr">i18nRegion</code></td> <td>Identifies a geographic area that a YouTube user can select as the preferred content region. The content region can also be referred to as a content locale.</td> </tr> <tr> <td><code translate="no" dir="ltr">playlist</code></td> <td>Represents a single YouTube playlist. A playlist is a collection of videos that can be viewed sequentially and shared with other users.</td> </tr> <tr> <td><code translate="no" dir="ltr">playlistItem</code></td> <td>Identifies a resource, such as a video, that is part of a playlist. The playlistItem resource also contains details that explain how the included resource is used in the playlist.</td> </tr> <tr> <td><code translate="no" dir="ltr">search result</code></td> <td>Contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data.</td> </tr> <tr> <td><code translate="no" dir="ltr">subscription</code></td> <td>Contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.</td> </tr> <tr> <td><code translate="no" dir="ltr">thumbnail</code></td> <td>Identifies thumbnail images associated with a resource.</td> </tr> <tr> <td><code translate="no" dir="ltr">video</code></td> <td>Represents a single YouTube video.</td> </tr> <tr> <td><code translate="no" dir="ltr">videoCategory</code></td> <td>Identifies a category that has been or could be associated with uploaded videos.</td> </tr> <tr> <td><code translate="no" dir="ltr">watermark</code></td> <td>Identifies an image that displays during playbacks of a specified channel's videos. The channel owner can also specify a target channel to which the image links as well as timing details that determine when the watermark appears during video playbacks and then length of time it is visible.</td> </tr> </table> <p>Note that, in many cases, a resource contains references to other resources. For example, a <code translate="no" dir="ltr">playlistItem</code> resource's <code translate="no" dir="ltr">snippet.resourceId.videoId</code> property identifies a video resource that, in turn, contains complete information about the video. As another example, a search result contains either a <code translate="no" dir="ltr">videoId</code>, <code translate="no" dir="ltr">playlistId</code>, or <code translate="no" dir="ltr">channelId</code> property that identifies a particular video, playlist, or channel resource.</p> <h3 id="supported-operations" data-text="Supported operations" tabindex="-1">Supported operations</h3> <p>The following table shows the most common methods that the API supports. Some resources also support other methods that perform functions more specific to those resources. For example, the <code translate="no" dir="ltr">videos.rate</code> method associates a user rating with a video, and the <code translate="no" dir="ltr">thumbnails.set</code> method uploads a video thumbnail image to YouTube and associates it with a video.</p> <table class="responsive"> <tr> <th colspan="2">Operations</th> </tr> <tr> <td><code translate="no" dir="ltr">list</code></td> <td>Retrieves (<code translate="no" dir="ltr">GET</code>) a list of zero or more resources.</td> </tr> <tr> <td><code translate="no" dir="ltr">insert</code></td> <td>Creates (<code translate="no" dir="ltr">POST</code>) a new resource.</td> </tr> <tr> <td><code translate="no" dir="ltr">update</code></td> <td>Modifies (<code translate="no" dir="ltr">PUT</code>) an existing resource to reflect data in your request.</td> </tr> <tr> <td><code translate="no" dir="ltr">delete</code></td> <td>Removes (<code translate="no" dir="ltr">DELETE</code>) a specific resource.</td> </tr> </table> <p>The API currently supports methods to list each of the supported resource types, and it supports write operations for many resources as well.</p> <p>The table below identifies the operations that are supported for different types of resources. Operations that insert, update, or delete resources always require <a href="/youtube/v3/guides/authentication">user authorization</a>. In some cases, <code translate="no" dir="ltr">list</code> methods support both authorized and unauthorized requests, where unauthorized requests only retrieve public data while authorized requests can also retrieve information about or private to the currently authenticated user.</p> <table wborder="1"> <thead> <th colspan="5">Supported Operations</th> </thead> <tr> <td></td> <td><strong><span class="apimethod notranslate">list</span></strong></td> <td><strong><span class="apimethod notranslate">insert</span></strong></td> <td><strong><span class="apimethod notranslate">update</span></strong></td> <td><strong><span class="apimethod notranslate">delete</span></strong></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>activity</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>caption</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>channel</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>channelBanner</strong></code></td> <td><span class="compare-no"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>channelSection</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>comment</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>commentThread</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>guideCategory</strong></code></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>i18nLanguage</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>i18nRegion</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>playlist</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>playlistItem</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>search result</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>subscription</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>thumbnail</strong></code></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>video</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> <td><span class="compare-yes"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>videoCategory</strong></code></td> <td><span class="compare-yes"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> <tr> <td><code translate="no" dir="ltr"><strong>watermark</strong></code></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> <td><span class="compare-no"></span></td> </tr> </table> <h2 id="quota" data-text="Quota usage" tabindex="-1">Quota usage</h2> <p>The <span class="notranslate">YouTube Data API</span> uses a quota to ensure that developers use the service as intended and do not create applications that unfairly reduce service quality or limit access for others. All API requests, including invalid requests, incur at least a one-point quota cost. You can find the quota available to your application in the <a class="notranslate" href="https://console.cloud.google.com/">API Console</a>.</p> <p>Projects that enable the YouTube Data API have a default quota allocation of 10,000 units per day, an amount sufficient for the overwhelming majority of our API users. Default quota, which is subject to change, helps us optimize quota allocations and scale our infrastructure in a way that is more meaningful to our API users. You can see your quota usage on the <a href="https://console.developers.google.com/iam-admin/quotas">Quotas</a> page in the API Console.</p> <p class="special"><b>Note:</b> If you reach the quota limit, you can request additional quota by completing the <a href="https://support.google.com/youtube/contact/yt_api_form">Quota extension request form</a> for YouTube API Services.</p> <h3 id="calculating-quota-usage" data-text="Calculating quota usage" tabindex="-1">Calculating quota usage</h3> <p>Google calculates your quota usage by assigning a cost to each request. Different types of operations have different quota costs. For example:</p> <ul> <li>A read operation that retrieves a list of resources -- channels, videos, playlists -- usually costs 1 unit.</li> <li>A write operation that creates, updates, or deletes a resource usually has costs <code translate="no" dir="ltr">50</code> units.</li> <li>A search request costs <code translate="no" dir="ltr">100</code> units.</li> <li>A video upload costs <code translate="no" dir="ltr">1600</code> units.</li> </ul> <p>The <a href="/youtube/v3/determine_quota_cost">Quota costs for API requests</a> table shows the quota cost of each API method. With these rules in mind, you can estimate the number of requests that your application could send per day without exceeding your quota.</p> <h2 id="partial" data-text="Partial resources" tabindex="-1">Partial resources</h2> <p>The API allows, and actually requires, the retrieval of partial resources so that applications avoid transferring, parsing, and storing unneeded data. This approach also ensures that the API uses network, <span class="notranslate">CPU</span>, and memory resources more efficiently.</p> <p>The API supports two request parameters, which are explained in the following sections, that enable you to identify the resource properties that should be included in API responses.</p> <p><ul> <li>The <code translate="no" dir="ltr"><a href="#part">part</a></code> parameter identifies groups of properties that should be returned for a resource.</li> <li>The <code translate="no" dir="ltr"><a href="#fields">fields</a></code> parameter filters the API response to only return specific properties within the requested resource parts.</li> </ul></p> <h3 id="part" data-text="How to use the part parameter" tabindex="-1">How to use the <code translate="no" dir="ltr">part</code> parameter</h3> <p>The <code translate="no" dir="ltr">part</code> parameter is a required parameter for any API request that retrieves or returns a resource. The parameter identifies one or more top-level (non-nested) resource properties that should be included in an API response. For example, a <code translate="no" dir="ltr"><a href="/youtube/v3/docs/videos#resource">video</a></code> resource has the following parts:</p> <ul style="list-style-type:none"> <li><code translate="no" dir="ltr">snippet</code></li> <li><code translate="no" dir="ltr">contentDetails</code></li> <li><code translate="no" dir="ltr">fileDetails</code></li> <li><code translate="no" dir="ltr">player</code></li> <li><code translate="no" dir="ltr">processingDetails</code></li> <li><code translate="no" dir="ltr">recordingDetails</code></li> <li><code translate="no" dir="ltr">statistics</code></li> <li><code translate="no" dir="ltr">status</code></li> <li><code translate="no" dir="ltr">suggestions</code></li> <li><code translate="no" dir="ltr">topicDetails</code></li> </ul> <p>All of these parts are objects that contain nested properties, and you can think of these objects as groups of metadata fields that the API server might (or might not) retrieve. As such, the <code translate="no" dir="ltr">part</code> parameter requires you to select the resource components that your application actually uses. This requirement serves two key purposes:</p> <ul> <li>It reduces latency by preventing the API server from spending time retrieving metadata fields that your application doesn't use.</li> <li>It reduces bandwidth usage by reducing (or eliminating) the amount of unnecessary data that your application might retrieve.</li> </ul> <p>Over time, as resources add more parts, these benefits will only increase since your application will not be requesting newly introduced properties that it doesn't support.</p> <h3 id="fields" data-text="How to use the fields parameter" tabindex="-1">How to use the <code translate="no" dir="ltr">fields</code> parameter</h3> <p>The <code translate="no" dir="ltr">fields</code> parameter filters the API response, which only contains the resource parts identified in the <code translate="no" dir="ltr">part</code> parameter value, so that the response only includes a specific set of fields. The <code translate="no" dir="ltr">fields</code> parameter lets you remove nested properties from an API response and thereby further reduce your bandwidth usage. (The <code translate="no" dir="ltr">part</code> parameter cannot be used to filter nested properties from a response.)</p> <p>The following rules explain the supported syntax for the <code translate="no" dir="ltr">fields</code> parameter value, which is loosely based on <span class="notranslate">XPath</span> syntax:</p> <p><ul> <li>Use a comma-separated list (<code translate="no" dir="ltr">fields=a,b</code>) to select multiple fields.</li> <li>Use an asterisk (<code translate="no" dir="ltr">fields=*</code>) as a wildcard to identify all fields.</li> <li>Use parentheses (<code translate="no" dir="ltr">fields=a(b,c)</code>) to specify a group of nested properties that will be included in the API response.</li> <li>Use a forward slash (<code translate="no" dir="ltr">fields=a/b</code>) to identify a nested property.</li> </ul></p> <p>In practice, these rules often allow several different <code translate="no" dir="ltr">fields</code> parameter values to retrieve the same API response. For example, if you want to retrieve the playlist item ID, title, and position for every item in a playlist, you could use any of the following values:</p> <p><ul> <li><code translate="no" dir="ltr">fields=items/id,playlistItems/snippet/title,playlistItems/snippet/position</code></li> <li><code translate="no" dir="ltr">fields=items(id,snippet/title,snippet/position)</code></li> <li><code translate="no" dir="ltr">fields=items(id,snippet(title,position))</code></li> </ul></p> <p class="note"><strong>Note:</strong> As with all query parameter values, the <code translate="no" dir="ltr">fields</code> parameter value must be URL encoded. For better readability, the examples in this document omit the encoding.</p> <h3 id="Sample_Partial_Requests" data-text="Sample partial requests" tabindex="-1">Sample partial requests</h3> <p>The examples below demonstrate how you can use the <code translate="no" dir="ltr">part</code> and <code translate="no" dir="ltr">fields</code> parameters to ensure that API responses only include the data that your application uses:</p> <ol> <li>Example 1 returns a video resource that includes four parts as well as <code translate="no" dir="ltr">kind</code> and <code translate="no" dir="ltr">etag</code> properties.</li> <li>Example 2 returns a video resource that includes two parts as well as <code translate="no" dir="ltr">kind</code> and <code translate="no" dir="ltr">etag</code> properties.</li> <li>Example 3 returns a video resource that includes two parts but excludes <code translate="no" dir="ltr">kind</code> and <code translate="no" dir="ltr">etag</code> properties.</li> <li>Example 4 returns a video resource that includes two parts but excludes <code translate="no" dir="ltr">kind</code> and <code translate="no" dir="ltr">etag</code> as well as some nested properties in the resource's <code translate="no" dir="ltr">snippet</code> object.</li> </ol> <section class="kd-tabbed-horz" id="partial-examples"> <article class="selected"> <header>Example 1</header> <pre class="prettyprint lang-proto" translate="no" dir="ltr"> <strong>URL:</strong> <span class="notranslate">https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=<span class="replaceable-credential"><var translate="no">YOUR_API_KEY</var></span><br/> &part=snippet,contentDetails,statistics,status</span> <strong>Description:</strong> This example retrieves a <code translate="no" dir="ltr">video</code> resource and identifies several resource parts that should be included in the API response. <strong>API response:</strong> <div class="notranslate"> { "kind": "youtube#videoListResponse", "etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"", "videos": [ { "id": "7lCDEYXw3mM", "kind": "youtube#video", "etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"", "snippet": { "publishedAt": "2012-06-20T22:45:24.000Z", "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw", "title": "Google I/O 101: Q&A On Using Google APIs", "description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg" } }, "categoryId": "28" }, "contentDetails": { "duration": "PT15M51S", "aspectRatio": "RATIO_16_9" }, "statistics": { "viewCount": "3057", "likeCount": "25", "dislikeCount": "0", "favoriteCount": "17", "commentCount": "12" }, "status": { "uploadStatus": "STATUS_PROCESSED", "privacyStatus": "PRIVACY_PUBLIC" } } ] }</div></pre> </article> <article> <header>Example 2</header> <pre class="prettyprint lang-proto" translate="no" dir="ltr"> <strong>URL:</strong> <span class="notranslate">https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=<span class="replaceable-credential"><var translate="no">YOUR_API_KEY</var></span><br/> &part=snippet,statistics</span> <strong>Description:</strong> This example modifies the <code translate="no" dir="ltr">part</code> parameter value so that the <code translate="no" dir="ltr">contentDetails</code> and <code translate="no" dir="ltr">status</code> properties are not included in the response. <strong>API response:</strong> <div class="notranslate"> { "kind": "youtube#videoListResponse", "etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"", "videos": [ { "id": "7lCDEYXw3mM", "kind": "youtube#video", "etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"", "snippet": { "publishedAt": "2012-06-20T22:45:24.000Z", "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw", "title": "Google I/O 101: Q&A On Using Google APIs", "description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg" } }, "categoryId": "28" }, "statistics": { "viewCount": "3057", "likeCount": "25", "dislikeCount": "0", "favoriteCount": "17", "commentCount": "12" } } ] }</div></pre> </article> <article> <header>Example 3</header> <pre class="prettyprint lang-proto" translate="no" dir="ltr"> <strong>URL:</strong> <span class="notranslate">https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=<span class="replaceable-credential"><var translate="no">YOUR_API_KEY</var></span><br/> &part=snippet,statistics&fields=items(id,snippet,statistics)</span> <strong>Description:</strong> This example adds the <code translate="no" dir="ltr">fields</code> parameter to remove all <code translate="no" dir="ltr">kind</code> and <code translate="no" dir="ltr">etag</code> properties from the API response. <strong>API response:</strong> <div class="notranslate"> { "videos": [ { "id": "7lCDEYXw3mM", "snippet": { "publishedAt": "2012-06-20T22:45:24.000Z", "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw", "title": "Google I/O 101: Q&A On Using Google APIs", "description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg" } }, "categoryId": "28" }, "statistics": { "viewCount": "3057", "likeCount": "25", "dislikeCount": "0", "favoriteCount": "17", "commentCount": "12" } } ] }</div></pre> </article> <article> <header>Example 4</header> <pre class="prettyprint lang-proto" translate="no" dir="ltr"> <strong>URL:</strong> <span class="notranslate">https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=<span class="replaceable-credential"><var translate="no">YOUR_API_KEY</var></span><br/> &fields=items(id,snippet(channelId,title,categoryId),statistics)&part=snippet,statistics</span> <strong>Description:</strong> This example modifies the <code translate="no" dir="ltr">fields</code> parameter from example 3 so that in the API response, each video resource's <code translate="no" dir="ltr">snippet</code> object only includes the <code translate="no" dir="ltr">channelId</code>, <code translate="no" dir="ltr">title</code>, and <code translate="no" dir="ltr">categoryId</code> properties. <strong>API response:</strong> <div class="notranslate"> { "videos": [ { "id": "7lCDEYXw3mM", "snippet": { "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw", "title": "Google I/O 101: Q&A On Using Google APIs", "categoryId": "28" }, "statistics": { "viewCount": "3057", "likeCount": "25", "dislikeCount": "0", "favoriteCount": "17", "commentCount": "12" } } ] }</div></pre> </article> </section> <h2 id="performance" data-text="Optimizing performance" tabindex="-1">Optimizing performance</h2> <section> <h3 id="etags" data-text="Using ETags" tabindex="-1">Using ETags</h3> <p><span class="notranslate">ETags</span>, a standard part of the <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-etag">HTTP protocol</a>, allow applications to refer to a specific version of a particular API resource. The resource could be an entire feed or an item in that feed. This functionality supports the following use cases:</p> <ul> <li> <p><strong>Caching and conditional retrieval</strong> – Your application can cache API resources and their ETags. Then, when your application requests a stored resource again, it specifies the ETag associated with that resource. If the resource has changed, the API returns the modified resource and the ETag associated with that version of the resource. If the resource has not changed, the API returns an HTTP 304 response (<code translate="no" dir="ltr">Not Modified</code>), which indicates that the resource has not changed. Your application can reduce latency and bandwidth usage by serving cached resources in this manner.</p> <p>The client libraries for Google APIs differ in their support of ETags. For example, the JavaScript client library supports ETags via a whitelist for allowed request headers that includes <code translate="no" dir="ltr">If-Match</code> and <code translate="no" dir="ltr">If-None-Match</code>. The whitelist allows normal browser caching to occur so that if a resource's ETag has not changed, the resource can be served from the browser cache. The Obj-C client, on the other hand, does not support ETags.</p> </li> <li> <p><strong>Protecting against inadvertent overwrites of changes</strong> – ETags help to ensure that multiple API clients don't inadvertently overwrite each other's changes. When updating or deleting a resource, your application can specify the resource's ETag. If the ETag doesn't match the most recent version of that resource, then the API request fails.</p> </li> </ul> <p>Using ETags in your application provides several benefits:</p> <ul> <li>The API responds more quickly to requests for cached but unchanged resources, yielding lower latency and lower bandwidth usage.</li> <li>Your application will not inadvertently overwrite changes to a resource that were made from another API client.</li> </ul> <p>The <a class="notranslate" href="/api-client-library/javascript/start/start-js">Google APIs Client Library for JavaScript</a> supports <code translate="no" dir="ltr">If-Match</code> and <code translate="no" dir="ltr">If-None-Match</code> HTTP request headers, thereby enabling ETags to work within the context of normal browser caching.</p> </section> <section> <h3 id="gzip" data-text="Using gzip" tabindex="-1">Using gzip</h3> <p>You can also reduce the bandwidth needed for each API response by enabling gzip compression. While your application will need additional CPU time to uncompress API responses, the benefit of consuming fewer network resources usually outweighs that cost.</p> <p>To receive a gzip-encoded response you must do two things:</p> <p><ul> <li>Set the <code translate="no" dir="ltr">Accept-Encoding</code> HTTP request header to <code translate="no" dir="ltr">gzip</code>.</li> <li>Modify your user agent to contain the string <code translate="no" dir="ltr">gzip</code>.</li> </ul></p> <p>The sample HTTP headers below demonstrate these requirements for enabling gzip compression:</p> <pre class="notranslate" dir="ltr">Accept-Encoding: gzip User-Agent: my program (gzip) </pre> </section> </div> <devsite-recommendations display="in-page" hidden yield> </devsite-recommendations> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <devsite-recommendations id="recommendations-link" yield></devsite-recommendations> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>Except as otherwise noted, the content of this page is licensed under the <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 License</a>, and code samples are licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 License</a>. For details, see the <a href="https://developers.google.com/site-policies">Google Developers Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p> <p>Last updated 2023-11-08 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-content-data-template"> [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-08 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> <nav class="devsite-footer-promos nocontent" aria-label="Promotions"> <ul class="devsite-footer-promos-list"> <li class="devsite-footer-promo"> <a href="https://blog.youtube" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Promo Link (index 1)" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/logo-youtube.svg" loading="lazy" alt="Blog"> </picture> <span class="devsite-footer-promo-label"> Blog </span> </a> <div class="devsite-footer-promo-description">The latest news on the YouTube blog</div> </li> <li class="devsite-footer-promo"> <a href="https://github.com/youtube/api-samples" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Promo Link (index 2)" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/logo-github.svg" loading="lazy" alt="GitHub"> </picture> <span class="devsite-footer-promo-label"> GitHub </span> </a> <div class="devsite-footer-promo-description">Find API code samples and other YouTube open-source projects.</div> </li> <li class="devsite-footer-promo"> <a href="https://issuetracker.google.com/issues/new?component=186600&template=874803" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Promo Link (index 3)" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/developers_64dp.png" loading="lazy" alt="Issue Tracker"> </picture> <span class="devsite-footer-promo-label"> Issue Tracker </span> </a> <div class="devsite-footer-promo-description">Something wrong? Send us a bug report!</div> </li> <li class="devsite-footer-promo"> <a href="http://stackoverflow.com/questions/ask?tags=youtube-api" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Promo Link (index 4)" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/logo-stack-overflow.svg" loading="lazy" alt="Stack Overflow"> </picture> <span class="devsite-footer-promo-label"> Stack Overflow </span> </a> <div class="devsite-footer-promo-description">Ask a question under the youtube-api tag</div> </li> <li class="devsite-footer-promo"> <a href="https://www.youtube.com/user/YouTubeDev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Promo Link (index 5)" > <picture> <img class="devsite-footer-promo-icon" src="/static/site-assets/logo-youtube.svg" loading="lazy" alt="Videos"> </picture> <span class="devsite-footer-promo-label"> Videos </span> </a> <div class="devsite-footer-promo-description">Check out the YouTube Developer Relations team's YouTube channel</div> </li> </ul> </nav> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Tools</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="https://developers.google.com/apis-explorer/#p/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Google APIs Explorer </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/youtube/youtube_player_demo" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > YouTube Player Demo </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/youtube/youtube_subscribe_button" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Configure a Subscribe Button </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Issue Tracker</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="https://issuetracker.google.com/issues/new?component=186600&template=874803" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > File a bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://issuetracker.google.com/issues/new?component=186600&template=874803" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Request a feature </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://issuetracker.google.com/issues?q=componentid:186600" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > See open issues </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Product Info</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/youtube/terms" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Terms of Service </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/youtube/branding_guidelines" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Branding Guidelines </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/youtube/creating_monetizable_applications" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Monetization Guidelines </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/youtube/youtube-api-list" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > APIs subject to Deprecation Policy </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-sites" aria-label="Other Google Developers websites"> <a href="https://developers.google.com/" class="devsite-footer-sites-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Developers Link"> <picture> <img class="devsite-footer-sites-logo" src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/lockup-google-for-developers.svg" loading="lazy" alt="Google Developers"> </picture> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//developer.android.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Android Link" > Android </a> </li> <li class="devsite-footer-sites-item"> <a href="//developer.chrome.com/home" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Chrome Link" > Chrome </a> </li> <li class="devsite-footer-sites-item"> <a href="//firebase.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Firebase Link" > Firebase </a> </li> <li class="devsite-footer-sites-item"> <a href="//cloud.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Cloud Platform Link" > Google Cloud Platform </a> </li> <li class="devsite-footer-sites-item"> <a href="//ai.google.dev/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google AI Link" > Google AI </a> </li> <li class="devsite-footer-sites-item"> <a href="/products" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer All products Link" > All products </a> </li> </ul> </nav> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/terms/site-terms" data-category="Site-Wide Custom Events" data-label="Footer Terms link" > Terms </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> <li class="devsite-footer-utility-item devsite-footer-utility-button"> <span class="devsite-footer-utility-description">Sign up for the Google for Developers newsletter</span> <a class="devsite-footer-utility-link gc-analytics-event" href="/newsletter/subscribe" data-category="Site-Wide Custom Events" data-label="Footer Subscribe link" > Subscribe </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es" >Español</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> <devsite-concierge data-info-panel data-ai-panel data-api-explorer-panel > </devsite-concierge> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[{"dimensions": {"dimension1": "Signed out", "dimension3": false, "dimension6": "en", "dimension4": "YouTube Data API", "dimension5": "en", "dimension11": false}, "gaid": "UA-24532603-1", "metrics": {"ratings_count": "metric2", "ratings_value": "metric1"}, "purpose": 1}]</script> <script type="application/json" tag-management>{"at": "True", "ga4": [{"id": "G-272J68FCRF", "purpose": 1}], "ga4p": [{"id": "G-272J68FCRF", "purpose": 1}], "gtm": [], "parameters": {"internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "article", "projectName": "YouTube Data API", "signedIn": "False", "tenant": "developers", "recommendations": {"sourcePage": "", "sourceType": 0, "sourceRank": 0, "sourceIdenticalDescriptions": 0, "sourceTitleWords": 0, "sourceDescriptionWords": 0, "experiment": ""}, "experiment": {"ids": ""}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <script nonce="0KiOOW11rTVj4VQfOnDAYdYSPE5EX6"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/js/app_loader.js', '[1,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers","https://developers-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/developers/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/developers/images/favicon-new.png","https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,116,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developers.google.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["Profiles__enable_complete_playlist_endpoint","TpcFeatures__enable_mirror_tenant_redirects","Significatio__enable_by_tenant","MiscFeatureFlags__developers_footer_dark_image","Analytics__enable_clearcut_logging","Profiles__enable_profile_collections","Experiments__reqs_query_experiments","DevPro__enable_cloud_innovators_plus","EngEduTelemetry__enable_engedu_telemetry","Cloud__enable_llm_concierge_chat","MiscFeatureFlags__enable_project_variables","Search__enable_page_map","Cloud__enable_cloud_shell_fte_user_flow","Profiles__enable_completecodelab_endpoint","BookNav__enable_tenant_cache_key","Cloud__enable_legacy_calculator_redirect","Search__enable_suggestions_from_borg","Concierge__enable_pushui","Cloud__enable_cloud_shell","Profiles__enable_public_developer_profiles","CloudShell__cloud_code_overflow_menu","TpcFeatures__enable_required_headers","Search__enable_ai_eligibility_checks","Profiles__enable_developer_profiles_callout","MiscFeatureFlags__enable_view_transitions","Profiles__enable_recognition_badges","Cloud__enable_free_trial_server_call","Profiles__require_profile_eligibility_for_signin","Cloud__enable_cloudx_ping","Profiles__enable_page_saving","Search__enable_ai_search_summaries","Concierge__enable_concierge_restricted","MiscFeatureFlags__developers_footer_image","DevPro__enable_developer_subscriptions","Profiles__enable_awarding_url","MiscFeatureFlags__emergency_css","Cloud__enable_cloud_dlp_service","Cloud__enable_cloud_facet_chat","Search__enable_ai_search_summaries_restricted","MiscFeatureFlags__enable_variable_operator","Profiles__enable_dashboard_curated_recommendations","MiscFeatureFlags__enable_explain_this_code","Search__enable_dynamic_content_confidential_banner","Cloud__enable_cloudx_experiment_ids","MiscFeatureFlags__enable_firebase_utm","CloudShell__cloud_shell_button","Concierge__enable_concierge","Profiles__enable_release_notes_notifications"],null,null,"AIzaSyBLEMok-5suZ67qRPzx0qUtbnLmyT_kCVE","https://developerscontentserving-pa.clients6.google.com","AIzaSyCM4QpTRSqP5qI4Dvjt4OAScIN8sOUlO-k","https://developerscontentsearch-pa.clients6.google.com",1,4,null,"https://developerprofiles-pa.clients6.google.com",[1,"developers","Google for Developers","developers.google.com",null,"developers-dot-devsite-v2-prod.appspot.com",null,null,[1,1,[1],null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],[1,null,null,[1,20],"/recommendations/information"],null,null,null,[1,1,1],[1,1,null,1,1]],null,[null,null,null,null,null,null,"/images/lockup-new.svg","/images/touchicon-180-new.png",null,null,null,null,1,null,null,null,null,null,null,null,null,1,null,null,null,"/images/lockup-dark-theme-new.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[6,1,14,15,20,22,23,29,32,36],null,[[null,null,null,[3,7,10,2,39,17,4,32,24,11,12,13,34,15,25],null,null,[1,[["docType","Choose a content type",[["Tutorial",null,null,null,null,null,null,null,null,"Tutorial"],["Guide",null,null,null,null,null,null,null,null,"Guide"],["Sample",null,null,null,null,null,null,null,null,"Sample"]]],["product","Choose a product",[["Android",null,null,null,null,null,null,null,null,"Android"],["ARCore",null,null,null,null,null,null,null,null,"ARCore"],["ChromeOS",null,null,null,null,null,null,null,null,"ChromeOS"],["Firebase",null,null,null,null,null,null,null,null,"Firebase"],["Flutter",null,null,null,null,null,null,null,null,"Flutter"],["Assistant",null,null,null,null,null,null,null,null,"Google Assistant"],["GoogleCloud",null,null,null,null,null,null,null,null,"Google Cloud"],["GoogleMapsPlatform",null,null,null,null,null,null,null,null,"Google Maps Platform"],["GooglePay",null,null,null,null,null,null,null,null,"Google Pay & Google Wallet"],["GooglePlay",null,null,null,null,null,null,null,null,"Google Play"],["Tensorflow",null,null,null,null,null,null,null,null,"TensorFlow"]]],["category","Choose a topic",[["AiAndMachineLearning",null,null,null,null,null,null,null,null,"AI and Machine Learning"],["Data",null,null,null,null,null,null,null,null,"Data"],["Enterprise",null,null,null,null,null,null,null,null,"Enterprise"],["Gaming",null,null,null,null,null,null,null,null,"Gaming"],["Mobile",null,null,null,null,null,null,null,null,"Mobile"],["Web",null,null,null,null,null,null,null,null,"Web"]]]]]],[1,1],null,1],[[["UA-24532603-1"],["UA-22084204-5"],null,null,["UA-24532603-5"],null,null,[["G-272J68FCRF"],null,null,[["G-272J68FCRF",2]]],[["UA-24532603-1",2]],null,[["UA-24532603-5",2]],null,1],[[13,10],[4,3],[6,5],[1,1],[11,8],[14,11],[3,2],[15,12],[5,4],[12,9],[16,13]],[[1,1],[2,2]]],null,4,null,null,null,null,null,null,null,null,null,null,null,null,null,"developers.devsite.google"],null,"pk_live_5170syrHvgGVmSx9sBrnWtA5luvk9BwnVcvIi7HizpwauFG96WedXsuXh790rtij9AmGllqPtMLfhe2RSwD6Pn38V00uBCydV4m"]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>