История изменений

На этой странице перечислены изменения API данных YouTube (v3) и обновления документации. Подпишитесь на этот журнал изменений . Подписаться

13 марта 2024 г.

Примечание. Это объявление об устаревании.

Это обновление содержит следующие изменения:

Параметр sync для методов captions.insert и captions.update устарел. YouTube прекратит поддержку этого параметра с 12 апреля 2024 г.

В результате этого изменения разработчики должны включать информацию о времени при вставке или обновлении субтитров, иначе загрузка не удастся.

12 марта 2024 г.

Это обновление содержит следующие изменения:

Документация по ресурсу captions была обновлена, и теперь указано, что максимально допустимая длина поля snippet.name составляет 150 символов. API возвращает ошибку nameTooLong , если имя трека длиннее.

7 марта 2024 г.

Примечание. Это объявление об устаревании.

Свойство ресурса channel brandingSettings.channel.moderateComments устарело. YouTube прекратит поддержку этого параметра с 7 марта 2024 г.

31 января 2024 г.

Это обновление содержит следующие изменения:

Новый параметр forHandle channels.list позволяет получить информацию о канале, указав его дескриптор YouTube.

09 ноября 2023 г.

Все ссылки на ресурс videoId в разделе Comments были удалены, поскольку ресурс videoId не возвращается с помощью вызова API.

12 сентября 2023 г.

Примечание. Это объявление об устаревании.

Метод comments.markAsSpam устарел уже несколько лет. Этот метод уже не поддерживается на YouTube и больше не поддерживается через API.

Уведомление об устаревании было добавлено ко всем документам, ссылающимся на метод comments.markAsSpam .

22 августа 2023 г.

Метод search.list теперь поддерживает параметр videoPaidProductPlacement . Этот параметр позволяет фильтровать результаты поиска, чтобы включать только те видео, которые автор отметил как имеющие платное продвижение.

18 августа 2023 г.

Определение liveStreamingDetails.concurrentViewers video было обновлено, чтобы отметить, что подсчеты одновременных просмотров, возвращаемые API данных YouTube, могут отличаться от обработанных и рассылаемых спама подсчетов одновременных просмотров, доступных через YouTube Analytics. Справочный центр YouTube предоставляет дополнительную информацию о показателях прямых трансляций.

7 августа 2023 г.

Как было объявлено 12 июня 2023 г. , параметр relatedToVideoId метода search.list устарел. Этот параметр больше не поддерживается, и ссылки на него удалены из документации API.

28 июня 2023 г.

Метод Thumbnails.set теперь поддерживает ошибку uploadRateLimitExceeded , которая указывает на то, что канал загрузил слишком много миниатюр за последние 24 часа и следует повторить попытку позже.

12 июня 2023 г.

Примечание. Это объявление об устаревании.

Параметр relatedToVideoId метода search.list устарел. YouTube прекратит поддержку этого параметра с 7 августа 2023 г.

В настоящее время в документацию метода search.list добавлено уведомление об устаревании. Этот параметр будет полностью удален из документации search.list 7 августа 2023 г. или позже.

Кроме того, из руководства по реализации API был удален пример, демонстрирующий, как получить похожие видео.

22 августа 2022 г.

Исправлены аннотации типов для полей video.statistics , теперь они представляют собой строку unsigned long.

5 августа 2022 г.

YouTube изменил способ создания идентификаторов субтитров и в рамках этого изменения назначает новые идентификаторы субтитров всем дорожкам субтитров. Это изменение может оказаться несовместимым с предыдущими версиями для приложений, хранящих значения caption_id , однако оно не повлияет на приложения, которые не хранят значения caption_id .

До 1 декабря 2022 г. методы captions.list , captions.update , captions.download и captions.delete будут поддерживать как старые, так и новые идентификаторы дорожек субтитров. Однако 1 декабря 2022 года или позже YouTube прекратит поддержку старых идентификаторов треков с субтитрами. В этом случае вызов любого из этих методов API со старым идентификатором дорожки субтитров приведет к ошибке captionNotFound .

Чтобы подготовиться к этому изменению, вам следует запланировать полную замену всех сохраненных данных дорожки субтитров в период до 1 декабря 2022 г. Это означает, что для любого видео, для которого вы храните данные дорожки субтитров, вам следует удалить сохраненные в данный момент данные, а затем вызвать captions.list для получения текущего набора дорожек субтитров для видео и сохранения данных в ответе API, как обычно.

12 июля 2022 г.

Условия использования API-сервисов YouTube были обновлены. Дополнительную информацию см. в Условиях использования API-сервисов YouTube — История изменений .

27 апреля 2022 г.

Описание метода videos.insert было обновлено, чтобы отметить, что максимальный размер файла для загружаемых видео увеличился со 128 ГБ до 256 ГБ.

8 апреля 2022 г.

Определения параметров myRecentSubscribers и mySubscribers метода subscriptions.list были обновлены, чтобы отметить, что максимальное количество подписчиков, возвращаемых API, может быть ограничено. Это изменение представляет собой исправление документации, а не изменение поведения API.

15 декабря 2021 г.

Как было объявлено 18 ноября 2021 г. , в связи с изменениями, делающими счетчик лайков видео конфиденциальным на всей платформе YouTube , свойство statistics.dislikeCount video теперь является частным.

Подробнее об этом изменении можно узнать в официальном блоге YouTube .

18 ноября 2021 г.

В связи с изменениями, которые делают подсчет неприязни к видео конфиденциальным на всей платформе YouTube , свойство statistics.dislikeCount video станет частным с 13 декабря 2021 г. Это означает, что это свойство будет включаться только в ответ API от videos.list Конечная точка videos.list , если запрос API был подтвержден владельцем видео.

Это изменение не затрагивает конечную точку videos.rate .

Разработчики, которые не публикуют счетчики неприязни публично и которым все еще требуется счетчик неприязни для своего API-клиента, могут подать заявку на включение в список разрешений для исключения. Чтобы подать заявку на освобождение, вам необходимо заполнить эту форму заявления .

Подробнее об этом изменении можно узнать в официальном блоге YouTube .

2 июля 2021 г.

Примечание. Это объявление об устаревании.

Конечная точка commentThreads.update устарела и больше не поддерживается. Эта конечная точка дублирует функциональность, доступную через другие конечные точки API. Вместо этого вы можете вызвать comments.update

и, если вашему коду требуется ресурс commentThreads , выполните вторичный вызов метода commentThreads.list .

1 июля 2021 г.

Все разработчики, использующие API-сервисы YouTube, должны пройти аудит соответствия API, чтобы получить квоту, превышающую квоту по умолчанию в 10 000 единиц. На сегодняшний день как процесс аудита соответствия, так и запросы на выделение дополнительных единиц квоты выполняются разработчиками, заполняющими и отправляющими форму API-сервисов YouTube — форма аудита и расширения квоты .

Чтобы прояснить эти процессы и лучше удовлетворить потребности разработчиков, использующих наши Службы API, мы добавляем три новые формы и руководство по их заполнению:

  • Форма запроса проверенного разработчика . Разработчики, уже прошедшие аудит соответствия API, могут заполнить и отправить эту более короткую форму, чтобы запросить продление выделенной квоты.
  • Форма апелляции . Разработчики, чьи проекты API не прошли проверку соответствия (или им было отказано в увеличении квоты), могут заполнить и отправить эту форму.
  • Форма смены контроля . Разработчики или любая сторона, эксплуатирующая клиент API от имени разработчика, которая испытывает смену контроля (например, посредством покупки или продажи акций, слияния или другой формы корпоративной транзакции), связанной с проектом API, должны заполните и отправьте эту форму. Это позволяет команде API YouTube обновлять наши записи, проверять соответствие вариантов использования нового проекта API и проверять текущее распределение квот разработчика.

Каждая новая форма будет информировать нас о предполагаемом использовании вами API YouTube и позволит нам лучше помогать вам.

Более подробную информацию можно найти в нашем новом руководстве по аудиту соответствия API.

12 мая 2021 г.

Примечание. Это объявление об устаревании.

Это обновление охватывает следующие изменения API:

  • Свойство contentDetails.relatedPlaylists.favorites ресурса channel устарело. Функциональность избранных видео уже несколько лет устарела, как отмечено в записи истории изменений от 28 апреля 2016 г.

    До этого обновления API по-прежнему создавал новый список воспроизведения, если клиент API пытался добавить видео в несуществующий список воспроизведения избранного. В дальнейшем плейлист в этом случае создаваться не будет, и API вернет ошибку. Попытки изменить плейлисты избранного путем добавления, изменения или удаления элементов также считаются устаревшими в соответствии с предыдущими объявлениями и могут начать возвращать ошибки в любое время.

  • Следующие свойства ресурса channel устарели. Эти свойства уже не поддерживаются в пользовательском интерфейсе Студии YouTube и на YouTube. В результате они также больше не поддерживаются через API.

    • brandingSettings.channel.defaultTab
    • brandingSettings.channel.featuredChannelsTitle
    • brandingSettings.channel.featuredChannelsUrls[]
    • brandingSettings.channel.profileColor
    • brandingSettings.channel.showBrowseView
    • brandingSettings.channel.showRelatedChannels

    Все свойства были удалены из представления ресурса channel , а их определения были удалены из списка свойств ресурса. Кроме того, из документации по конкретному методу были удалены ошибки, связанные с этими свойствами.

  • Следующие свойства ресурса channelSection устарели. Эти свойства уже не поддерживаются в пользовательском интерфейсе Студии YouTube и на YouTube. В результате они также больше не поддерживаются через API.

    • snippet.style
    • snippet.defaultLanguage
    • snippet.localized.title
    • localizations
    • localizations.(key)
    • localizations.(key).title
    • targeting
    • targeting.languages[]
    • targeting.regions[]
    • targeting.countries[]

    В связи с этим изменением параметр hl channelSection.list также устарел, поскольку поддерживаемые им функции не поддерживаются.

    Все свойства были удалены из представления ресурса channelSection , а их определения были удалены из списка свойств ресурса. Кроме того, из документации по конкретному методу были удалены ошибки, связанные с этими свойствами.

  • Для свойства snippet.type ресурса channelSection следующие значения устарели. Эти значения уже не поддерживаются на страницах каналов YouTube и, как следствие, они также больше не поддерживаются через API.

    • likedPlaylists
    • likes
    • postedPlaylists
    • postedVideos
    • recentActivity
    • recentPosts
  • Свойство snippet.tags[] ресурса playlist устарело. Это свойство уже не поддерживается на YouTube и, как следствие, больше не поддерживается через API.

9 февраля 2021 г.

Ресурс playlistItem поддерживает два новых свойства:

  • Свойство snippet.videoOwnerChannelId идентифицирует идентификатор канала, на который было загружено видео из списка воспроизведения.
  • Свойство snippet.videoOwnerChannelTitle определяет имя канала, на который было загружено видео из списка воспроизведения.

28 января 2021 г.

Это обновление содержит следующие изменения:

  • Методы playlistItems.delete , playlistItems.insert , playlistItems.list , playlistItems.update , playlists.delete , playlists.list и playlists.update поддерживают новую ошибку playlistOperationUnsupported . Ошибка возникает, когда запрос пытается выполнить операцию, которая не разрешена для определенного списка воспроизведения. Например, пользователь не может удалить видео из списка воспроизведения загруженных видео или удалить сам список воспроизведения.

    Во всех случаях эта ошибка возвращает код ответа HTTP 400 (неверный запрос).

  • Ошибки метода playlistItems.list watchHistoryNotAccessible и watchLaterNotAccessible были удалены из документации. Хотя история просмотра пользователей и списки просмотра позже действительно недоступны через API, эти конкретные ошибки API не возвращают.

15 октября 2020 г.

В Правила разработчика добавлены два новых раздела:

  • В новом разделе III.E.4.i представлена ​​дополнительная информация о данных, собранных и отправленных через встроенный проигрыватель YouTube. Вы несете ответственность за любые пользовательские данные, которые вы отправляете нам через любой встроенный проигрыватель YouTube до того, как пользователь взаимодействовал с проигрывателем, чтобы указать намерение воспроизведения. Вы можете ограничить данные, передаваемые YouTube, прежде чем пользователь взаимодействует с проигрывателем, установив для автозапуска значение false.
  • Новый раздел III.E.4.j касается проверки статуса контента «Сделано для детей» (MFK) перед его встраиванием на ваши сайты и в приложения. Вы несете ответственность за то, чтобы знать, когда видео, которые вы встраиваете в свой API-клиент, предназначены для детей, и соответствующим образом обрабатывать данные, собранные со встроенного проигрывателя. Таким образом, вы должны проверить статус контента с помощью службы API данных YouTube, прежде чем встраивать его в свой API-клиент через любые встроенные проигрыватели YouTube.

В новом видеоруководстве «Поиск статуса MadeForKids» объясняется, как найти статус видео в формате MFK с помощью службы API данных YouTube .

В связи с этими изменениями в документацию по параметрам встроенного проигрывателя было добавлено напоминание, объясняющее, что если вы включите автозапуск, воспроизведение будет происходить без какого-либо взаимодействия пользователя с проигрывателем; Таким образом, сбор и обмен данными воспроизведения будут происходить после загрузки страницы.

8 октября 2020 г.

Это обновление включает в себя три небольших изменения, связанных с ресурсом channel :

  • Объект snippet.thumbnails , который идентифицирует миниатюры изображений канала, может быть пустым для вновь созданных каналов, и его заполнение может занять до одного дня.
  • Свойство statistics.videoCount отражает количество общедоступных видео канала, даже для владельцев. Такое поведение соответствует подсчетам, указанным на веб-сайте YouTube.
  • Ключевые слова канала, указанные в свойстве brandingSettings.channel.keywords , могут быть усечены, если они превышают максимально допустимую длину в 500 символов или содержат неэкранированные кавычки ( " ). Обратите внимание, что ограничение в 500 символов не является ограничением для каждого канала. ограничение на количество ключевых слов, а скорее ограничение на общую длину всех ключевых слов. Такое поведение соответствует поведению на веб-сайте YouTube.

9 сентября 2020 г.

Примечание. Это объявление об устаревании.

Это обновление охватывает следующие изменения API. Все изменения вступят в силу 9 сентября 2020 года, даты настоящего объявления, или после этой даты. Имея это в виду, разработчикам больше не следует полагаться на какие-либо функции API, перечисленные ниже.

  • Следующие ресурсы API, методы, параметры и свойства ресурсов немедленно устаревают и перестанут работать после даты этого объявления:
    • Следующие свойства ресурса channel :
      • Свойство statistics.commentCount
      • Объект brandingSettings.image и все его дочерние свойства.
      • Список brandingSettings.hints и все его дочерние свойства.
    • Параметр фильтра categoryId метода channels.list
    • guideCategories и guideCategories.list
  • Ответы API для метода channels.list больше не содержат свойство prevPageToken , если запрос API устанавливает для параметра managedByMe значение true . Это изменение не влияет на свойство prevPageToken для других запросов channels.list , а также на свойство nextPageToken для любых запросов.
  • Свойства contentDetails.relatedPlaylists.watchLater и contentDetails.relatedPlaylists.watchHistory ресурса channel были объявлены устаревшими 11 августа 2016 г. Поддержка этих списков воспроизведения методами playlistItems.insert и playlistItems.delete также полностью устарела, и эти два свойства были удалены из документации.
  • Параметр mySubscribers channels.list , объявленный устаревшим 30 июля 2013 года , был удален из документации. Используйте метод subscriptions.list и его параметр mySubscribers , чтобы получить список подписчиков канала прошедшего проверку подлинности пользователя.
  • Объект invideoPromotion ресурса channel и все его дочерние свойства, объявленные устаревшими 27 ноября 2017 г. , были удалены из документации.

29 июля 2020 г.

Мы упростили процесс начисления квоты на запросы API, удалив дополнительные затраты, связанные с параметром part . С этого момента мы будем взимать только базовую стоимость за вызываемый метод. Более подробную информацию об упрощенной квоте можно найти здесь .

Результатом этого изменения является то, что стоимость квоты для большинства вызовов API будет немного ниже, тогда как стоимость некоторых вызовов API останется прежней. Это изменение не увеличивает стоимость вызовов API. В целом, вероятно, ваша выделенная квота, которую можно увидеть в Google Cloud Console , будет увеличена немного дальше.

Мы настоятельно рекомендуем всем разработчикам пройти проверку соответствия своих проектов, чтобы обеспечить постоянный доступ к службам API YouTube.

Эта запись в истории изменений была первоначально опубликована 20 июля 2020 г.

28 июля 2020 г.

Все видео, загруженные через конечную точку videos.insert из непроверенных проектов API, созданных после 28 июля 2020 года, будут ограничены режимом частного просмотра. Чтобы снять это ограничение, каждый проект должен пройти аудит на соответствие Условиям обслуживания .

Авторы, которые используют непроверенный клиент API для загрузки видео, получат электронное письмо с объяснением, что их видео заблокировано как личное и что они могут избежать ограничения, используя официальный или проверенный клиент.

Это изменение в настоящее время не затрагивает проекты API, созданные до 28 июля 2020 г. Однако мы настоятельно рекомендуем всем разработчикам пройти проверку соответствия своих проектов, чтобы обеспечить постоянный доступ к службам API YouTube.

21 июля 2020 г.

[Обновлено 28 июля 2020 г.] Обновление документации, упомянутое в этой записи истории изменений, было переиздано 28 июля 2020 г.

Вчера мы опубликовали обновление документации, касающееся нашего процесса взимания квоты. Однако из-за непредвиденных обстоятельств изменение квоты пока не вступило в силу. В результате документация была отменена в интересах точности. Во избежание путаницы запись в истории изменений, объясняющая это изменение, была удалена и будет опубликована повторно в ближайшем будущем.

7 июля 2020 г.

Примечание. Это объявление об устаревании.

Параметры autoLevels и stabilize метода videos.insert теперь устарели, и оба параметра были удалены из документации. Их значения игнорируются и не влияют на обработку вновь загружаемых видео.

15 июня 2020 г.

Новое руководство «Соблюдение политик разработчиков YouTube» содержит рекомендации и примеры, которые помогут вам убедиться, что ваши клиенты API соблюдают определенные части Условий и правил использования API-сервисов YouTube (API TOS).

Это руководство дает представление о том, как YouTube обеспечивает соблюдение определенных аспектов Условий использования API, но не заменяет какие-либо существующие документы. В руководстве рассматриваются некоторые наиболее распространенные вопросы, которые разработчики задают во время аудита соответствия API. Мы надеемся, что это упростит вам процесс разработки функций, помогая вам понять, как мы интерпретируем и применяем наши политики.

4 июня 2020 г.

Примечание. Это обновление предыдущего объявления об прекращении поддержки.

Функция сводки каналов полностью устарела. Первоначально об этом изменении было объявлено 17 апреля 2020 года, и теперь оно вступило в силу. В результате activities.insert больше не поддерживается, а activities.list больше не возвращает бюллетени канала. Более подробную информацию можно найти в Справочном центре YouTube .

17 апреля 2020 г.

Примечание. Это объявление об устаревании.

YouTube прекращает поддержку функции сводок каналов. В результате activities.insert станет устаревшим, а activities.list перестанет возвращать бюллетени канала. Эти изменения вступят в силу в API 18 мая 2020 г. или после этой даты. Более подробную информацию можно найти в Справочном центре YouTube .

31 марта 2020 г.

Это обновление содержит следующие изменения:

  • Новые ресурсы и методы

    • Новый ресурс member представляет участника канала YouTube. Участник предоставляет автору регулярную денежную поддержку и получает специальные преимущества. Например, участники могут общаться в чате, когда создатель включает режим чата только для участников.

      Этот ресурс заменяет ресурс sponsor , который документирован как часть API потоковой передачи YouTube Live. Ресурс sponsor устарел, и клиентам API следует обновить вызовы метода sponsors.list , чтобы использовать вместо него members.list .

    • Новый membershipsLevel определяет уровень цен, которым управляет создатель, авторизовавший запрос API. membershipsLevels.list извлекает список всех уровней членства создателя.

10 января 2020 г.

API теперь поддерживает возможность идентифицировать контент, предназначенный для детей, который YouTube называет «сделанным для детей». Подробную информацию о контенте, предназначенном для детей, можно найти в Справочном центре YouTube.

channel и video поддерживают два новых свойства, которые позволяют создателям контента и зрителям идентифицировать контент, предназначенный для детей:

  • Свойство selfDeclaredMadeForKids позволяет создателям контента указать, предназначен ли канал или видео для детей.

    Для каналов это свойство можно установить при вызове метода channels.update . Для видео это свойство можно установить при вызове методов videos.insert или videos.update .

    Обратите внимание, что это свойство включается в ответы API, содержащие ресурсы channel или video , только если владелец канала санкционировал запрос API.
  • Свойство madeForKids позволяет любому пользователю получить статус канала или видео «сделано для детей». Например, статус может определяться на основе значения свойства selfDeclaredMadeForKids . Дополнительную информацию о настройке аудитории для вашего канала, видео или трансляций можно найти в Справочном центре YouTube .

Мы также обновили Условия использования API-сервисов YouTube и Политику для разработчиков. Дополнительную информацию см. в Условиях использования API-сервисов YouTube — История изменений . Изменения в Условиях использования API-сервисов YouTube и Правилах для разработчиков вступят в силу 10 января 2020 года по тихоокеанскому времени.

10 сентября 2019 г.

Справочная документация API была обновлена, чтобы отразить изменения в способе представления данных о количестве подписчиков на YouTube и, следовательно, в ответах API. В результате изменения количество подписчиков, возвращаемое службой API данных YouTube, округляется до трех значащих цифр, если число подписчиков превышает 1000 подписчиков. Это изменение влияет на свойство статистики.subscriberCount ресурса channel .

Примечание. Это изменение влияет на значение этого свойства даже в тех случаях, когда пользователь отправляет авторизованный запрос данных о своем собственном канале. Владельцы каналов по-прежнему смогут видеть точное количество подписчиков в Студии YouTube.

Например, если у канала 123 456 подписчиков, свойство statistics.subscriberCount будет содержать значение 123000 . В таблице ниже показаны примеры того, как количество подписчиков округляется в ответах API и сокращается в других общедоступных пользовательских интерфейсах YouTube:

Пример количества подписчиков API данных YouTube Общедоступные интерфейсы YouTube
1234 12:30 1,23 тыс.
12 345 12300 12,3 тыс.
123 456 123000 123 тыс.
1 234 567 1230000 1,23 млн.
12 345 678 12300000 12,3 млн.
123 456 789 123000000 123М

4 апреля 2019 г.

Это обновление содержит следующие изменения:

  • Справочная документация API была обновлена, чтобы лучше объяснить общие случаи использования каждого метода и предоставить динамические высококачественные примеры кода через виджет API-интерфейса. Пример см. в документации по методу channels.list . На страницах, описывающих методы API, теперь есть два новых элемента:

    • Виджет API-интерфейса позволяет выбирать области авторизации, вводить образцы значений параметров и свойств, а затем отправлять фактические запросы API и просматривать фактические ответы API. Виджет также предлагает полноэкранное представление, в котором показаны полные примеры кода, которые динамически обновляются для использования введенных вами областей и значений.

    • В разделе «Распространенные варианты использования» описан один или несколько распространенных вариантов использования метода, описанного на странице. Например, вы можете вызвать метод channels.list для получения данных о конкретном канале или для получения данных о канале текущего пользователя.

      Вы можете использовать ссылки в этом разделе, чтобы заполнить Обозреватель API примерами значений для вашего варианта использования или открыть полноэкранный Обозреватель API с уже заполненными значениями. Эти изменения призваны облегчить вам просмотр примеров кода, которые напрямую применимы к варианту использования, который вы пытаетесь реализовать в своем собственном приложении.

    Примеры кода в настоящее время поддерживаются для Java, JavaScript, PHP, Python и Curl.

  • Инструмент примеров кода также был обновлен новым пользовательским интерфейсом, который предлагает все описанные выше функции. С помощью этого инструмента вы можете изучить варианты использования различных методов, загрузить значения в проводник API и открыть полноэкранный проводник API, чтобы получить примеры кода на Java, JavaScript, PHP и Python.

    В связи с этим изменением были удалены страницы, на которых ранее были перечислены доступные примеры кода для Java, JavaScript, PHP и Python.

  • Обновлены краткие руководства по Java , JavaScript , PHP и Python . В пересмотренных руководствах объясняется, как запустить один образец с ключом API, а другой — с идентификатором клиента OAuth 2.0, используя примеры кода из API Explorer.

Обратите внимание, что описанные выше изменения заменяют интерактивный инструмент, добавленный в документацию API в 2017 году.

9 июля 2018 г.

Это обновление содержит следующие изменения:

  • Определение свойства snippet.thumbnails ресурса channel было обновлено, чтобы отметить, что при отображении миниатюр в вашем приложении ваш код должен использовать URL-адреса изображений точно так, как они возвращаются в ответах API. Например, ваше приложение не должно использовать домен http вместо домена https в URL-адресе, возвращаемом в ответе API.

    Начиная с июля 2018 г. URL-адреса миниатюр каналов будут доступны только в домене https . Именно так URL-адреса отображаются в ответах API. По истечении этого времени вы можете увидеть неработающие изображения в своем приложении, если оно попытается загрузить изображения YouTube из домена http .

  • Примечание. Это объявление об устаревании.

    Свойство recordingDetails.location.altitude video устарело. Нет никакой гарантии, что видео вернет значения для этого свойства. Аналогично, даже если запросы API попытаются установить значение для этого свойства, возможно, что входящие данные не будут сохранены.

22 июня 2018 г.

Руководство по внедрению , ранее известное как Руководство по внедрению и миграции, было обновлено: удалены инструкции по переходу с API версии 2 на API версии 3. Кроме того, были удалены инструкции для функций, которые с тех пор устарели в API версии 3, таких как избранные видео.

27 ноября 2017 г.

Это обновление содержит следующие изменения:

  • Примечание. Это объявление об устаревании.

    YouTube прекращает поддержку функций «Рекомендуемые видео» и «Рекомендуемые веб-сайты» , которые поддерживаются в API через объект invideoPromotion ресурса channel . В результате этот объект, включая все его дочерние свойства, устарел.

    Вы по-прежнему можете получать и устанавливать данные invideoPromotion до 14 декабря 2017 г. После этой даты:

    • Попытки получить часть invideoPromotion при вызове channels.list вернут пустой invideoPromotion или вообще не вернут никаких данных invideoPromotion .
    • Попытки обновить данные invideoPromotion при вызове channels.update будут возвращать успешный ответ как минимум до 27 мая 2018 г., но они будут рассматриваться как пустые, то есть фактически не будут выполнять обновление.

    После 27 мая 2018 г. эти запросы могут возвращать сообщения об ошибках, указывающие, например, на то, что invalidPromotion является недопустимой частью.

16 ноября 2017 г.

Это обновление содержит следующие изменения:

  • Инструмент интерактивного фрагмента кода теперь поддерживает примеры кода Node.js. В документации также можно увидеть примеры почти всех методов API, таких как метод channels.list .

    Настраиваемые примеры предназначены для того, чтобы дать вам отправную точку для конкретного варианта использования приложения Node.js. Функциональность аналогична коду в кратком руководстве по Node.js. Однако примеры содержат некоторые служебные функции, которых нет в кратком руководстве:

    • Функция removeEmptyParameters принимает список пар ключ-значение, соответствующих параметрам запроса API, и удаляет параметры, которые не имеют значений.
    • Функция createResource принимает список пар ключ-значение, соответствующих свойствам ресурса API. Затем он преобразует свойства в объект JSON, который можно использовать в операциях insert и update . В приведенном ниже примере показан набор имен и значений свойств, а также объект JSON, который создаст для них код:
      # Key-value pairs:
      {'id': 'ABC123',
       'snippet.title': 'Resource title',
       'snippet.description': 'Resource description',
       'status.privacyStatus': 'private'}
      
      # JSON object:
      {
       'id': 'ABC123',
       'snippet': {
         'title': 'Resource title',
         'description': 'Resource description',
       },
       'status': {
         'privacyStatus': 'private'
       }
      }

    Все эти примеры предназначены для загрузки и локального запуска. Дополнительные сведения см. в предварительных требованиях для локального запуска полных примеров кода в инструкциях инструмента фрагментов кода.

25 октября 2017 г.

Это обновление содержит следующие изменения:

  • Примеры кода Python в интерактивном инструменте фрагментов кода были обновлены и теперь используют библиотеки google-auth и google-auth-oauthlib вместо библиотеки oauth2client , которая сейчас устарела.

    В дополнение к этому изменению инструмент теперь предоставляет полные примеры кода для установленных приложений Python и приложений веб-сервера Python, которые используют несколько разные потоки авторизации. Чтобы увидеть полные примеры (и это изменение):

    1. Перейдите к инструменту интерактивного фрагмента кода или к документации по любому методу API, например методу channels.list .
    2. Щелкните вкладку Python над примерами кода.
    3. Нажмите переключатель над вкладками, чтобы переключиться с просмотра фрагмента на полный образец.
    4. Теперь на вкладке должен отображаться полный пример кода, использующий поток авторизации InstalledAppFlow . В описании над примером это объясняется, а также имеется ссылка на пример приложения веб-сервера.
    5. Щелкните ссылку, чтобы переключиться на пример веб-сервера. В этом примере используется платформа веб-приложений Flask и другой поток авторизации.

    Все эти примеры предназначены для загрузки и локального запуска. Если вы хотите запустить примеры, см. инструкции по локальному запуску полных примеров кода в инструкциях инструмента фрагментов кода.

29 августа 2017 г.

Это обновление содержит следующие изменения:

  • Определение параметра forContentOwner метода search.list было обновлено, чтобы отметить, что если для этого параметра установлено значение true , для параметра type должно быть установлено значение video .
  • Определение параметра regionCode метода search.list было обновлено, чтобы уточнить, что этот параметр ограничивает результаты поиска видео, которые можно просмотреть в указанном регионе.
  • YouTube обновил свои фирменные логотипы и значки. Новые логотипы «разработано совместно с YouTube» можно загрузить на странице рекомендаций по брендингу . На этой странице также показаны другие новые логотипы и значки YouTube, которые можно загрузить с сайта бренда YouTube .

24 июля 2017 г.

Это обновление содержит следующие изменения:

  • Для iOS доступно новое краткое руководство по API данных YouTube. В руководстве объясняется, как использовать API данных YouTube в простом приложении iOS, написанном на Objective-C или Swift.
  • Инструмент интерактивного фрагмента кода для API данных YouTube теперь включает документацию, объясняющую некоторые функции инструмента:
    • Выполнение запросов API
    • Переключение между фрагментами кода и полными примерами кода
    • Использование шаблонных функций
    • Загрузка существующих ресурсов (для методов обновления)

    Примечание. Этот инструмент также встроен в справочную документацию API для методов API ( пример ).

1 июня 2017 г.

Это обновление содержит следующие изменения:

  • Примечание. Это объявление об устаревании.

    Следующие свойства video устарели. Хотя свойства будут поддерживаться до 1 декабря 2017 года, нет никакой гарантии, что видео продолжит возвращать значения для этих свойств до этого времени. Аналогично, запросы videos.insert и videos.update , которые устанавливают эти значения свойств, не будут генерировать ошибки до этой даты, но возможно, что входящие данные не будут сохранены.

17 мая 2017 г.

Это обновление содержит следующие изменения:

  • Справочная документация API была обновлена, чтобы сделать фрагменты кода более повсеместными и интерактивными. Страницы, описывающие методы API, такие как channels.list или videos.rate , теперь содержат интерактивный инструмент, который позволяет просматривать и настраивать фрагменты кода на Java, JavaScript, PHP, Python, Ruby, Apps Script и Go.

    Для любого метода инструмент показывает фрагменты кода для одного или нескольких вариантов использования, и каждый вариант использования описывает общий способ вызова этого метода. Например, вы можете вызвать метод channels.list .

    Вы также можете взаимодействовать с образцами кода:

    • Измените параметр и значения свойств, а фрагменты кода динамически обновляются, чтобы отразить значения, которые вы предоставляете.

    • Переключение между фрагментами кода и полными образцами. В фрагменте кода показывается часть кода, который вызывает метод API. Полный образец содержит этот фрагмент, а также код шаблона для авторизации и отправки запросов. Полные образцы могут быть скопированы и запустить из командной строки или локального веб -сервера.

    • Выполните запросы, нажав кнопку. (Чтобы выполнить запросы, вам необходимо разрешить инструмент для вызова API от вашего имени.)

    Обратите внимание, что этот инструмент заменил APIS Explorer на страницах, где он доступен. (Каждая страница отображает ссылку, чтобы у вас также была возможность загрузить запрос, над которым вы работаете в APIS Explorer.)

  • Инструмент фрагментов кода Data API также был обновлен с помощью нового пользовательского интерфейса, который предлагает все те же функции, описанные выше. Основные новые функции, доступные на этой странице:

    • Поддержка запросов API, которые записывают данные.
    • Поддержка образцов Java.
    • Более гибкий и комплексный код шаблона для авторизации пользователей и строительства запросов API.

27 апреля 2017 г.

Это обновление содержит следующие изменения:

  • Новые руководства QuickStart объясняют, как настроить простое приложение, которое делает запросы API данных YouTube. Руководства в настоящее время доступны для Android , Apps Script , GO , Java , JavaScript , Node.js , PHP , Python и Ruby .

30 марта 2017 г.

Это обновление содержит следующие изменения:

  • Новое свойство ресурса channel topicDetails.topicCategories[] URL -адреса соответствуют идентификаторам темы, возвращенными в свойство topicDetails.topicIds[] .
  • Новое свойство contentDetails.videoPublishedAt от playlistItem Resource. Ресурс уже содержит свойство snippet.publishedAt , которое определяет время, когда элемент был добавлен в плейлист.
  • Как и ресурс channel , video ресурс теперь возвращает свойство topicDetails.topicCategories[] , которое содержит список URL -адресов Википедии, которые описывают содержание видео. Для video ресурсов URL -адреса соответствуют идентификаторам темы, возвращенными в topicDetails.relevantTopicIds[] ресурса.
  • Новый video Property от contentDetails.contentRating.mpaatRating идентифицирует рейтинг, который Американская ассоциация кинофильмов дала трейлеру или предварительному просмотру фильма.

27 февраля 2017 г.

Как первоначально было объявлено 11 августа 2016 года , YouTube переключил поддерживаемый список идентификаторов тем в список кураторских. Полный список поддерживаемых идентификаторов темы включен в свойства topicDetails для channel и video ресурсов, а также в параметра topicId search.list .

Обратите внимание, что в списке курируется несколько изменений:

  • Следующие темы были добавлены в качестве подтопиков Society :
    Имя идентификатор темы
    Бизнес /m/09s1f
    Здоровье /m/0kt51
    Военный /m/01h6rj
    Политика /m/05qt0
    Религия /m/06bvp
  • Animated cartoon , ранее ребенок Entertainment , была удалена.
  • Children's music тема, ранее ребенок Music , была удалена.

В результате этого изменения темы, связанные с видео, теперь всегда возвращаются в topicDetails.relevantTopicIds[] video ресурса.

29 ноября 2016 г.

Это обновление содержит следующие изменения:

  • Есть три небольших изменения в списке идентификаторов тем, которые будут поддерживаться по состоянию на 10 февраля 2017 года:

    • Категория Professional wrestling , которая ранее была ребенком Sports категории, теперь является ребенком Entertainment .
    • Категория TV shows , которая является ребенком Entertainment , является новой.
    • Категория Health , ранее ребенок Lifestyle , была удалена.

    Также обратите внимание, что есть несколько категорий родителей ( Entertainment , Gaming , Lifestyle , Music и Sports ). Любое видео, которое связано с детской категорией, такой как Tennis , также будет связано с родительской категорией ( Sports ).

10 ноября 2016 г.

Это обновление содержит следующие изменения:

  • Как впервые было объявлено 11 августа 2016 года , искажение Freebase и Freebase API требует нескольких изменений, связанных с идентификаторами тем. Идентификаторы темы определяют темы, связанные с channel и video ресурсами, и вы также можете использовать параметр поиска topicId чтобы найти каналы или видео, связанные с конкретной темой.

    10 февраля 2017 года YouTube начнет возвращать небольшой набор идентификаторов тем, а не гораздо более детальный набор идентификаторов, возвращенных до сих пор. Кроме того, обратите внимание, что каналы и видео не гарантируют, что не будут связаны с какими -либо тем, что согласуется с текущим поведением API.

    Таким образом, вы можете подготовить своих клиентов API к этим изменениям, определения следующих параметров и свойств API были обновлены для перечисления идентификаторов тем, которые будут поддерживаться после этого времени. Обратите внимание, что список категорий одинаковы для всех свойств.

  • Примечание: это объявление об ископке.

    Следующие свойства устанавливаются:

    • The channel Resource's topicDetails.topicIds[] свойство. Эта собственность будет поддержана до 10 ноября 2017 года.
    • The topicDetails.relevantTopicIds[] video Resource. Эта собственность будет поддержана до 10 ноября 2017 года.
    • Собственность video Resource's topicDetails.topicIds[] . Это свойство не будет содержать значения после 10 февраля 2017 года. (После этой даты, The topicDetails.relevantTopicIds[] Значение свойства определит все темы, связанные с видео.)

  • Поскольку Freebase уже устарела, руководство по поиску с темами Freebase было удалено из документации. Это руководство предоставило образцы кода, чтобы показать, как приложение будет работать с API Freebase.

    Кроме того, несколько образцов кода, связанные с идентификаторами тем, были удалены из документации метода search.list .

2 ноября 2016 г.

Это обновление содержит следующие изменения:

  • Новые свойства и параметры

    • video -ресурс содержит несколько новых свойств:

      • Свойство player.embedHtml содержит тег <iframe> , который вы можете использовать для встроенного игрока, который воспроизводит видео. Новый player.embedHeight и player.embedWidth свойства определяют размеры встроенного игрока. Эти свойства возвращаются только в том случае, если запрос API указывает значение как минимум для одного из параметров maxHeight или maxWidth . Эти два новых параметра объясняются позже в этой записи истории пересмотра.

      • Новое свойство hasCustomThumbnail указывает, предоставил ли видео загрузчик видео пользовательское изображение миниатюры для видео. Обратите внимание, что это свойство видно только для загрузчика видео.

      • Новый fpbRatingReasons[] определяет причины, по которым видео получило свой рейтинг FPB (Южная Африка).

      • Новый mcstRating определяет рейтинг, который видео получило во Вьетнаме.

    • maxWidth videos.list maxHeight Вы можете использовать либо параметр, либо оба параметра при получении части player в video ресурсах.

      По умолчанию высота свойства <iframe> в свойство player.embedHtml составляет 360px. Ширина приспосабливается в соответствии с соотношением сторон видео, тем самым гарантируя, что у встроенного игрока нет черных батончиков, создающих видео. Так, например, если соотношение сторон видео составляет 16: 9, ширина игрока будет 640px.

      С новыми параметрами вы можете указать, что вместо размеров по умолчанию код вставки должен использовать высоту и/или ширину, подходящую для макета вашего приложения. API -сервер масштабирует размеры игрока в зависимости от того, чтобы убедиться, что встроенный игрок не имеет черных полос, обрамляющих видео. Обратите внимание, что оба параметра указывают максимальные размеры встроенного игрока. Таким образом, если указаны оба параметра, одно измерение все еще может быть меньше, чем максимальное количество разрешено для этого измерения.

      Например, предположим, что видео имеет соотношение сторон 16: 9. Таким образом, тег player.embedHtml будет содержать игрока 640x360, если параметр maxHeight или maxWidth не установлен.

      • Если параметр maxHeight устанавливается на 720 , а параметр maxWidth не установлен, API вернет игрока 1280x720.
      • Если параметр maxWidth установлен на 960 , а параметр maxHeight не установлен, API вернет игрока 960x540.
      • Если параметр maxWidth установлен на 960 , а параметр maxHeight установлен на 450 , API вернет игрока 800x450.

      Новый player.embedHeight и player.embedWidth Properties, которые описаны выше, определяют размеры игрока.

  • Обновления существующих методов, свойств и параметров

    • Описание ресурса channelSection было обновлено, чтобы отметить, что канал может создать максимум 10 полков, не устанавливая таргетинг данных и может создать максимум 100 полков с данными таргетирования.

      Кроме того, свойство targeting ресурса channelSection ресурса было обновлено, чтобы отразить тот факт, что параметры таргетинга могут быть установлены только с помощью API. Параметры таргетинга удаляются, если раздел канала изменен с использованием пользовательского интерфейса на веб -сайте YouTube.

    • hl snippet.name ресурса i18nLanguage i18nLanguage.list

    • Свойство playlistItem contentDetails.note .

    • playlistItem contentDetails.endAt contentDetails.startAt Эти поля игнорируются, если они устанавливаются в playlistItems.insert или playlistItems.update запросы.

    • Методы playlistItems.delete и playlistItems.update теперь поддерживают параметр onBehalfOfContentOwner , который уже поддерживается для нескольких других методов. Запросы, которые используют этот метод, также должны быть разрешены с помощью токена, который обеспечивает доступ к области https://www.googleapis.com/auth/youtubepartner .

    • publishedBefore и publishedAfter параметры метода search.list были обновлены, чтобы указать, что значения параметров включены. Так, например, если параметр publishedBefore установкой, API возвращает ресурсы, созданные до или в указанное время.

    • video поддерживает три contentDetails.contentRating.grfilmRating значения: grfilmK12 , grfilmK15 и grfilmK18 .

    • Описание метода videos.insert было обновлено, чтобы отметить, что максимальный размер файла для загруженных видео увеличился с 64 ГБ до 128 ГБ.

  • Новые и обновленные ошибки

    • API поддерживает следующие новые ошибки:

      Тип ошибки Детализация ошибки Описание
      forbidden (403) homeParameterDeprecated Метод activities.list возвращает эту ошибку, чтобы указать, что данные активности домашней страницы пользователя недоступны через этот API. Эта ошибка может возникнуть, если вы установите параметр home в true в несанкционированном запросе.
      invalidValue (400) invalidContentDetails Метод playlistItems.insert возвращает эту ошибку, чтобы указать, что объект contentDetails в запросе недействителен. Одна из причин того, что эта ошибка возникает, заключается в том, что поле contentDetails.note более 280 символов.
      forbidden (403) watchHistoryNotAccessible Метод playlistItems.list возвращает эту ошибку, чтобы указать, что запрос попытался получить элементы плейлиста «Watch History», но их нельзя получить с помощью API.
      forbidden (403) watchLaterNotAccessible Метод playlistItems.list возвращает эту ошибку, чтобы указать, что запрос попытался получить элементы плейлиста «Смотреть позже», но их нельзя получить с помощью API.
      badRequest (400) uploadLimitExceeded Метод videos.insert возвращает эту ошибку, чтобы указать, что канал превысил количество видео, которые он может загрузить.
      forbidden (403) forbiddenEmbedSetting Метод videos.update . Обратите внимание, что некоторые каналы могут не иметь разрешения на предложение встроенных игроков для живых потоков. Смотрите Центр справки YouTube для получения дополнительной информации.
    • Метод playlistItems.insert больше не возвращает ошибку, если вы вставляете дубликатное видео в список воспроизведения. Эта ошибка ранее произошла для некоторых плейлистов, таких как любимые видео, которые не позволяли дубликаты, но больше не поддерживаются. В общем, плейлисты позволяют дублировать видео.

  • Другие обновления

    • Запись истории пересмотра за 15 сентября 2016 года была обновлена, чтобы уточнить, что всякий раз, когда ресурс channel contentDetails.relatedPlaylists.watchHistory и contentDetails.relatedPlaylists.watchLater включены в ответ, они всегда содержат значения HL и WL , соответственно. Кроме того, эти свойства включены только в том случае, если авторизованный пользователь получает данные о собственном канале пользователя.

15 сентября 2016 г.

Это обновление содержит следующие изменения:

  • Обновление «История ревизий» 11 августа 2016 года обсуждало несколько изменений, связанных с идентификаторами тем, включая тот факт, что набор поддерживаемых идентификаторов темт изменится по состоянию на 10 февраля 2017 года. Список тем, которые будут поддержаны, будет опубликован до 10 ноября. , 2016.

  • Следующие изменения в настоящее время действуют. Уведомление об этих изменениях было дано в обновлении истории пересмотра 11 августа 2016 года:

    • Если метод activities.list вызывается с home параметром, установленным в true , ответ API теперь содержит элементы, аналогичные тем, что будет видеть пользователь YouTube, зарегистрированный на домашней странице.

      Это небольшое изменение, которое предназначено для обеспечения лучшего пользовательского опыта, чем поведение, описанное в обновлении истории пересмотра 11 августа 2016 года. Это обновление было указано, что запросы с использованием home параметра вернут пустой список.

    • channel WL contentDetails.relatedPlaylists.watchHistory contentDetails.relatedPlaylists.watchLater Resource HL

      Чтобы быть ясным, эти свойства видны только авторизованным пользователю, получающим данные о собственном канале пользователя. Свойства всегда содержат значения HL и WL , даже для авторизованного пользователя, получающего данные о собственном канале пользователя. Таким образом, история часов и идентификаторы плейлиста часов нельзя извлечь через API.

      Кроме того, запросы на получение деталей плейлиста ( playlists.list ) или элементы плейлиста ( playlistItems.list ) для истории просмотра канала или «Смотрите более поздний плейлист», теперь возвращают пустые списки. Такое поведение верно для новых значений, HL и WL , а также для любой истории часов или идентификаторов плейлиста, которые ваш клиент API, возможно, уже сохранил.

  • Объект FileTeTails's video Resource. Объект fileDetails.recordingLocation и его дочерние свойства больше не возвращаются. Ранее эти данные (например, родительский объект fileDetails ) могли быть извлечены только владельцем видео.

11 августа 2016 г.

Это обновление содержит следующие изменения:

  • Недавно опубликованные Услуги службы услуг API YouTube («Обновленные термины»), подробно обсуждаемые в блоге YouTube Engineering and Developers , предоставляет богатый набор обновлений в текущих условиях обслуживания. В дополнение к обновленным условиям , которые вступит в силу по состоянию на 10 февраля 2017 года, это обновление включает в себя несколько подтверждающих документов, которые помогут объяснить политику, за которыми должны следовать разработчики.

    Полный набор новых документов описан в истории пересмотра для обновленных терминов . Кроме того, будущие изменения в обновленных терминах или в тех подтверждающих документах также будут объяснены в этой истории пересмотра. Вы можете подписаться на изменения списка каналов RSS в этой истории пересмотра по ссылке в этом документе.

  • Унимок свободной базы и API Freebase вызывает несколько изменений, связанных с идентификаторами тем. Идентификаторы темы используются в следующих ресурсах и методах API:

    • Часть topicDetails channel Resource Depetails идентифицирует темы, связанные с каналом.
    • Часть topicDetails video -ресурса идентифицирует темы, связанные с видео.
    • Параметр метода search.list topicId позволяет искать видео или каналы, связанные с конкретной темой.

    Изменения в этих функциях:

    • По состоянию на 10 февраля 2017 года YouTube начнет возвращать небольшой набор идентификаторов тем, а не гораздо более детальный набор идентификаторов, возвращенных до сих пор. Этот набор поддерживаемых тем идентифицирует категоризации высокого уровня, такие как спорт или баскетбол , но, например, они не будут идентифицировать конкретные команды или игроков. Мы будем объявлять набор поддерживаемых тем, чтобы у вас было время подготовить ваше приложение к этому изменению.

    • Любые идентификаторы темы Freebase, которые вы уже получили, могут использоваться для поиска контента до 10 февраля 2017 года. Однако, после этого времени, вы сможете использовать только меньший набор тем, идентифицированных в предыдущем элементе для получения результатов поиска по тема.

    • После 10 февраля 2017 года, если вы попытаетесь искать результаты, используя идентификатор темы, который не находится в меньшем наборе поддерживаемых идентификаторов тем, API вернет пустой набор результатов.

  • Несколько полей API и параметров устанавливаются в силу 12 сентября 2016 года:

    • home параметр Method activities.list позволил авторизованному пользователю получить канал действия, который будет отображаться на домашней странице YouTube для этого пользователя. Запросы, которые используют этот параметр после 12 сентября 2016 года, вернут пустой список.

    • channel contentDetails.relatedPlaylists.watchLater contentDetails.relatedPlaylists.watchHistory После 12 сентября 2016 года contentDetails.relatedPlaylists.watchHistory вернет значение HL и contentDetails.relatedPlaylists.watchLater Собственность вернет значение WL для всех каналов.

      Запросы о получении деталей playlists.list ( playlistItems.list . Список после этого времени. Это верно для новых значений, HL и WL , а также для любой истории часов или на более поздних идентификаторах плейлиста, которые ваш клиент API, возможно, уже сохранил.

    • Объект FileTeTails's video Resource fileDetails.recordingLocation или любая из его дочерних свойств больше не будет возвращено после 12 сентября 2016 года. Эти данные могут быть извлечены только владельцем видео, поскольку родительский объект fileDetails может быть извлечен только владельцем видео.

13 июня 2016 г.

Это обновление содержит следующие изменения:

  • Свойство contentDetails.googlePlusUserId от channel Resource. Ранее свойство присутствовало только в том случае, если канал был связан с профилем Google+. После снижения, собственность больше не будет включаться в какие -либо ресурсы channel .

  • Snippet от comment snippet.authorGoogleplusProfileUrl . Ранее свойство присутствовало только в том случае, если канал был связан с профилем Google+. После установления обморожения собственность больше не будет включена в какие -либо ресурсы comment .

Поскольку ни одно из этих свойств не будет возвращено после обтекания, оба свойства были удалены из соответствующей документации по ресурсам.

31 мая 2016 г.

Это обновление содержит следующие изменения:

  • Новый метод subscriptions.list параметра myRecentSubscribers извлекает список подписчиков канала аутентифицированного пользователя в обратном хронологическом порядке того времени, которое они подписались на канал.

    Обратите внимание, что новый параметр поддерживает только поиск самых последних 1000 подписчиков в канал аутентифицированного пользователя. Чтобы получить полный список подписчиков, используйте параметр mySubscribers . Этот параметр, который не возвращает подписчиков в конкретном порядке, не ограничивает количество подписчиков, которые могут быть извлечены.

  • Определение свойства фрагмента . snippet.thumbnails.(key) .

    • standard изображение имеет ширину 640px и высотой 480px.
    • Изображение maxres имеет ширину 1280px и высотой 720px.
  • Определение part метода канала. Параметр метода channelSection.list был обновлен, чтобы отметить, что targeting часть может быть извлечена по цене 2 единиц квот.

  • Метод videos.list 403 fileDetails processingDetails suggestions video Эти детали доступны только владельцу видео.

17 мая 2016 г.

Новый инструмент фрагментов кода Data API содержит короткие фрагменты кода для общих вариантов использования API Data Data. В настоящее время фрагменты кода доступны для всех методов API только для чтения в сценарии приложений, GO, JavaScript, PHP, Python и Ruby.

Для каждого метода инструмент показывает образцы кода для одного или нескольких вариантов использования. Например, он предоставляет пять фрагментов кода для метода search.list :

  • Список видео по ключевым словам
  • Список видео по местоположению
  • Список живых событий
  • Поиск видео -аутентифицированных видеороликов пользователя
  • Список связанных видео

Для каждого варианта использования инструмент отображает параметры, используемые в запросе API. Вы можете изменить значения параметров, и в этом случае инструмент обновляет фрагменты кода, чтобы отразить предоставленные вами значения параметров.

Наконец, инструмент отображает ответ API на каждый запрос. Если вы изменили параметры запроса, ответ API основан на предоставленных значениях параметров. Обратите внимание, что вам необходимо разрешить инструмент для отправки запросов от вашего имени для ответов API на отображение.

28 апреля 2016 г.

Это обновление содержит следующие изменения:

  • Новое свойство contentDetails.projection от video ресурса определяет формат проекции видео. Допустимые значения свойств 360 и rectangular .

  • recordingDetails.location video fileDetails.recordingLocation .

    • Свойство recordingDetails.location идентифицирует место место, которое владелец видео хочет связать с видео. Это расположение редактируется, доступно для поиска на публичных видео и может быть отображена пользователям для публичных видео.
    • Значение свойства fileDetails.recordingLocation неизбежно и представляет местоположение, связанное с исходным загруженным видеофайлом. Значение видно только для владельца видео.

  • Определение channel contentDetails.relatedPlaylists.favorites RelatedPlaylists.Favorites. Это связано с тем, что функциональность любимых видео уже устарела. Обратите внимание, что это свойство не подлежит политике снижения API .

  • Определение ошибки ineligibleAccount , которая может быть возвращена методом comments.insert , comments.update , commentThreads.insert или commentThreads.update , было обновлено, чтобы отразить, что ошибка возникает, когда учетная запись YouTube используется для авторизации запроса API не был объединен с учетной записью Google пользователя.

20 апреля 2016 г.

Это обновление содержит следующие изменения:

  • Определение part метода channels.update Параметр метода update был обновлен, чтобы отметить, что localizations также является допустимым значением для этого параметра.

  • Раздел использования квот руководства по началу работы был обновлен для ссылки на консоли разработчика Google, где вы можете увидеть свою реальную квоту и использование квот.

16 марта 2016 г.

Это обновление содержит следующие изменения:

  • Обновления существующих ресурсов и методов

    • Документация по ресурсам channelBanner была обновлена, чтобы отметить, что рекомендуемый размер для загруженного изображения баннера канала составляет 2560px на 1440px. Минимальный размер (2048px на 1152px) не изменился.

    • Новое свойство ресурса channel snippet.customUrl идентифицирует пользовательский URL -адрес, связанный с каналом. (Не все каналы имеют пользовательские URL -адреса.) Справочный центр YouTube объясняет требования к приемлемости для получения пользовательского URL, а также как настроить URL.

    • Объект brandingSettings.watch и все его недвижимость ресурса channel и все его дочерние свойства.

    • Ответ API на запрос search.list теперь содержит свойство regionCode . Свойство идентифицирует код региона, который использовался для поискового запроса. Код региона инструктирует API вернуть результаты поиска для указанной страны.

      Стоимость недвижимости представляет собой двухбуктный код страны ISO, который идентифицирует регион. Метод i18nRegions.list возвращает список поддерживаемых регионов. Значение по умолчанию - US . Если указана не поддерживаемая область, YouTube все равно может выбрать другую область, а не значение по умолчанию, для обработки запроса.

    • Определения snippet.label ресурса videoAbuseReportReason snippet.secondaryReasons[].label

      Кроме того, метод videoAbuseReportReasons.list теперь поддерживает параметр hl , который указывает язык, который следует использовать для текста метки в ответе API. Значение параметра по умолчанию равно en_US .

    • Новое video Property от contentDetails.contentRating.ecbmctRating определяет рейтинг видео от Совета по оценке и классификации Турции Министерства культуры и туризма.

      Кроме того, свойства API для других систем рейтинга поддерживают следующие новые значения свойств:

      • contentDetails.contentRating.fpbRating (Южная Африка)
        Рейтинг: 10; Значение свойства: fpb10
      • contentDetails.contentRating.moctwRating (Тайвань)
        Рейтинг: R-12; Значение свойства: moctwR12
      • contentDetails.contentRating.moctwRating (Тайвань)
        Рейтинг: R-15; Значение свойства: moctwR15
    • Свойство liveStreamingDetails.activeLiveChatId от video Resource содержит идентификатор активного живого чата, связанного с видео. Значение свойства присутствует только в том случае, если видео представляет собой текущую живую трансляцию, в которой включен чат в прямом эфире. После того, как трансляция заканчивается, и заканчивается живым чатом, собственность больше не возвращается для видео.

    • Собственность video Resource. Собственность status.rejectionReason поддерживает новую стоимость недвижимости legal .

  • API поддерживает следующие новые ошибки:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) notEditable channelSections.insert , channelSections.update и channelSections.delete Методы отмены возвращают эту ошибку, чтобы указать, что указанный раздел канала не может быть создан, обновлен или удален.
    badRequest (400) styleRequired channelSections.insert и каналы. Методы channelSections.update возвращают эту ошибку, чтобы указать, что ресурс channelSection представленный в запросе API, должен указать значение для свойства snippet.style .
    badRequest (400) typeRequired channelSections.insert snippet.type channelSection channelSections.update
    badRequest (400) processingFailure Метод commentThreads.list возвращает эту ошибку, чтобы указать, что сервер API не удалось успешно обработать запрос. Хотя это может быть переходной ошибкой, это обычно указывает на то, что ввод запроса недействителен. Проверьте структуру ресурса commentThread в органе запроса, чтобы убедиться, что он действителен.
    forbidden (403) commentsDisabled Метод commentThreads.list возвращает эту ошибку, чтобы указать, что видео, идентифицированное videoId Parameter, отключило комментарии.
    badRequest (400) commentTextTooLong Метод commentThreads.insert возвращает эту ошибку, чтобы указать, что вставленный ресурс comment содержит слишком много символов в фрагменте. snippet.topLevelComment.snippet.textOriginal .
    invalidValue (400) videoAlreadyInAnotherSeriesPlaylist Метод playlistItems.insert возвращает эту ошибку, чтобы указать, что видео, которое вы пытаетесь добавить в список воспроизведения, уже в другом списке воспроизведения серии. Посмотрите на справочный центр YouTube для получения дополнительной информации о сериалах.
    badRequest (400) subscriptionForbidden Метод subscriptions.insert метод возвращает эту ошибку, чтобы указать, что вы достигли максимального количества подписок или что вы создали слишком много недавних подписок. В последнем случае вы можете повторить запрос через несколько часов.
    badRequest (400) invalidCategoryId video videos.update snippet.categoryId Используйте метод videoCategories.list для получения поддерживаемых категорий.
    badRequest (400) invalidDescription snippet.description videos.update video
    badRequest (400) invalidPublishAt video videos.update status.publishAt
    badRequest (400) invalidRecordingDetails video videos.update recordingDetails
    badRequest (400) invalidTags video videos.update snippet.tags
    badRequest (400) invalidTitle video videos.update snippet.title
    badRequest (400) invalidVideoMetadata Метод videos.update . Эта ошибка возникает, если запрос обновляет snippet части video ресурса, но не устанавливает значение как для свойств snippet.title и snippet.categoryId .

18 декабря 2015 г.

Законы Европейского Союза (ЕС) требуют, чтобы определенные раскрытия были предоставлены и соглашались, полученные от конечных пользователей в ЕС. Поэтому для конечных пользователей в Европейском союзе вы должны соблюдать политику согласия пользователя ЕС . Мы добавили уведомление об этом требовании в наших условиях обслуживания на YouTube .

19 ноября 2015 г.

video настоящее время API snippet.description возможность channel channelSection snippet.title локализованный текст для snippet.title playlist snippet.description .

  • Установка локализованных названий и описаний

    Вы можете установить локализованные значения для ресурса при вызове метода insert или update для этого ресурса. Чтобы установить локализованные значения для ресурса, сделайте оба следующего:

    • Убедитесь, что значение установлено для свойства ресурса snippet.defaultLanguage . Это свойство snippet.description язык snippet.title ресурса. Его ценность может быть любым поддерживаемым языком приложения или большинством других языковых кодов ISO 639-1: 2002. Например, если вы загрузите видео, которое имеет английский заголовок и описание, вы установите свойство snippet.defaultLanguage на en .

      Примечание Для обновления ресурсов channel : Чтобы установить свойство snippet.defaultLanguage для ресурса channel , вам действительно необходимо обновить свойство brandingSettings.channel.defaultLanguage .

    • Добавьте объект localizations в ресурс, который вы обновляете. Каждый ключ объекта-это строка, которая идентифицирует язык приложения или ISO 639-1: 2002 код языка, и каждый ключ отображает объект, который содержит локализованный заголовок (и описание) для ресурса.

      Пример фрагмента ниже устанавливает язык по умолчанию ресурса на английский. Это также добавляет локализованные немецкие и испанские названия и описания в видео:

      {
        "kind": "youtube#video",
        ...
        "snippet": {
          "title": "Playing soccer",
          "description": "We play soccer in the park on Sundays.",
          "defaultLanguage": "en",
          ...
        },
        "localizations":
          "de": {
            "title": "Fußball spielen",
            "description": "Wir spielen Fußball im Park am Sonntag"
          },
          "es": {
            "title": "Jugar al fútbol",
            "description": "Nosotros jugamos fútbol en el parque los domingos",
          }
        }
      }
    • Важно: помните, что когда вы обновляете локализованные данные для ресурса, ваш запрос API должен включать все существующие локализованные версии данных. Например, если вы отправили последующий запрос на добавление португальских данных в видео в примере выше, запрос должен включить локализованные данные для немецкого, испанского и португальского языка.

  • Получение локализованных ценностей

    API поддерживает два способа извлечения локализованных значений для ресурса:

    • Add the hl parameter to your channels.list , channelSections.list , playlists.list , or videos.list request to retrieve localized data for a specific application language that the YouTube website supports . If localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language .

      For example, suppose a videos.list request retrieved data for the video described above with localized German and Spanish data. If the hl parameter were set to de , the resource would contain the following data:

      {
        "kind": "youtube#video",
        ...
        "snippet": {
          "title": "Playing soccer",
          "description": "We play soccer in the park on Sundays.",
          "defaultLanguage": "en",
          "localized": {
            "title": "Fußball spielen",
            "description": "Wir spielen Fußball im Park am Sonntag"
          }
          ...
        }
      }

      However, if the hl parameter were set to fr , the snippet.localized object would contain the English title and description because English is the default language for the resource, and localized French details are not available.

      Important: The hl parameter only supports values that identify application languages that the YouTube website supports. To determine whether localized text is available for other languages, you need to retrieve the localizations part for the resource and filter to determine whether the localized text exists.

      For example, you would need to retrieve the full list of localizations to determine whether localized text is available in Appalachian English.

    • When retrieving a resource, include localizations in the part parameter value to retrieve all of the localized details for that resource. If you are retrieving localized data for a language that is not a current YouTube application language , you need to use this approach to retrieve all localizations and then filter to determine whether the desired localized data exists.

  • Errors related to localized text values

    The API also supports the following new errors for localized text values:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) defaultLanguageNotSetError This error indicates that a request that tries to insert or update the localizations object for a resource is failing because the snippet.defaultLanguage property is not set for that resource. The channels.update , channelSections.insert , channelSections.update , playlists.insert , playlists.update , videos.insert , and videos.update methods support this error.
    badRequest (400) localizationValidationError This error indicates that one of the values in a resource's localizations object failed to validate. For example, this error might occur if the object contains an invalid language code. The channels.update , channelSections.insert , channelSections.update , playlists.insert , and playlists.update methods support this error.

4 ноября 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The search.list method's order parameter has been updated to note that if you sort live broadcasts by viewCount , the API results are sorted by the broadcasts' number of concurrent viewers while the broadcasts are still ongoing.

    • The search.list method's relatedToVideoId parameter has been updated to note that if the parameter is set, the only other supported parameters are part , maxResults , pageToken , regionCode , relevanceLanguage , safeSearch , type (which must be set to video ), and fields . This update does not reflect a change in API behavior.

    • The definition of the video resource's snippet.publishedAt property has been updated to note that the property value, which specifies the date and time that the video was published, might be different than the time that the video was uploaded. For example, if a video is uploaded as a private video and then made public at a later time, the property value specifies the time that the video was made public. The updated definition also explains how the value is populated for private and unlisted videos.

      This change does not reflect a change in API behavior.

    • The definition of the video resource's status.publishAt property has been updated to note:

      • If you set this property's value when calling the videos.update method, you must also set the status.privacyStatus property value to private even if the video is already private.
      • If the request schedules a video to be published at some time in the past, it is published right away. As such, the effect of setting the status.publishAt property to a past date and time is the same as of changing the video's privacyStatus from private to public .
    • The video resource's contentDetails.contentRating.cncRating property specifies the video's rating from France's Commission de classification cinematographique. This property replaces the contentDetails.contentRating.fmocRating property, which is now deprecated.

    • The definition of the channel resource's brandingSettings.channel.keywords has been updated to correctly reflect that the property value contains a space-separated list of strings and not a comma-separated list, as previously documented. This update does not reflect a change in API behavior.

    • The documentation for the thumbnails.set method has been updated to accurately reflect that the body of the request contains the thumbnail image that you are uploading and associating with a video. The request body does not contain a thumbnail resource. Previously, the documentation said that you should not provide a request body when calling this method. This update does not reflect a change in API behavior.

    • The description of the activity resource has been updated to reflect the fact that the activities.list method does not currently include resources related to new video comments. The resource's snippet.type and contentDetails.comment have been updated as well.

  • New and updated errors

    • The API now supports the following errors:

      Подробности ошибки
      activities.insert
      Код ответа HTTP badRequest (400)
      Причина invalidMetadata
      Описание The kind property does not match the type of ID provided.
      commentThreads.update
      comments.insert
      comments.update
      Код ответа HTTP badRequest (400)
      Причина commentTextTooLong
      Описание The comment resource that is being inserted or updated contains too many characters in the snippet.topLevelComment.snippet.textOriginal property.
      playlistItems.insert
      playlistItems.update
      Код ответа HTTP forbidden (403)
      Причина playlistItemsNotAccessible
      Описание The request is not properly authorized to insert, update, or delete the specified playlist item.
      playlists.delete
      playlists.insert
      playlists.update
      Код ответа HTTP badRequest (400)
      Причина playlistForbidden
      Описание This operation is forbidden or the request is not properly authorized.
      search.list
      Код ответа HTTP badRequest (400)
      Причина invalidLocation
      Описание The location and/or locationRadius parameter value was formatted incorrectly.
      search.list
      Код ответа HTTP badRequest (400)
      Причина invalidRelevanceLanguage
      Описание The relevanceLanguage parameter value was formatted incorrectly.
      subscriptions.insert
      Код ответа HTTP badRequest (400)
      Причина subscriptionForbidden
      Описание This error occurs when any of the following are true:
      • The subscription that you are trying to create already exists
      • You have already reached your maximum number of subscriptions
      • You are trying to subscribe to your own channel, which is not supported.
      • You have created too many subscriptions recently and need to wait a few hours before retrying the request.
      videos.update
      Код ответа HTTP badRequest (400)
      Причина invalidDefaultBroadcastPrivacySetting
      Описание The request attempts to set an invalid privacy setting for the default broadcast.

28 августа 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The video resource's statistics.favoriteCount property has been deprecated.

      In accordance with our deprecation policy, this property will continue to be included in video resources for at least one year after this announcement. However, the property value is now always set to 0 .

7 августа 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The definition of the video resource's snippet.tags[] property has been updated to provide more information about how the API server calculates the length of the property's value. Note that this update does not reflect a change in the API's behavior.

      Specifically, the definition now explains that if a tag contains a space, the API server handles the tag value as though it were wrapped in quotation marks, and the quotation marks count toward the character limit. So, for the purposes of character limits, the tag Foo-Baz contains seven characters, but the tag Foo Baz contains nine characters.

    • The commentThreads.insert method no longer supports the shareOnGooglePlus parameter, which previously indicated whether a comment and replies to that comment should also be posted to the author's Google+ profile. If a request submits the parameter, the API server ignores the parameter but otherwise handles the request.

18 июня 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The commentThreads.list method's new order parameter specifies the order in which the API response should list comment threads. Threads can be ordered by time or relevance. The default behavior is to order them by time.

    • The video resource's new snippet.defaultAudioLanguage property specifies the language spoken in the video's default audio track.

    • The definition of the video resource's contentDetails.licensedContent property has been updated to clarify that the content must have been originally uploaded to a channel linked to a YouTube content partner and then claimed by that partner. This does not represent a change in actual API behavior.

    • The captions.delete , captions.download , captions.insert , captions.list , and captions.update methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods. Requests that use that method also need to be authorized with a token that provides access to the https://www.googleapis.com/auth/youtubepartner scope.

  • New and updated errors

    • The API now supports the following errors:

      Подробности ошибки
      videos.rate
      Код ответа HTTP badRequest (400)
      Причина emailNotVerified
      Описание The user must verify her email address prior to rating the video.
      videos.rate
      Код ответа HTTP badRequest (400)
      Причина videoPurchaseRequired
      Описание Rental videos can only be rated by users who rented them.
    • The subscriptions.delete and subscriptions.insert methods no longer support the accountClosed and accountSuspended errors.

27 апреля 2015 г.

This update contains the following changes:

  • New resources and methods

    • The new videoAbuseReportReason resource contains information about a reason that a video would be flagged for containing abusive content. The videoAbuseReportReasons.list method lets you retrieve a list of all of the reasons why videos might be flagged.

    • The new videos.reportAbuse method provides a way to actually flag a video that contains abusive content. The body of the request contains a JSON object that specifies the video being flagged as well as the reason that the video is deemed to contain abusive content. Valid reasons can be obtained from the videoAbuseReportReason.list method described above.

      The migration guide has also been updated with an example for reporting an abusive video. With this change, the v3 API now supports all of the v2 API features that it is scheduled to support. These features are also all explained in the migration guide.

  • Updates to existing resources and methods

    • The search.list method's new forDeveloper filter parameter restricts a search to only retrieve videos uploaded via the developer's application or website. The forDeveloper parameter can be used in conjunction with optional search parameters like the q parameter.

      For this feature, each uploaded video is automatically tagged with the project number that is associated with the developer's application in the Google Developers Console .

      When a search request subsequently sets the forDeveloper parameter to true , the API server uses the request's authorization credentials to identify the developer. Therefore, a developer can restrict results to videos uploaded through the developer's own app or website but not to videos uploaded through other apps or sites.

      The new feature offers functionality that is similar, albeit not identical, to the developer tags functionality that the v2 API supported.

    • The channel resource's new snippet.country property lets channel owners associate their channels with a particular country.

      Note: To set the snippet.country property for a channel resource, you actually need to update the brandingSettings.channel.country property.

    • The API now supports targeting for channelSection resources. Channel section targeting provides a way to restrict visibility of a content section to users that match particular criteria.

      The API exposes three targeting options. A user must meet all of the targeting settings for a channel section to be visible.

    • The definition of the video resource's contentDetails.duration property has been corrected to reflect that the value can reflect hours, days, and so forth.

    • The documentation for the channelSections.delete , playlistItems.delete , playlists.delete , subscriptions.delete , and videos.delete method has been corrected to reflect that, when successful, those methods all return an HTTP 204 response code ( No Content ).

  • New and updated errors

    • The API now supports the following errors:

      Тип ошибки Детализация ошибки Описание
      badRequest (400) targetInvalidCountry The channelSections.insert and channelSections.update methods return this error if the inserted channelSection resource contained an invalid value for the targeting.countries[] property.
      badRequest (400) targetInvalidLanguage The channelSections.insert and channelSections.update methods return this error if the inserted channelSection resource contained an invalid value for the targeting.languages[] property.
      badRequest (400) targetInvalidRegion The channelSections.insert and channelSections.update methods return this error if the inserted channelSection resource contained an invalid value for the targeting.regions[] property.
      badRequest (400) operationNotSupported The comments.insert method returns this error if the API user is not able to insert a comment in reply to the top-level comment identified by the snippet.parentId property. In a commentThread resource, the snippet.canReply property indicates whether the current viewer can reply to the thread.
      badRequest (400) invalidChannelId The search.list method returns this error if the channelId parameter in the request specified an invalid channel ID.
      badRequest (400) subscriptionForbidden The subscriptions.insert method returns this error if the API user tries to subscribe to the user's own channel.
    • The captions.update method no longer supports the invalidMetadata and videoNotFound errors.

16 апреля 2015 г.

This update contains the following changes:

  • The migration guide has been updated to explain how to migrate applications still using comments functionality from the v2 API.

    The guide also calls out several commenting features that the v2 API did not support but that are supported in the v3 API . К ним относятся:

    • Retrieving comments about a channel
    • Retrieving all comment threads related to a channel, which means that the API response can contain comments about the channel or any of its videos.
    • Updating the text of a comment
    • Пометка комментария как спама
    • Setting a comment's moderation status

  • The Subscribing to push notifications guide has been updated to reflect the fact that notifications are only pushed to the Google PubSubHubBub hub and not also to the Superfeedr hub as previously indicated.

9 апреля 2015 г.

This update contains the following changes:

  • The API's new commentThread and comment resources let you retrieve, insert, update, delete, and moderate comments.

    • A commentThread resource contains information about a YouTube comment thread, which comprises a top-level comment and replies, if any exist, to that comment. A commentThread resource can represent comments about either a video or a channel.

      The top-level comment and the replies are actually comment resources that are nested inside the commentThread resource. It is important to note that the commentThread resource does not necessarily contain all replies to a comment, and you need to use the comments.list method if you want to retrieve all replies for a particular comment. In addition, some comments do not have replies.

      The API supports the following methods for commentThread resources:

      • commentThreads.list – Retrieve a list of comment threads. Use this method to retrieve comments associated with a particular video or channel.
      • commentThreads.insert – Create a new top-level comment. (Use the comments.insert method to reply to an existing comment.)
      • commentThreads.update – Modify a top-level comment.

    • A comment resource contains information about a single YouTube comment. A comment resource can represent a comment about either a video or a channel. Кроме того, комментарий может быть комментарием верхнего уровня или ответом на комментарий верхнего уровня.

      The API supports the following methods for comment resources:

      • comments.list – Retrieve a list of comment. Use this method to retrieve all of the replies to a particular comment.
      • comments.insert – Create a reply to an existing comment.
      • comments.update – Modify a comment.
      • comments.markAsSpam – Flag one or more comments as spam.
      • comments.setModerationStatus – Set the moderation status of one or more comments. For example, clear a comment for public display or reject a comment as unfit for display. The API request must be authorized by the owner of the channel or video associated with the comments..
      • comments.delete – Delete a comment.

    Note that the API's new https://www.googleapis.com/auth/youtube.force-ssl scope, described in the revision history for April 2, 2015 , is required for calls to the comments.insert , comments.update , comments.markAsSpam , comments.setModerationStatus , comments.delete , commentThreads.insert , and commentThreads.update methods.

  • The new Subscribing to push notifications guide explains the API's new support for push notifications via PubSubHubBub , a server-to-server publish/subscribe protocol for Web-accessible resources. Your PubSubHubBub callback server can receive Atom feed notifications when a channel does any of the following activities:

    • uploads a video
    • updates a video's title
    • updates a video's description

  • The migration guide has also been updated to note the new support for push notifications. However, since the v2 API supported numerous other types of push notifications that are not supported in the v3 API, the mention of PubSubHubBub support is still listed in the Deprecated section of that guide.

  • The API's new https://www.googleapis.com/auth/youtube.force-ssl scope is now a valid scope for any API method that previously supported the https://www.googleapis.com/auth/youtube scope.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) invalidRating The videos.rate method returns this error if the request contained an unexpected value for the rating parameter.
  • The subscriptions.insert method no longer supports the subscriptionLimitExceeded error, which previously indicated that the subscriber identified with the request had exceeded the subscription rate limit.

2 апреля 2015 г.

This update contains the following changes:

  • The new captions resource represents a YouTube caption track. Трек с субтитрами связан только с одним видео YouTube.

    The API supports methods to list , insert , update , download , and delete caption tracks.

  • The migration guide has also been updated to explain how to migrate applications still using captions functionality in the v2 API.

  • The API's new https://www.googleapis.com/auth/youtube.force-ssl scope requires communication with the API server to happen over an SSL connection.

    This new scope grants the same access as the https://www.googleapis.com/auth/youtube scope. And, in fact, those two scopes are functionally identical because the YouTube API server is only available via an HTTPS endpoint. As a result, even though the https://www.googleapis.com/auth/youtube scope does not require an SSL connection, there is actually no other way to make an API request.

    The new scope is required for calls to the all of the caption resource's methods.

11 марта 2015 г.

This update contains the following changes:

  • The YouTube Data API (v3) migration guide contains a new tab, named New in the v3 API , that lists features that the v3 API does support and that the v2 API did not support. The same features were previously and are still listed in other tabs in the guide. For example, the new feature explaining how to update a channel's in-video promotional campaign data is also listed under the Channels (profiles) tab.

  • The YouTube Data API (v3) migration guide has been updated to note that the v3 API will support the following v2 API feature:

  • The YouTube Data API (v3) migration guide has been updated to note that the following v2 API features will not be supported in the v3 API:

    • Retrieve video recommendations – The v3 API does not retrieve a list that only contains videos recommended for the current API user. However, you can use the v3 API to find recommended videos by calling the activities.list method and setting the home parameter value to true .

      In the API response, a resource corresponds to a recommended video if the snippet.type property's value is recommendation . In that case, the contentDetails.recommendation.reason and contentDetails.recommendation.seedResourceId properties will contain information about why the video was recommended. Note that there is no guarantee that the response will contain any particular number of recommended videos.

    • Retrieve channel suggestions

    • Retrieve new subscription videos – The v3 API does not retrieve a list that only contains videos that have recently been uploaded to channels that the API user subscribes to. However, you can use the v3 API to find new subscription videos by calling the activities.list method and setting the home parameter value to true .

      In the API response, a resource corresponds to a new subscription video if the snippet.type property's value is upload . Note that there is no guarantee that the response will contain any particular number of new subscription videos.

    • Поддержка RSS-каналов

    • Push notifications for feed updates – The v2 API supported push notifications, using either the Simple Update Protocol (SUP) or PubSubHubbub , to monitor user activity feeds for YouTube users. Notifications were provided for new channel subscriptions and when videos were rated, shared, marked as favorites, commented on, or uploaded.

      The v3 API will support push notifications using the PubSubHubbub protocol , but the notifications will only cover video uploads and updates to video titles or video descriptions.

    • Channel location – The v2 API used the <yt:location> tag to identify the user's location as entered in the channel's YouTube public profile. While some developers used this field to associate a channel with a particular country, the field's data could not consistently be used for that purpose.

    • Set or retrieve developer tags – The v2 API supported the ability to associate keywords, or developer tags, with a video at the time that the video was uploaded. Developer tags would not be displayed to YouTube users, but video owners could retrieve videos that matched a specific developer tag.

      The v3 API will provide a similar, but not identical, feature. Specifically, a developer will be able to search for videos uploaded by the developer's own application. For this feature, each uploaded video is automatically tagged with the project number that is associated with the developer's application in the Google Developers Console . The developer then uses the same project number to search for videos.

    • List videos by publication date, viewcount, or rating – In the v2 API, the orderby parameter let you sort videos in a playlist by position, duration, publication date, title, and several other values. In the v3 API, playlist items are typically sorted by position in ascending order and other sorting options are not available.

      Есть несколько исключений. A new upload, favorite video, liked video, or recently watched video is automatically added as the first item ( snippet.position = 0 ) for the following types of playlists. So, each of these lists is effectively sorted in order of newest to oldest item based on the times that items were added to the list.

      • пользовательские загрузки
      • любимые видео
      • liked videos
      • смотреть историю

      Note, however, that a new item added to the "Watch later" playlist is added as the last item in that list, so that list is effectively sorted from oldest to newest item.

    • Batch processing – The v3 API supports one of the batch processing use cases that the v2 API had supported. The v3 API's channels.list , channelSections.list , guideCategories.list , playlistItems.list , playlists.list , subscriptions.list , videoCategories.list , and videos.list methods all support an id parameter, which can be used to specify a comma-delimited list of IDs (video IDs, channel IDs, etc.). Using those methods, you can retrieve a list of multiple resources with a single request.

    With these changes, the guide now identifies all functionality that was supported in the old (v2) API that will be deprecated in the current API version (v3).

4 марта 2015 г.

This update contains the following changes:

  • The channelSections.delete and channelSections.update methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The following properties and their child properties have been deprecated:

    • brandingSettings.image.backgroundImageUrl
    • brandingSettings.image.largeBrandedBannerImageImapScript
    • brandingSettings.image.largeBrandedBannerImageUrl
    • brandingSettings.image.smallBrandedBannerImageImapScript
    • brandingSettings.image.smallBrandedBannerImageUrl

    Note: None of these properties had been subject to the API Deprecation Policy.

  • The video resource's new contentDetails.contentRating.contentDetails.contentRating.djctqRatingReasons property identifies the reasons that explain why the video received its DJCQT (Brazil) rating.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    notFound (404) channelNotFound The channels.update method returns this error if the request's id parameter specifies a channel that cannot be found.
    badRequest (400) manualSortRequiredinvalidValue The playlistItems.insert and playlistItems.update methods return this error if the request attempts to set the playlist item's position, but the playlist does not use manual sorting. For example, playlist items might be sorted by date or popularity. You can address this error by removing the snippet.position element from the resource sent in the request body. If you want the playlist item to have a specific position in the list, you need to first update the playlist's ordering setting to Manual . THis setting can be adjusted in the YouTube Video Manager .
    forbidden (403) channelClosed The playlists.list method returns this error if the request's channelId parameter specifies a channel that has been closed.
    forbidden (403) channelSuspended The playlists.list method returns this error if the request's channelId parameter specifies a channel that has been suspended.
    forbidden (403) playlistForbidden The playlists.list method returns this error if the request's id parameter does not support the request or the request is not properly authorized.
    notFound (404) channelNotFound The playlists.list method returns this error if the request's channelId parameter specifies a channel that cannot be found.
    notFound (404) playlistNotFound The playlists.list method returns this error if the request's id parameter specifies a playlist that cannot be found.
    notFound (404) videoNotFound The videos.list method returns this error if the request's id parameter specifies a video that cannot be found.
    badRequest (400) invalidRating The videos.rate method returns this error if the request contains an unexpected value for the rating parameter.

2 марта 2015 г.

This update contains the following changes:

  • The search.list method now supports the relevanceLanguage parameter, which lets you request results that are most relevant to a particular language.

    The YouTube Data API (v3) migration guide has also been updated to explain how to use this new parameter. The parameter addresses a feature gap that previously existed between the current API version (v3) and the previous version (v2), which has already been deprecated.

  • The YouTube Data API (v3) migration guide has also been updated to indicate the deprecation of the special feeds and metadata fields that the v2 API provided for describing movies, trailers, television shows, television seasons, and television episodes.

14 января 2015 г.

This update contains the following changes:

  • The YouTube Data API (v3) migration guide has been updated to explain how to use the v3 API to upload videos using JavaScript. (See the Upload a video section for details.) This functionality is comparable to the browser-based uploading functionality that the v2 API supports. Note that this change to the migration guide does not reflect an actual API change but rather the availability of new sample code for uploading videos with client-side JavaScript.

    Given the support for uploading videos with the JavaScript client library and CORS, the migration guide no longer lists browser-based uploading as a feature that may be deprecated in the v3 API.

  • The documentation for the videos.insert method has been updated to include the new JavaScript code sample described above. The list of JavaScript code samples for the YouTube Data API (v3) has also been updated.

11 ноября 2014 г.

This update contains the following changes:

  • The quota cost for a call to the search.list method has changed to 100 units.

    Important: In many cases, you can use other API methods to retrieve information at a lower quota cost. For example, consider these two ways of finding videos uploaded to the GoogleDevelopers channel.

    • Quota cost: 100 units

      Call the search.list method and search for GoogleDevelopers .

    • Quota cost: 6 units

      Call the channels.list method to find the right channel ID. Set the forUsername parameter to GoogleDevelopers and the part parameter to contentDetails . In the API response, the contentDetails.relatedPlaylists.uploads property specifies the playlist ID for the channel's uploaded videos.

      Then call the playlistItems.list method and set the playlistId parameter to the captured ID and the part parameter to snippet .

8 октября 2014 г.

This update contains the following changes:

  • The channel resource contains two new properties:

    • The status.longUploadsStatus property indicates whether the channel is eligible to upload videos that are more than 15 minutes long. This property is only returned if the channel owner authorized the API request. Valid property values are:

      • allowed – The channel can upload videos more than 15 minutes long.
      • eligible – The channel is eligible to upload videos more than 15 minutes long but must first enable the feature.
      • disallowed – The channel is not able or eligible to upload videos more than 15 minutes long.

      See the property definition for more information about these values. The YouTube Help Center also provides more detailed information about this feature.

    • The invideoPromotion.useSmartTiming property indicates whether the channel's promotional campaign uses "smart timing." This feature attempts to show promotions at a point in the video when they are more likely to be clicked and less likely to disrupt the viewing experience. This feature also picks up a single promotion to show on each video.

  • The definitions of the video resource's snippet.title and snippet.categoryId properties have both been updated to clarify the way that API handles calls to the videos.update method. If you call that method to update the snippet part of a video resource, you must set a value for both of those properties.

    If you try to update the snippet part of a video resource and do not set a value for both of those properties, the API returns an invalidRequest error. That error's description has also been updated.

  • The video resource's contentDetails.contentRating.oflcRating property, which identifies a video's rating from New Zealand's Office of Film and Literature Classification, now supports two new ratings: oflcRp13 and oflcRp16 . These correspond to the RP13 and RP16 ratings, respectively.

  • The channelBanners.insert method now supports the following error:

    Тип ошибки Детализация ошибки Описание
    badRequest bannerAlbumFull The channel owner's YouTube Channel Art album has too many images. The channel owner should go to http://photos.google.com , navigate to the albums page, and remove some from images from that album.

12 сентября 2014 г.

This update contains the following changes:

  • The quota cost for a call to the search.list method has changed from 1 unit to 2 units in addition to the cost of the specified resource parts .

13 августа 2014 г.

This update contains the following changes:

  • The subscriptions.insert method now supports the following error:

    Тип ошибки Детализация ошибки Описание
    badRequest subscriptionLimitExceeded The subscriber identified with the request has exceeded the subscription rate limit. More subscriptions can be attempted in a few hours.

12 августа 2014 г.

This update contains the following changes:

  • A new guide, titled Migrating Your Application to YouTube Data API (v3) , explains how to use the YouTube Data API (v3) to perform functionality available in the YouTube Data API (v2). The older API was officially deprecated as of March 4, 2014. The guide intends to help you migrate applications still using the v2 API to the most recent API version.

8 июля 2014 г.

This update contains the following changes:

  • The playlists.insert method now supports the following error:

    Тип ошибки Детализация ошибки Описание
    badRequest maxPlaylistExceeded This error occurs if a playlist cannot be created because the channel already has the maximum number of playlists allowed.

18 июня 2014 г.

This update contains the following changes:

28 мая 2014 г.

This update contains the following changes:

  • The search.list method now supports the location and locationRadius parameters, which let you search for videos associated with a geographic location. A request must specify a value for both parameters to retrieve results based on location, and the API will return an error if a request includes only one of the two parameters.

    • The location parameter specifies the latitude/longitude coordinates at the center of the circular geographic area.

    • The locationRadius parameter specifies the maximum distance that the location associated with a video can be from the center of the area for the video to still be included in search results.

13 мая 2014 г.

This update contains the following changes:

  • The channel resource's invideoPromotion.items[] property has been updated to note that you can typically only set one promoted item for your channel. If you try to insert too many promoted items, the API will return a tooManyPromotedItems error, which has an HTTP 400 status code.

  • The channelSection resource now can contain information about a few new types of featured content. The channelSection resource's snippet.type property now supports the following values:

    • postedPlaylists - playlists that the channel's owner posted to the channel's activity feed
    • postedVideos - videos that the channel's owner posted to the channel's activity feed
    • subscriptions - channels that the channel owner has subscribed to

  • The video resource's new contentDetails.contentRating.ifcoRating property identifies the rating that a video received from the Irish Film Classification Office.

  • The definition of the watermark resource's position.cornerPosition property has been updated to note that the watermark always appear in the upper right corner of the player.

  • The definition of the q parameter for the search.list method has been updated to note that the query term can use the Boolean NOT ( - ) operator to exclude videos associated with a particular search term. The value can also use the Boolean OR ( | ) operator to find videos associated with one of several search terms.

  • The definition of the pageInfo.totalResults property that is returned in an API response to a search.list call has been updated to note that the value is an approximation and may not represent an exact value. In addition, the maximum value is 1,000,000. You should not use this value to create pagination links. Instead, use the nextPageToken and prevPageToken property values to determine whether to show pagination links.

  • The watermarks.set and watermarks.unset methods have been updated to reflect that the API returns an HTTP 204 response code for successful requests to those methods.

2 мая 2014 г.

This update contains the following changes:

  • The new i18nLanguage resource identifies an application language that the YouTube website supports. The application language can also be referred to as a UI language. For the YouTube website, an application language could be automatically selected based on Google Account settings, browser language, or IP location, and a user could also manually select the desired UI language from the YouTube site footer.

    The API supports a method to list supported application languages. Supported languages can be used as the value of the hl parameter when calling API methods like videoCategories.list and guideCategories.list .

  • The new i18nRegion resource 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. For the YouTube website, a content region could be automatically selected based on heuristics like the YouTube domain or the user's IP location, and a user could also manually select the desired content region from the YouTube site footer.

    The API supports a method to list supported content regions. Supported region codes can be used as the value of the regionCode parameter when calling API methods like search.list , videos.list , activities.list , and videoCategories.list .

7 апреля 2014 г.

This update contains the following changes:

  • The new channelSection resource 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.

    The API supports methods to list , insert , update , or delete channel sections. You can retrieve a list of channel sections for the authenticated user's channel, by specifying a particular channel ID, or by specifying a list of unique channel section IDs.

    The error documentation has also been updated to describe the error messages that the API supports specifically for these new methods.

  • The definition of the video resource's fileDetails object has been updated to explain that that object will only be returned if the video's processingDetails.fileDetailsAvailability property has a value of available .

    Similarly, the definition of the video resource's suggestions object has been updated to explain that that object will only be returned if the video's processingDetails.tagSuggestionsAvailability property or its processingDetails.editorSuggestionsAvailability property has a value of available .

  • The documentation for the videos.insert and videos.update methods has been updated to reflect that the status.publishAt property can be set when calling those methods.

  • The definition of the channel resource's invideoPromotion object has been updated to explain that the object can only be retrieved by the channel's owner.

  • The parameter list for the videos.rate method has been updated to reflect that that method does not actually support the onBehalfOfContentOwner parameter. This was a documentation error as videos.rate requests that set this parameter return a 500 error.

31 марта 2014 г.

This update contains the following changes:

13 марта 2014 г.

This update contains the following changes:

  • The API now supports the contentOwnerDetails part for channel resources. The new part contains channel data that is relevant for YouTube partners linked with the channel, including the ID of the content owner linked to the channel and the date and time when the content owner and channel were linked. Note that this new part is not subject to the deprecation policy .

  • The documentation now lists the maximum supported character length for the following properties:

    Ресурс Свойство Максимальная длина
    channel invideoPromotion.items[].customMessage 40 символов
    video snippet.title 100 символов
    video snippet.description 5000 bytes
    video snippet.tags 500 символов. Note that the property value is a list and that commas between items in the list count toward the limit.
  • The channel resource's brandingSettings.watch.featuredPlaylistId property has been deprecated. The API will return an error if you attempt to set its value.

  • The following video resource properties have been added to the list of values that can be set when inserting or updating a video:

  • The error documentation now specifies the HTTP response code for each error type.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) invalidCriteria The channels.list method returns this error if the request specifies filter parameters that cannot be used in conjunction with each other.
    badRequest (400) channelTitleUpdateForbidden The channels.update method returns this error if you attempt to update a channel's brandingSettings part and change the value of the brandingSettings.channel.title property. (Note that the API does not return the error if you omit the property.)
    badRequest (400) invalidRecentlyUploadedBy The channels.update method returns this error if the invideoPromotion.items[].id.recentlyUploadedBy property specifies an invalid channel ID.
    badRequest (400) invalidTimingOffset The channels.update method returns this error if the invideoPromotion part specifies an invalid timing offset.
    badRequest (400) tooManyPromotedItems The channels.update method returns this error if the invideoPromotion part specifies more than the allowed number of promoted items.
    forbidden (403) promotedVideoNotAllowed The channels.update method returns this error if the invideoPromotion.items[].id.videoId property specifies a video ID that either cannot be found or cannot be used as a promoted item.
    forbidden (403) websiteLinkNotAllowed The channels.update method returns this error if the invideoPromotion.items[].id.websiteUrl property specifies a URL that is not allowed.
    required (400) requiredTimingType The channels.update method returns this error if a request does not specify default timing settings for when YouTube should display a promoted item.
    required (400) requiredTiming The channels.update method must specify an invideoPromotion.items[].timing object for each promoted item.
    required (400) requiredWebsiteUrl The channels.update method must specify an invideoPromotion.items[].id.websiteUrl property for each promoted item.
    badRequest (400) invalidPublishAt The videos.insert method returns this error if the request metadata specifies an invalid scheduled publishing time.

4 марта 2014 г.

This update contains the following changes:

5 декабря 2013 г.

This update contains the following changes:

  • The search.list method's documentation has been updated to properly reflect that you do not need to specify a value for exactly one filter parameter when submitting a search request. Rather, you can set a value for zero filter parameters or for one filter parameter.

  • The definitions for the search.list method's parameters have been updated to note that you must set the type parameter's value to video if you also specify a value for any of the following parameters:

    • eventType
    • videoCaption
    • videoCategoryId
    • videoDefinition
    • videoDimension
    • videoDuration
    • videoEmbeddable
    • videoLicense
    • videoSyndicated
    • videoType

  • The minimum size of uploaded channel banner images has been reduced to 2048px by 1152px. (Previously, the minimum size was 2120px by 1192px.) In addition, note that the channel resource documentation specifies the maximum sizes of all of the banner images served from the API. For example, the maximum size of the brandingSettings.image.bannerTvImageUrl image for television applications is 2120px by 1192px, but the actual image may be 2048px by 1152px. The YouTube Help Center provides additional guidance for optimizing channel art for display on different types of devices.

  • Several channel resource property definitions have been updated to reflect the following information:

    • The brandingSettings.channel.description property's value has a maximum length of 1000 characters.
    • The brandingSettings.channel.featuredChannelsTitle property has a maximum length of 30 characters.
    • The brandingSettings.channel.featuredChannelsUrls[] property can now list up to 100 channels.
    • The brandingSettings.channel.unsubscribedTrailer property value, if set, must specify the YouTube video ID of a public or unlisted video that is owned by the channel owner.

  • The channels.update method now supports updates to the invideoPromotion.items[].promotedByContentOwner property. That property indicates whether the content owner's name will be shown when displaying the promotion. It can only be set if the API request that sets the property value is being made on the content owner's behalf using the onBehalfOfContentOwner parameter.

  • The playlistItems.list and playlistItems.insert methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The contentDetails.contentRating.acbRating property can now specify a rating from either the Australian Classification Board (ACB) for movies or from the Australian Communications and Media Authority (ACMA) for children's television programming.

  • The new contentDetails.contentRating.catvRating and contentDetails.contentRating.catvfrRating properties identify the ratings that a video received under the Canadian TV Classification System and the French-language Régie du cinéma rating system, which is used in Québec, respectively.

  • The videoCategory resource's new snippet.assignable property indicates whether updated videos or newly uploaded videos can be associated with that video category.

  • Code samples have been added for the following methods:

24 октября 2013 г.

This update contains the following changes:

  • The API includes two additional features designed to help find and feature live broadcast content:

    The new snippet.liveBroadcastContent property in search results indicates whether a video or channel resource has live broadcast content. Valid property values are upcoming , active , and none .

    • The video resource's new snippet.liveBroadcastContent property indicates whether the video is an upcoming or active live broadcast. The list below explains the property's possible values:

      • upcoming – The video is a live broadcast that has not yet started.
      • active – The video is an ongoing live broadcast.
      • none – The video is not an upcoming or active live broadcast. This will be the property value for completed broadcasts that are still viewable on YouTube.

    • The video resource's new liveStreamingDetails property is an object that contains metadata about a live video broadcast. To retrieve this metadata, include liveStreamingDetails in the part parameter value's list of resource parts. The metadata includes the following new properties:

      To retrieve this metadata, include liveStreamingDetails in the part parameter value when calling the videos.list , videos.insert , or videos.update method.

    Note that two other features for identifying live broadcast content were released on October 1, 2013 – the search.list method's eventType parameter and the search result's snippet.liveBroadcastContent property.

  • The videos.insert method now supports the notifySubscribers parameter, which indicates whether YouTube should send a notification about the new video to users who subscribe to the video's channel. The parameter's default value is True , which indicates that subscribers will be notified of newly uploaded videos. However, a channel owner who is uploading many videos might prefer to set the value to False to avoid sending a notification about each new video to the channel's subscribers.

  • The list of properties that can be modified when calling the channels.update method has been updated to include the invideoPromotion.items[].customMessage and invideoPromotion.items[].websiteUrl properties. In addition, the list has been modified to identify the brandingSettings properties that are modifiable. These brandingSettings properties were already modifiable, so the documentation change does not reflect a change to the API's existing functionality.

  • The playlists.insert , playlists.update , and playlists.delete methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The playlists.insert method now supports the onBehalfOfContentOwnerChannel parameter, which is already supported for several other methods.

  • The video resource's contentDetails.contentRating.tvpgRating property now supports a value of pg14 , which corresponds to a TV-14 rating.

  • The definition of the snippet.liveBroadcastContent property, which is part of search results, has been corrected to reflect that live is a valid property value, but active is not a valid property value.

  • The video resource's contentDetails.contentRating.mibacRating property now supports two additional ratings:

    • mibacVap (VAP) – Children should be accompanied by an adult.
    • mibacVm6 (VM6) – Restricted to 6 and over.
    • mibacVm12 (VM12) – Restricted to 12 and over.

  • The channel resource's new invideoPromotion.items[].promotedByContentOwner property indicates whether the content owner's name will be shown when displaying the promotion. This field can only be set if the API request that sets the value is being made on the content owner's behalf. See the onBehalfOfContentOwner parameter for more information.

1 октября 2013

This update contains the following changes:

  • The channel resource's new auditDetails object contains channel data that a multichannel network (MCN) would evaluate while determining whether to accept or reject a particular channel. Note that any API request that retrieves this resource part must provide an authorization token that contains the https://www.googleapis.com/auth/youtubepartner-channel-audit scope. In addition, any token that uses that scope must be revoked when the MCN decides to accept or reject the channel or within two weeks of the date that the token was issued.

  • The channel resource's invideoPromotion.items[].id.type property now supports a value of recentUpload , which indicates that the promoted item is the most recently uploaded video from a specified channel.

    By default, the channel is the same as the one for which the in-video promotion data is set. However, you can promote the most recently uploaded video from another channel by setting the value of the new invideoPromotion.items[].id.recentlyUploadedBy property to the channel ID for that channel.

  • The channel resource contains three new properties – brandingSettings.image.bannerTvLowImageUrl , brandingSettings.image.bannerTvMediumImageUrl , brandingSettings.image.bannerTvHighImageUrl – that specify the URLs for the banner images that display on channel pages in television applications.

  • The new snippet.liveBroadcastContent property in search results indicates whether a video or channel resource has live broadcast content. Valid property values are upcoming , active , and none .

    • For a video resource, a value of upcoming indicates that the video is a live broadcast that has not yet started, while a value of active indicates that the video is an ongoing live broadcast.
    • For a channel resource, a value of upcoming indicates that the channel has a scheduled broadcast that has not yet started, while a value of acive indicates that the channel has an ongoing live broadcast.

  • In the watermark resource, the targetChannelId property has changed from an object to a string. Instead of containing a child property that specifies the YouTube channel ID of the channel that the watermark image links to, the targetChannelId property now specifies that value itself. Accordingly, the resource's targetChannelId.value property has been removed.

  • The thumbnails.set method now supports the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The search.list method now supports the eventType parameter, which restricts a search to only return either active, upcoming, or completed broadcast events.

  • The new contentDetails.contentRating.mibacRating property identifies the rating that a video received from Italy's Ministero dei Beni e delle Attivita Culturali e del Turismo.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    badRequest invalidImage The thumbnails.set method returns this error if the provided image content is invalid.
    forbidden videoRatingDisabled The videos.rate method returns this error if the owner of the video that is being rated has disabled ratings for that video.

27 августа 2013 г.

This update contains the following changes:

  • The new watermark resource identifies an image that displays during playbacks of a specified channel's videos. Вы также можете указать целевой канал, с которым будет связано изображение, а также сведения о времени, которые определяют, когда водяной знак появляется во время воспроизведения видео и продолжительность его видимости.

    The watermarks.set method uploads and sets a channel's watermark image. The watermarks.unset method deletes a channel's watermark image.

    The error documentation describes the error messages that the API supports specifically for the watermarks.set and watermarks.unset methods.

  • The channel resource's new statistics.hiddenSubscriberCount property contains a boolean value that indicates whether the channel's number of subscribers is hidden. As such, the property's value is false if the channel's subscriber count is publicly visible.

  • The playlists.list method now supports the onBehalfOfContentOwner and onBehalfOfContentOwnerChannel parameters. Both parameters are already supported for several other methods.

  • The videos.list method now supports the regionCode parameter, which identifies the content region for which a chart should be retrieved. This parameter can only be used in conjunction with the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code.

  • The error documentation describes the following new common request error, which could occur for multiple API methods:

    Тип ошибки Детализация ошибки Описание
    forbidden insufficientPermissions The scopes associated with the OAuth 2.0 token provided for the request are insufficient for accessing the requested data.

August 15, 2013

This update contains the following changes:

  • The channel resource's invideoPromotion object has the following new and updated properties:

    • The API now supports the ability to specify a website as a promoted item. To do so, set the invideoPromotion.items[].id.type property value to website and use the new invideoPromotion.items[].id.websiteUrl property to specify the URL. Also use the new invideoPromotion.items[].customMessage property to define a custom message to display for the promotion.

      Links can be to associated websites, merchant sites, or social networking sites. See the YouTube Help Center instructions for associated websites and merchant sites for more information about enabling links for your content.

      By adding promotional links, you agree that those links will not be used to redirect traffic to unauthorized sites and that those links will comply with YouTube's AdWords policies , YouTube ad policies , YouTube Community Guidelines and YouTube Terms of Service .

    • The properties related to the timing settings for displaying promoted items during video playback have been restructured:

      • The invideoPromotion.timing object has been moved to invideoPromotion.items[].timing . This object now enables you to customize the timing data for each promoted item in the invideoPromotion.items[] list.

      • The new invideoPromotion.defaultTiming object specifies default timing settings for your promotion. Those settings define when a promoted item will display during playback of one of your channel's videos. You can override the default timing for any given promoted item using the invideoPromotion.items[].timing object.

      • The new invideoPromotion.items[].timing.durationMs property specifies the amount of time, in milliseconds, that the promotion should display. The invideoPromotion.defaultTiming object also contains a durationMs field that specifies the default amount of time that the promoted item will display.

    • The invideoPromotion.items[].type and invideoPromotion.items[].videoId properties both have been moved into the invideoPromotion.items[].id object.

  • The subscriptions.list method now supports the onBehalfOfContentOwner and onBehalfOfContentOwnerChannel parameters. Both parameters are already supported for several other methods.

  • In the API response to a thumbnails.set request, the kind property value has changed from youtube#thumbnailListResponse to youtube#thumbnailSetResponse .

  • Code samples have been added for the following methods:

    Note that the Python example for the playlistItems.insert method was also removed since the functionality it demonstrated is now handled by the videos.rate method.

  • The error documentation describes the following new request context error, which could occur for any API method that supports the mine request parameter:

    Тип ошибки Детализация ошибки Описание
    badRequest invalidMine The mine parameter cannot be used in requests where the authenticated user is a YouTube partner. You should either remove the mine parameter, authenticate as a YouTube user by removing the onBehalfOfContentOwner parameter, or act as one of the partner's channels by providing the onBehalfOfContentOwnerChannel parameter if available for the called method.

August 8, 2013

This update contains the following changes:

30 июля 2013 г.

This update contains the following changes:

  • In a channelBanner resource, the value of the kind property's value has changed from youtube#channelBannerInsertResponse to youtube#channelBannerResource . This resource is returned in response to a channelBanners.insert request.

  • The channel resource's new brandingSettings.channel.profileColor property specifies a prominent color that complements the channel's content. The property value is a pound sign ( # ) followed by a six-character hexadecimal string, such as #2793e6 .

  • The API now supports the ability to specify whether a subscription is for all of a channel's activities or just for new uploads. The subscription resource's new contentDetails.activityType property identifies the types of activities that the subscriber will be notified about. Valid property values are all and uploads .

  • The videos.list method supports new parameters for retrieving a chart of the most popular videos on YouTube:

    • The chart parameter identifies the chart that you want to retrieve. Currently, the only supported value is mostPopular . Note that the chart parameter is a filter parameter, which means it cannot be used in the same request as other filter parameters ( id and myRating ).
    • The videoCategoryId parameter identifies the video category for which the chart should be retrieved. This parameter can only be used in conjunction with the chart parameter. By default, charts are not restricted to a particular category.

  • The video resource's new topicDetails.relevantTopicIds[] property provides a list of Freebase topic IDs that are relevant to the video or its content. The subjects of these topics may be mentioned in or appear in the video.

  • The video resource's recordingDetails.location.elevation property has been renamed to recordingDetails.location.altitude , and its fileDetails.recordingLocation.location.elevation property has been renamed to fileDetails.recordingLocation.location.altitude .

  • The video resource's contentDetails.contentRating object specifies the ratings that a video received under various rating schemes, including MPAA ratings, TVPG ratings, and so forth. For each rating system, the API now supports a rating value that indicates that the video has not been rated. Note that for MPAA ratings , an "unrated" rating is frequently used to identify uncut versions of films for which the cut version of the film did receive an official rating.

  • The video resource's new contentDetails.contentRating.ytRating property identifies age-restricted content. The property value will be ytAgeRestricted if YouTube has identified the video as containing content that is inappropriate for users less than 18 years old. If the property is absent or if the property value is empty, then the content has not been identified as age-restricted.

  • The channels.list method's mySubscribers parameter has been deprecated. Use the subscriptions.list method and its mySubscribers parameter to retrieve a list of subscribers to the authenticated user's channel.

  • The channelBanners.insert , channels.update , videos.getRating , and videos.rate methods all now support the onBehalfOfContentOwner parameter. That parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value.

  • The channels.update method's documentation has been updated to reflect the fact that that method can be used to update the channel resource's brandingSettings object and its child properties. The documentation also now lists the updated list of properties that you can set for the channel resource's invideoPromotion object.

  • The error documentation describes the following new errors:

    Тип ошибки Детализация ошибки Описание
    forbidden accountDelegationForbidden This error is not specific to a particular API method. It indicates that the authenticated user is not authorized to act on behalf of the specified Google account.
    forbidden authenticatedUserAccountClosed This error is not specific to a particular API method. It indicates that the authenticated user's YouTube account is closed. If the user is acting on behalf of another Google Account, then this error would indicate that that other account is closed.
    forbidden authenticatedUserAccountSuspended This error is not specific to a particular API method. It indicates that the authenticated user's YouTube account is suspended. If the user is acting on behalf of another Google Account, then this error would indicate that that other account is suspended.
    forbidden authenticatedUserNotChannel This error is not specific to a particular API method. It indicates that the API server cannot identify the channel associated with the API request. If the request is authorized and uses the onBehalfOfContentOwner parameter, you should also set the onBehalfOfContentOwnerChannel parameter.
    forbidden cmsUserAccountNotFound This error is not specific to a particular API method. The CMS user is not allowed to act on behalf of the specified content owner.
    notFound contentOwnerAccountNotFound This error is not specific to a particular API method. The specified content owner account was not found.
    badRequest invalidPart This error is not specific to a particular API method. The request's part parameter specifies parts that cannot be written at the same time.
    badRequest videoChartNotFound The videos.list method returns this error when the request specifies an unsupported or unavailable video chart.
    notFound videoNotFound The videos.update method returns this error to indicate that the video you are trying to update cannot be found. Check the value of the id property in the request body to ensure it is correct.

10 июня 2013 г.

This update contains the following changes:

  • The channels.list method's new forUsername parameter enables you to retrieve information about a channel by specifying its YouTube username.

  • The activities.list method now supports the regionCode parameter, which instructs the API to return results relevant to the specified country. YouTube uses this value when the authorized user's previous activity on YouTube does not provide enough information to generate the activity feed.

  • Playlist resources now contain the snippet.tags property. The property will be only be returned to authorized users who are retrieving data about their own playlists. Authorized users can also set playlist tags when calling either the playlists.insert or playlists.update methods.

  • The onBehalfOfContentOwner parameter, which was previously supported for the channels.list and search.list methods, is now also supported for the videos.insert , videos.update , and videos.delete methods. Note that when this parameter is used in a call to the videos.insert method, the request must also specify a value for the new onBehalfOfContentOwnerChannel parameter, which identifies the channel to which the video will be added. The channel must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.

    Параметр указывает, что учетные данные авторизации запроса идентифицируют пользователя YouTube CMS, который действует от имени владельца контента, указанного в значении параметра. Учетная запись CMS, с помощью которой пользователь проходит аутентификацию, должна быть связана с указанным владельцем контента YouTube.

    This parameter is intended for content partners that own and manage many different YouTube channels. The parameter enables those partners to authenticate once and get access to all of their video and channel data, without having to provide authentication credentials for each individual channel.

    Specifically in regard to this release, the parameter now enables a content partner to insert, update, or delete videos in any of the YouTube channels that the partner owns.

  • The error documentation describes the following new errors:

    Тип ошибки Детализация ошибки Описание
    forbidden insufficientCapabilities This error is not specific to a particular API method. It indicates that the CMS user calling the API does not have sufficient permissions to perform the requested operation. This error is associated with the use of the onBehalfOfContentOwner parameter, which is supported for several API methods.
    unauthorized authorizationRequired The activities.list method returns this error when the request uses the home parameter but is not properly authorized.
  • In the channels resource, the invideoPromotion.channelId property has been removed because the channel ID is already specified using the resource's id property.

  • The new Working with Channel IDs guide explains how the API uses channel IDs. The guide may be especially useful for developers migrating from the previous version of the API and who have applications that either request content for the default user or that rely on the notion that every YouTube channel has a unique username, which is no longer the case.

May 22, 2013

This update contains the following changes:

14 мая 2013 г.

This update contains the following changes:

  • Standalone pages now list code samples for Java , .NET , PHP , and Ruby .

  • The page that lists Python code samples now includes examples for adding a subscription, creating a playlist, and updating a video.

10 мая 2013 г.

This update contains the following changes:

8 мая 2013 г.

This update contains the following changes:

  • Channel resources now support the inVideoPromotion object, which encapsulates information about a promotional campaign associated with the channel. A channel can use an in-video promotional campaign to display thumbnail images for a promoted video within the video player during playbacks of the channel's videos.

    You can retrieve this data by including invideoPromotion in the part parameter value in a channels.list request.

  • The new channels.update method can be used to update a channel's in-video promotional campaign data. Note that the method only supports updates to the invideoPromotion part of the channel resource and does not yet support updates to other parts of that resource.

2 мая 2013 г.

This update contains the following changes:

  • Channel resources now support the status.isLinked property, which indicates whether the channel data identifies a user that is already linked to either a YouTube username or a Google+ account. A user that has one of these links already has a public YouTube identity, which is a prerequisite for several actions, such as uploading videos.

  • Subscription resources now support the subscriberSnippet part. That object encapsulates contains snippet data for the subscriber's channel.

  • The API now supports the videos.getRating method, which retrieves the ratings that the authenticated user gave to a list of one or more videos.

  • The videos.list method's new myRating parameter enables you to retrieve a list of videos that the authenticated user rated with a like or dislike rating.

    The myRating parameter and the id parameter are both now considered filter parameters, which means that an API request must specify exactly one of the parameters. (Previously, the id parameter was a required parameter for this method.)

    The method returns a forbidden error for requests that attempt to retrieve video rating information but are not properly authorized to do so.

  • With the introduction of the myRating parameter, the videos.list method has also been updated to support pagination. Note, however, that paging parameters are only supported for requests using the myRating parameter. (Paging parameters and information are not supported for requests that use the id parameter.)

    • The maxResults parameter specifies the maximum number of videos that the API can return in the result set, and the pageToken parameter identifies a specific page in the result set that you want to retrieve.

    • The youtube#videoListResponse resource, which is returned in response to a videos.list request, now contains the pageInfo object, which contains details like the total number of results and the number of results included in the current result set. The youtube#videoListResponse resource can also include nextPageToken and prevPageToken properties, each of which provides a token that could be used to retrieve a specific page in the result set.

  • The videos.insert method supports the following new parameters:

    • autoLevels – Set this parameter value to true to instruct YouTube to automatically enhance the video's lighting and color.
    • stabilize – Set this parameter value to true to instruct YouTube to adjust the video by removing shakiness resulting from camera motions.

  • The channelTitle property has been added to the snippet for the following resources:

    • playlistItem – The property specifies the name of the channel that added the playlist item.
    • playlist – The property specifies the name of the channel that created the playlist.
    • subscription – The property specifies the name of the channel that is subscribed to.

  • Code samples have been added for the following methods:

  • The subscriptions.list method's new mySubscribers parameter enables you to retrieve a list of the currently authenticated user's subscribers. This parameter can only be used in a properly authorized request.

    Note: This functionality is intended to replace the mySubscribers parameter currently supported for the channels.list method. That parameter will be deprecated.

  • In a video resource, the property value unspecified is no longer a possible value for any of the following properties:

  • API requests that contain an unexpected parameter now return a badRequest error, and the reported reason for the error is unexpectedParameter .

  • The error that the playlistItems.insert method returns when the playlist already contains the maximum number of allowed items has been updated. The error is now reported as a forbidden error, and the error reason is playlistContainsMaximumNumberOfVideos .

19 апреля 2013 г.

This update contains the following changes:

  • The new videos.rate method lets a user set a like or dislike rating on a video or remove a rating from a video.

    The error documentation has also been updated to list the errors that the API might return in response to a videos.rate method call.

  • Thumbnail images are now identified in the API documentation as a separate resource , and the new thumbnails.set method enables you to upload a custom video thumbnail to YouTube and set it for a video.

    The error documentation has also been updated to list the errors that the API might return in response to a thumbnails.set method call.

    Note that this change does not really affect existing resources that return thumbnail images. Thumbnail images are returned in those resources in the same way that they were previously, though the documentation does now list the names of the different thumbnail sizes that the API might return.

  • The channel resource's new brandingSettings part identifies settings, text, and images for the channel's channel page and video watch pages.

  • The playlistItem resource contains the following new properties:

    • The new status object encapsulates status information about the playlist item, and the status.privacyStatus property identifies the playlist item's privacy status.

  • The video resource contains the following new properties:

  • The playlistItems.update method's documentation has been updated to reflect the fact that the snippet.resourceId property must be specified in the resource sent as the request body.

  • The search.list method now supports the following functionality:

    • The new forMine parameter restricts a search to only retrieve the authenticated user's videos.

    • The order parameter now supports the ability to sort results alphabetically by title ( order=title ) or by video count in descending order ( order=videoCount ).

    • The new safeSearch parameter indicates whether search results should include restricted content.

  • The videos.insert method supports several new errors, which are listed in the table below:

    Тип ошибки Детализация ошибки Описание
    badRequest invalidCategoryId The snippet.categoryId property specifies an invalid category ID. Use the videoCategories.list method to retrieve supported categories.
    badRequest invalidRecordingDetails The metadata specifies invalid recording details.
    badRequest invalidVideoGameRating The request metadata specifies an invalid video game rating.
    badRequest invalidVideoMetadata The request metadata is invalid.
  • The onBehalfOfContentOwner parameter has been removed from the list of supported parameters for the videos.update and videos.delete methods.

12 марта 2013 г.

This update contains the following changes:

  • The channelTitle property has been added to the snippet for the following resources:

    • activity – The property specifies the name of the channel responsible for the activity.
    • search – The property specifies the name of the channel associated with the resource that the search result identifies.
    • video – The property specifies the name of the channel that uploaded the video.

  • The search.list method supports the following new parameters:

    • The channelType parameter lets you restrict a search for channels to retrieve all channels or to retrieve only shows.

    • The videoType parameter lets you restrict a search for videos to retrieve all videos or to retrieve only movies or only episodes of shows.

  • The definition of the video resource's recordingDetails part has been updated to note that the object will only be returned for a video if the video's geolocation data or recording time has been set.

  • The playlistItems.update method now returns an invalidSnippet error, which is returned if the API request does not specify a valid snippet.

  • Several API methods support new parameters that are intended exclusively for YouTube content partners. YouTube content partners include movie and television studios, record labels, and other content creators that make their content available on YouTube.

    • Параметр onBehalfOfContentOwner указывает, что учетные данные авторизации запроса идентифицируют пользователя YouTube CMS, который действует от имени владельца контента, указанного в значении параметра. Учетная запись CMS, с помощью которой пользователь проходит аутентификацию, должна быть связана с указанным владельцем контента YouTube.

      This parameter is intended for content partners that own and manage many different YouTube channels. The parameter enables those partners to authenticate once and get access to all of their video and channel data, without having to provide authentication credentials for each individual channel.

      The channels.list , search.list , videos.delete , videos.list , and videos.update methods all support this parameter.

    • The managedByMe parameter, which is supported by the channels.list method, instructs the API to return all channels owned by the content owner that the onBehalfOfContentOwner parameter specifies.

    • The forContentOwner parameter, which is supported by the search.list method, instructs the API to restrict search results to only include resources that are owned by the content owner that the onBehalfOfContentOwner parameter specifies.

25 февраля 2013 г.

This update contains the following changes:

  • The API supports several new parts and properties for video resources:

    • The new fileDetails , processingDetails , and suggestions parts provide information to video owners about their uploaded videos. This data is very useful in applications that enable video uploads and includes the following:

      • processing status and progress
      • errors or other issues encountered while processing a video
      • availability of thumbnail images
      • suggestions for improving video or metadata quality
      • details about the original file uploaded to YouTube

      All of these parts can only be retrieved by the video owner. The list below briefly describes the new parts, and the video resource documentation defines all of the properties that each part contains.

      • The fileDetails object contains information about the video file that was uploaded to YouTube, including the file's resolution, duration, audio and video codecs, stream bitrates, and more.

      • The processingProgress object contains information about YouTube's progress in processing the uploaded video file. The object's properties identify the current processing status and estimate the time remaining until YouTube finishes processing the video. This part also indicates whether different types of data or content, such as file details or thumbnail images, are available for the video.

        This object is designed to be polled so that the video uploader can track the progress that YouTube has made in processing the uploaded video file.

      • The suggestions object contains suggestions that identify opportunities to improve the video quality or the metadata for the uploaded video.

    • The contentDetails part contains four new properties. These properties can be retrieved with unauthenticated requests.

      • dimension – Indicates whether the video is available in 2D or 3D.
      • definition – Indicates whether the video is available in standard or high definition.
      • caption – Indicates whether captions are available for the video.
      • licensedContent – Indicates whether the video contains content that has been claimed by a YouTube content partner.

    • The status part contains two new properties. Video owners can set values for both properties when inserting or updating a video. These properties can also be retrieved with unauthenticated requests.

      • embeddable – Indicates whether the video can be embedded on another website.
      • license – Specifies the video's license. Valid values are creativeCommon and youtube .

  • The definition of the part parameter has been updated for the videos.list , videos.insert , and videos.update methods to list the newly added parts described above as well as the recordingDetails part, which had been inadvertently omitted.

  • The channel resource's new contentDetails.googlePlusUserId property specifies the Google+ profile ID associated with the channel. This value can be used to generate a link to the Google+ profile.

  • Each thumbnail image object now specifies the image's width and height. Thumbnail images are currently returned in activity , channel , playlist , playlistItem , search result , subscription , and video resources.

  • The playlistItems.list now supports the videoId parameter, which can be used in conjunction with the playlistId parameter to only retrieve the playlist item that represents the specified video.

    The API returns a notFound error if the video that the parameter identifies cannot be found in the playlist.

  • The error documentation describes a new forbidden error, which indicates that a request is not properly authorized for the requested action.

  • The channel resource's snippet.channelId property has been removed. The resource's id property provides the same value.

30 января 2013 г.

This update contains the following changes:

  • The new error page lists errors that the API can return. The page includes general errors, which might occur for multiple different API methods, as well as method-specific errors.

16 января 2013 г.

This update contains the following changes:

  • Code samples are now available for the methods and languages shown in the list below:

  • An activity resource can now report a channelItem action, which occurs when YouTube adds a video to an automatically generated YouTube channel . (YouTube algorithmically identifies topics that have a significant presence on the YouTube website and automatically generates channels for those topics.)

  • The following search.list parameters have been updated:

    • The q parameter is no longer designated as a filter, which means ....
    • The relatedToVideo parameter has been renamed relatedToVideoId .
    • The published parameter has been replaced with two new parameters, publishedAfter and publishedBefore , which are described below.

  • The search.list method supports the following new parameters:

    Имя параметра Ценить Описание
    channelId string Return resources created by the specified channel.
    publishedAfter datetime Return resources created after the specified time.
    publishedBefore datetime Return resources created before the specified time.
    regionCode string Return resources for the specified country.
    videoCategoryId string Filter video search results to only include videos associated with the specified video category .
    videoEmbeddable string Filter video search results to only include videos that can be played in an embedded player on a web page. Set the parameter value to true to only retrieve embeddable videos.
    videoSyndicated string Filter video search results to only include videos that can be played outside of YouTube.com. Set the parameter value to true to only retrieve syndicated videos.
  • Several API resources support new properties. The table below identifies the resources and their new properties:

    Ресурс Имя свойства Ценить Описание
    activity contentDetails.playlistItem.playlistItemId string The playlist item ID that YouTube assigned to uniquely identify the item in the playlist.
    activity contentDetails.channelItem object An object that contains information about a resource that was added to a channel. This property is only present if the snippet.type is channelItem .
    activity contentDetails.channelItem.resourceId object An object that identifies the resource that was added to the channel. Like other resourceId properties, it contains a kind property that specifies the resource type, such as video or playlist. It also contains exactly one of several properties – videoId , playlistId , etc. – that specifies the ID that uniquely identifies that resource.
    channel status object This object encapsulates information about the channel's privacy status.
    channel status.privacyStatus string The channel's privacy status. Valid values are private and public .
    playlist contentDetails object This object contains metadata about the playlist's content.
    playlist contentDetails.itemCount unsigned integer Количество видео в плейлисте.
    playlist player object This object contains information that you would use to play the playlist in an embedded player.
    playlist player.embedHtml string An <iframe> tag that embeds a video player that plays the playlist.
    video recordingDetails object This object encapsulates information that identifies or describes the place and time that the video was recorded.
    video recordingDetails.location object This object contains geolocation information associated with the video.
    video recordingDetails.location.latitude double Широта в градусах.
    video recordingDetails.location.longitude double Долгота в градусах.
    video recordingDetails.location.elevation double Altitude above the Earth, in meters.
    video recordingDetails.locationDescription string A text description of the location where the video was recorded.
    video recordingDetails.recordingDate datetime The date and time when the video was recorded. The value is specified in ISO 8601 ( YYYY-MM-DDThh:mm:ss.sZ ) format.
  • The documentation for several API methods now identifies properties that must be specified in the request body or that are updated based on values in the request body. The table below lists those methods as well as the required or modifiable properties.

    Note: Documentation for other methods may already list required and modifiable properties.

    Метод Характеристики
    activities.insert Обязательные свойства:
    • snippet.description
    Modifiable properties:
    • snippet.description
    • contentDetails.bulletin.resourceId
    playlists.update Обязательные свойства:
    • id
    playlistItems.update Обязательные свойства:
    • id
    videos.update Обязательные свойства:
    • id
  • The API no longer reports a playlistAlreadyExists error if you try to create or update a playlist that would have the same title as a playlist that already exists in the same channel.

  • Several API methods support new error types. The table below identifies the method and the newly supported errors:

    Метод Тип ошибки Детализация ошибки Описание
    guideCategories.list notFound notFound The guide category identified by the id parameter cannot be found. Use the guideCategories.list method to retrieve a list of valid values.
    playlistItems.delete forbidden playlistItemsNotAccessible The request is not properly authorized to delete the specified playlist item.
    videoCategories.list notFound videoCategoryNotFound The video category identified by the id parameter cannot be found. Use the videoCategories.list method to retrieve a list of valid values.
,

This page lists YouTube Data API (v3) changes and documentation updates. Subscribe to this changelog . Подписаться

13 марта 2024 г.

Note: This is a deprecation announcement.

This update contains the following changes:

The sync parameter for the captions.insert and captions.update methods has been deprecated. YouTube will stop supporting the parameter as of April 12, 2024.

As a result of this change, developers must include timing information when inserting or updating caption tracks or the upload will fail.

12 марта 2024 г.

This update contains the following changes:

Documentation for the captions resource has been updated to note that the maximum allowed length for the snippet.name field is 150 characters. The API returns a nameTooLong error if the track name is longer than that.

7 марта 2024 г.

Note: This is a deprecation announcement.

The channel resource property brandingSettings.channel.moderateComments has been deprecated. YouTube will stop supporting the parameter as of March 7, 2024.

31 января 2024 г.

This update contains the following changes:

The channels.list method's new forHandle parameter enables you to retrieve information about a channel by specifying its YouTube handle.

09 ноября 2023 г.

All references to the videoId resource under Comments have been removed as the videoId resource is not being returned using an API call.

12 сентября 2023 г.

Note: This is a deprecation announcement.

The comments.markAsSpam method has been deprecated for several years. This method is already unsupported on YouTube and is no longer supported through the API.

A deprecation notice has been added to all of the documents referencing the comments.markAsSpam method.

22 августа 2023 г.

The search.list method now supports the videoPaidProductPlacement parameter. This parameter enables you to filter search results to include only videos that the creator has denoted as having a paid promotion.

18 августа 2023 г.

The definition of the video resource's liveStreamingDetails.concurrentViewers has been updated to note that the concurrent viewer counts that the YouTube Data API returns might differ from the processed, despammed concurrent viewer counts available through YouTube Analytics. The YouTube Help Center provides more information about live streaming metrics.

7 августа 2023 г.

As announced on June 12, 2023 , the search.list method's relatedToVideoId parameter has been deprecated. That parameter is no longer supported, and references to the parameter have been removed from the API documentation.

28 июня 2023 г.

The thumbnails.set method now supports the uploadRateLimitExceeded error, which indicates that the channel has uploaded too many thumbnails during the past 24 hours and should try again later.

12 июня 2023 г.

Note: This is a deprecation announcement.

The search.list method's relatedToVideoId parameter has been deprecated. YouTube will stop supporting the parameter as of August 7, 2023.

At this time, a deprecation notice has been added to the search.list method's documentation. This parameter will be fully removed from the search.list documentation on or after August 7, 2023.

In addition, an example demonstrating how to retrieve related videos has been removed from the API implementation guide .

22 августа 2022 г.

Corrected type annotations for video.statistics fields to string from unsigned long.

5 августа 2022 г.

YouTube has changed the way that caption IDs are generated and, as part of that change, is assigning new caption IDs to all caption tracks. This change might be a backward-incompatible change for applications that store caption_id values, though it will not affect applications that do not store caption_id values.

Between now and December 1, 2022, the captions.list , captions.update , captions.download , and and captions.delete methods will support both the old and new caption track IDs. However, on or after December 1, 2022, YouTube will stop supporting the old caption track IDs. At that time, calling any of those API methods with an old caption track ID will result in a captionNotFound error.

To prepare for this change, you should plan to fully replace all stored caption track data between now and December 1, 2022. This means that for any video for which you store caption track data, you should delete the currently stored data, then call the captions.list method to retrieve the current set of caption tracks for the video and store the data in the API response as you would normally.

12 июля 2022 г.

The YouTube API Services Terms of Service has been updated. Please see the YouTube API Services Terms of Service - Revision History for more information.

27 апреля 2022 г.

The videos.insert method description has been updated to note that the maximum file size for uploaded videos has increased from 128GB to 256GB.

8 апреля 2022 г.

The subscriptions.list method's myRecentSubscribers and mySubscribers parameter definitions have both been updated to note that the maximum number of subscribers returned by the API might be limited. This change represents a documentation correction and not a change in API behavior.

15 декабря 2021 г.

As announced on November 18, 2021 , in conjunction with changes to make video dislike counts private across the entire YouTube platform , the video resource's statistics.dislikeCount property is now private.

You can learn more about this change on YouTube's official blog .

18 ноября 2021 г.

In conjunction with changes to make video dislike counts private across the entire YouTube platform , the video resource's statistics.dislikeCount property will be made private as of December 13, 2021. This means that the property will only be included in an API response from the videos.list endpoint if the API request was authenticated by the video owner.

The videos.rate endpoint is not affected by this change.

Developers who do not display dislike counts publicly and still need the dislike count for their API client can apply to be put on an allow list for an exemption. To apply for an exemption, you must complete this application form .

You can learn more about this change on YouTube's official blog .

2 июля 2021 г.

Note: This is a deprecation announcement.

The commentThreads.update endpoint has been deprecated and is no longer supported. This endpoint duplicated functionality available through other API endpoints. Instead, you can call the comments.update

method and, if your code requires a commentThreads resource, make a secondary call to the commentThreads.list method.

1 июля 2021 г.

All developers using YouTube's API Services must complete an API Compliance Audit in order to be granted more than the default quota allocation of 10,000 units. To date, both the compliance audit process and requests for additional quota unit allocations have been conducted by developers filling out and submitting the YouTube API Services - Audit and Quota Extension Form .

To clarify these processes and better meet the needs of developers using our API Services, we are adding three new forms and a guide to completing those forms:

  • Audited Developer Requests Form : Developers who have already passed an API Compliance Audit can fill out and submit this shorter form to request an allocated quota extension.
  • Appeals Form : Developers whose API projects have failed a compliance audit (or been denied a quota unit increase) can fill out and submit this form.
  • Change of Control Form : Developers, or any party operating an API client on a developer's behalf, who experience a change of control (for example, through a stock purchase or sale, merger or other form of corporate transaction) associated with an API project must fill out and submit this form. This enables YouTube's API team to update our records, audit the new API project's use case compliance, and validate the developer's current quota allocation.

Each new form will inform us of your intended usage of YouTube's API and enable us to better assist you.

More details are available in our new API Compliance Audits guide .

12 мая 2021 г.

Note: This is a deprecation announcement.

This update covers the following API changes:

  • The channel resource's contentDetails.relatedPlaylists.favorites property has been deprecated. Favorite videos functionality has already been deprecated for several years as noted in the April 28, 2016 , revision history entry.

    Prior to this update, the API would still create a new playlist if an API client attempted to add a video to a nonexistent favorites playlist. Going forward, the playlist will not be created in this case and the API will return an error. Attempts to modify favorites playlists by adding, modifying, or deleting items are also all deprecated per prior announcements and might start returning errors at any time.

  • The following channel resource properties have been deprecated. These properties are already unsupported in the YouTube Studio UI and on YouTube. As a result, they are also no longer supported via the API.

    • brandingSettings.channel.defaultTab
    • brandingSettings.channel.featuredChannelsTitle
    • brandingSettings.channel.featuredChannelsUrls[]
    • brandingSettings.channel.profileColor
    • brandingSettings.channel.showBrowseView
    • brandingSettings.channel.showRelatedChannels

    All of the properties have been removed from the channel resource representation , and their definitions have been removed from the resource's property list . In addition, errors associated with these properties have been removed from the method-specific documentation.

  • The following channelSection resource properties have been deprecated. These properties are already unsupported in the YouTube Studio UI and on YouTube. As a result, they are also no longer supported via the API.

    • snippet.style
    • snippet.defaultLanguage
    • snippet.localized.title
    • localizations
    • localizations.(key)
    • localizations.(key).title
    • targeting
    • targeting.languages[]
    • targeting.regions[]
    • targeting.countries[]

    In conjunction with this change, the channelSection.list method's hl parameter has also been deprecated since the features it supports are not supported.

    All of the properties have been removed from the channelSection resource representation , and their definitions have been removed from the resource's property list . In addition, errors associated with these properties have been removed from the method-specific documentation.

  • For the channelSection resource's snippet.type property, the following values have been deprecated. These values are already unsupported on YouTube channel pages and, as a result, they are also no longer supported via the API.

    • likedPlaylists
    • likes
    • postedPlaylists
    • postedVideos
    • recentActivity
    • recentPosts
  • The playlist resource's snippet.tags[] property has been deprecated. This property is already unsupported on YouTube and, as a result, it is no longer supported via the API.

9 февраля 2021 г.

The playlistItem resource supports two new properties:

28 января 2021 г.

This update contains the following changes:

  • The playlistItems.delete , playlistItems.insert , playlistItems.list , playlistItems.update , playlists.delete , playlists.list , and playlists.update methods all support a new playlistOperationUnsupported error. The error occurs when a request attempts to perform an operation that is not allowed for a particular playlist. For example, a user cannot delete a video from their uploaded videos playlist or delete the playlist itself.

    In all cases, this error returns a 400 HTTP response code (Bad Request).

  • The playlistItems.list method's watchHistoryNotAccessible and watchLaterNotAccessible errors have been removed from the documentation. While users' watch history and watch later lists are, indeed, not accessible via the API, these particular errors are not returned by the API.

15 октября 2020 г.

Two new sections have been added to the Developer Policies :

  • The new Section III.E.4.i provides additional information about the data collected and sent via the YouTube embedded player. You are responsible for any user data you send to us via any YouTube embedded player before the user has interacted with the player to indicate playback intent. You can limit the data shared with YouTube before a user interacts with the player by setting Autoplay to false.
  • The new Section III.E.4.j relates to checking the Made for Kids (MFK) status of content before embedding it on your sites and apps. You are responsible for knowing when videos that you embed on your API Client are made for kids and treating data collected from the embedded player accordingly. As such, you must check the status of content using YouTube Data API Service before embedding it on your API Client via any YouTube embedded players.

The new Finding the MadeForKids status of a video guide explains how to look up the MFK status of a video using the YouTube Data API Service .

In conjunction with these changes, a reminder has been added to the Embedded Player Parameter documentation to explain that if you enable Autoplay, playback will occur without any user interaction with the player; playback data collection and sharing will therefore occur upon page load.

8 октября 2020 г.

This update covers three small changes related to the channel resource:

  • The snippet.thumbnails object, which identifies a channel's thumbnail images, might be empty for newly created channels and might take up to one day to populate.
  • The statistics.videoCount property reflects the count of the channel's public videos only, even to owners. This behavior is consistent with counts shown on the YouTube website.
  • Channel keywords, which are identified in the brandingSettings.channel.keywords property, might be truncated if they exceed the maximum allowed length of 500 characters or if they contained unescaped quotation marks ( " ). Note that the 500 character limit is not a per-keyword limit but rather a limit on the total length of all keywords. This behavior is consistent with that on the YouTube website.

9 сентября 2020 г.

Note: This is a deprecation announcement.

This update covers the following API changes. All changes will go into effect on or after 9 September 2020, the date of this announcement. With that in mind, developers should no longer rely on any of the API features listed below.

  • The following API resources, methods, parameters, and resource properties are deprecated immediately and will stop working on or after the date of this announcement:
    • The following channel resource properties:
      • The statistics.commentCount property
      • The brandingSettings.image object and all of its child properties
      • The brandingSettings.hints list and all of its child properties
    • The channels.list method's categoryId filter parameter
    • The guideCategories resource and the guideCategories.list method
  • API responses for the channels.list method no longer contain the prevPageToken property if the API request sets the managedByMe parameter to true . This change does not affect the prevPageToken property for other channels.list requests, and it does not affect the nextPageToken property for any requests.
  • The channel resource's contentDetails.relatedPlaylists.watchLater and contentDetails.relatedPlaylists.watchHistory properties were both announced as deprecated on 11 August 2016 . The playlistItems.insert method's and playlistItems.delete method's support for these playlists are also now fully deprecated, and the two properties have been removed from the documentation.
  • The channels.list method's mySubscribers parameter, which was announced as deprecated on 30 July 2013 , has been removed from the documentation. Use the subscriptions.list method and its mySubscribers parameter to retrieve a list of subscribers to the authenticated user's channel.
  • The channel resource's invideoPromotion object and all of its child properties, which were announced as deprecated on 27 November 2017 , have been removed from the documentation.

29 июля 2020 г.

We have simplified our process for charging quota for API requests by removing the additional cost associated with the part parameter. Effective immediately, we will only charge the base cost for the method that is called. You can find more information about the simplified quota here .

The effect of this change is that most API calls will have a marginally lower quota cost, while some API calls will still have the same cost. This change does not increase the cost of any API calls. Overall, the likely impact is that your allocated quota, which can be seen in the Google Cloud Console , will go a little further.

We strongly recommend that all developers complete a compliance audit for their projects to ensure continued access to the YouTube API Services.

This revision history entry was originally published on July 20, 2020.

28 июля 2020 г.

All videos uploaded via the videos.insert endpoint from unverified API projects created after 28 July 2020 will be restricted to private viewing mode. To lift this restriction, each project must undergo an audit to verify compliance with the Terms of Service .

Creators who use an unverified API client to upload video will receive an email explaining that their video is locked as private, and that they can avoid the restriction by using an official or audited client.

API projects created prior to 28 July 2020 are not currently affected by this change. However, we strongly recommend that all developers complete a compliance audit for their projects to ensure continued access to the YouTube API Services.

21 июля 2020 г.

[Updated July 28, 2020.] The documentation update referenced in this revision history entry was republished on July 28, 2020.

Yesterday, we published a documentation update related to our process for charging quota. However, due to unforeseen circumstances, the quota change is not yet in effect. As a result, the documentation has been reverted in the interest of accuracy. To avoid confusion, the revision history entry explaining the change has been removed and will be republished in the near future.

7 июля 2020 г.

Note: This is a deprecation announcement.

The videos.insert method's autoLevels and stabilize parameters are now deprecated, and both parameters have been removed from the documentation. Their values are ignored and do not affect the way newly uploaded videos are processed.

15 июня 2020 г.

The new Complying with the YouTube Developer Policies guide provides guidance and examples to help you ensure that your API clients adhere to specific portions of the YouTube API Services Terms and Policies (API TOS).

Это руководство дает представление о том, как YouTube обеспечивает соблюдение определенных аспектов Условий использования API, но не заменяет какие-либо существующие документы. The guide addresses some of the most common questions that developers ask during API compliance audits. We hope that it simplifies your feature development process by helping you understand how we interpret and enforce our policies.

4 июня 2020 г.

Note: This is an update to a prior deprecation announcement.

The channel bulletin feature has now been fully deprecated. This change was initially announced on 17 April 2020 and has now taken effect. As a result, the activities.insert method is no longer supported, and the activities.list method no longer returns channel bulletins. For more details, please see the YouTube Help Center .

17 апреля 2020 г.

Note: This is a deprecation announcement.

YouTube is deprecating the channel bulletin feature. As a result, the activities.insert method will be deprecated, and the activities.list method will stop returning channel bulletins. These changes will be effective in the API on or after May 18, 2020. For more details, please see the YouTube Help Center .

31 марта 2020 г.

This update contains the following changes:

  • New resources and methods

    • The new member resource represents a channel member for a YouTube channel. A member provides recurring monetary support to a creator and receives special benefits. For example, members are able to chat when the creator turns on members-only mode for a chat.

      This resource replaces the sponsor resource, which is documented as part of the YouTube Live Streaming API. The sponsor resource is now deprecated and API clients should update calls to the sponsors.list method to use the members.list method instead.

    • The new membershipsLevel resource identifies a pricing level managed by the creator that authorized the API request. The membershipsLevels.list method retrieves a list of all of the creator's membership levels.

10 января 2020 г.

The API now supports the ability to identify child-directed content, which YouTube calls "made for kids." Learn more about "made for kids" content in the YouTube Help Center.

The channel and video resources support two new properties to enable content creators and viewers to identify content that is made for kids:

  • The selfDeclaredMadeForKids property enables content creators to specify whether a channel or video is made for kids.

    For channels, this property can be set when calling the channels.update method. For videos, this property can be set when calling either the videos.insert or videos.update methods.

    Note that this property is only included in API responses that contain channel or video resources if the channel owner authorized the API request.
  • The madeForKids property enables any user to retrieve the "made for kids" status of a channel or video . For example, the status might be determined based on the value of the selfDeclaredMadeForKids property. See the YouTube Help Center for more information about setting the audience for your channel, videos, or broadcasts.

We have also updated the YouTube API Services Terms of Service and Developer Policies. Please see the YouTube API Services Terms of Service - Revision History for more information. The changes to the YouTube API Services Terms of Service and Developer Policies will take effect on January 10, 2020 Pacific Time.

10 сентября 2019 г.

The API reference documentation has been updated to reflect a change to the way that subscriber counts are reported on YouTube and, consequently, in API responses. As a result of the change, subscriber counts returned by the YouTube Data API Service are rounded down to three significant figures for subscriber counts greater than 1000 subscribers. This change affects the channel resource's statistics.subscriberCount property.

Note: This change affects this property value even in cases where a user sends an authorized request for data about their own channel. Channel owners can still see exact subscriber counts in YouTube Studio.

For example, if a channel has 123,456 subscribers, the statistics.subscriberCount property will contain the value 123000 . The table below shows examples of how subscriber counts are rounded in API responses and abbreviated in other publicly visible YouTube user interfaces:

Example subscriber count API данных YouTube Publicly visible YouTube UIs
1234 12:30 1,23 тыс.
12 345 12300 12,3 тыс.
123 456 123000 123 тыс.
1 234 567 1230000 1,23 млн.
12,345,678 12300000 12,3 млн.
123 456 789 123000000 123М

4 апреля 2019 г.

This update contains the following changes:

  • The API reference documentation has been updated to better explain common use cases for each method and to provide dynamic, high-quality code samples through the APIs Explorer widget. See the channels.list method's documentation for an example. There are now two new elements on pages that describe API methods:

    • The APIs Explorer widget lets you select authorization scopes, enter sample parameter and property values, and then send actual API requests and see actual API responses. The widget also offers a fullscreen view that shows complete code samples, which dynamically update to use the scopes and values that you have entered.

    • The Common use cases section describes one or more common use cases for the method explained on the page. For example, you could call the channels.list method to retrieve data about a specific channel or to retrieve data about the current user's channel.

      You can use links in that section to populate the APIs Explorer with sample values for your use case or to open the fullscreen APIs Explorer with those values already populated. These changes aim to make it easier for you to see code samples that are directly applicable to the use case that you're trying to implement in your own application.

    Code samples are currently supported for Java, JavaScript, PHP, Python, and curl.

  • The code samples tool has also been updated with a new UI that offers all of the same features described above. Using that tool, you can explore use cases for different methods, load values into the APIs Explorer, and open the fullscreen APIs Explorer to get code samples in Java, JavaScript, PHP, and Python.

    In conjunction with this change, the pages that previously listed available code samples for Java, JavaScript, PHP, and Python have been removed.

  • The quickstart guides for Java , JavaScript , PHP , and Python have been updated. The revised guides explain how to run one sample with an API key and another sample with an OAuth 2.0 client ID using code samples from the APIs Explorer.

Note that the changes described above replace an interactive tool that had been added to the API documentation in 2017.

9 июля 2018 г.

This update contains the following changes:

  • The definition of the channel resource's snippet.thumbnails property has been updated to note that when displaying thumbnails in your application, your code should use the image URLs exactly as they are returned in API responses. For example, your application should not use the http domain instead of the https domain in a URL returned in an API response.

    Beginning in July 2018, channel thumbnail URLs will only be available in the https domain, which is how the URLs appear in API responses. After that time, you might see broken images in your application if it tries to load YouTube images from the http domain.

  • Note: This is a deprecation announcement.

    The video resource's recordingDetails.location.altitude property has been deprecated. There is no guarantee that videos will return values for this property. Similarly, even if API requests attempt to set a value for that property, it is possible that the incoming data will not be stored.

22 июня 2018 г.

The Implementation guide , formerly known as the Implementation and Migration guide, has been updated to remove instructions for migrating from the v2 API to the v3 API. In addition, instructions have also been removed for features that have since been deprecated in the v3 API, such as favorite videos.

27 ноября 2017 г.

This update contains the following changes:

  • Note: This is a deprecation announcement.

    YouTube is removing support for the Featured Video and Featured Website features, which are supported in the API via the channel resource's invideoPromotion object. As a result, that object, including all of its child properties are being deprecated.

    You can still retrieve and set invideoPromotion data until December 14, 2017. After that date:

    • Attempts to retrieve the invideoPromotion part when calling channels.list will return an empty invideoPromotion or will not return any invideoPromotion data at all.
    • Attempts to update invideoPromotion data when calling channels.update will return a successful response until at least May 27, 2018, but they will be treated as no-ops, meaning that they will not actually perform an update.

    After May 27, 2018, it is possible that these requests could return error messages to indicate, for example, that invalidPromotion is an invalid part.

16 ноября 2017 г.

This update contains the following changes:

  • The interactive code snippet tool now supports Node.js code samples. The samples are also visible in the documentation for almost all API methods, such as the channels.list method.

    The customizable samples are designed to give you a use-case-specific starting point for a Node.js application. The functionality is similar to the code in the Node.js quickstart guide . However, the samples do contain some utility functions that don't appear in the quickstart:

    • The removeEmptyParameters function takes a list of key-value pairs corresponding to API request parameters and removes the parameters that don't have values.
    • The createResource function takes a list of key-value pairs corresponding to properties in an API resource. It then converts the properties into a JSON object that can be used in insert and update operations. The example below shows a set of property names and values and the JSON object that the code would create for them:
      # Key-value pairs:
      {'id': 'ABC123',
       'snippet.title': 'Resource title',
       'snippet.description': 'Resource description',
       'status.privacyStatus': 'private'}
      
      # JSON object:
      {
       'id': 'ABC123',
       'snippet': {
         'title': 'Resource title',
         'description': 'Resource description',
       },
       'status': {
         'privacyStatus': 'private'
       }
      }

    All of these samples are designed to be downloaded and run locally. For more information, see the prerequisites for running full code samples locally in the code snippet tool instructions.

25 октября 2017 г.

This update contains the following changes:

  • The Python code samples in the interactive code snippet tool have been updated to use the google-auth and google-auth-oauthlib libraries instead of the oauth2client library, which is now deprecated.

    In addition to that change, the tool now provides full code samples for installed Python applications and Python web server applications, which use slightly different authorization flows. To see the full samples (and this change):

    1. Go to the interactive code snippet tool or to the documentation for any API method, such as the channels.list method.
    2. Click the Python tab above the code samples.
    3. Click the toggle above the tabs to switch from seeing a snippet to a full sample.
    4. The tab should now show a complete code sample that uses the InstalledAppFlow authorization flow. The description above the sample explains this and also links to a sample for a web server application.
    5. Click the link to switch to the web server example. That sample uses the Flask web application framework and a different authorization flow.

    All of these samples are designed to be downloaded and run locally. If you'd like to run the samples, see the instructions for running full code samples locally in the code snippet tool instructions.

29 августа 2017 г.

This update contains the following changes:

  • The definition of the search.list method's forContentOwner parameter has been updated to note that if that parameter is set to true , the type parameter must be set to video .
  • The definition of the search.list method's regionCode parameter has been updated to clarify that the parameter restricts search results to videos that can be viewed in the specified region.
  • YouTube has updated its branding logos and icons. New "developed with YouTube" logos can be downloaded from the branding guidelines page. Other new YouTube logos and icons are also shown on that page and can be downloaded from the YouTube brand site .

24 июля 2017 г.

This update contains the following changes:

  • A new YouTube Data API quickstart guide is available for iOS . The guide explains how to use the YouTube Data API in a simple iOS application written in either Objective-C or Swift.
  • The interactive code snippet tool for the YouTube Data API now includes documentation explaining some of the tool's features:
    • Executing API requests
    • Toggling between code snippets and full code samples
    • Using boilerplate functions
    • Loading existing resources (for update methods)

    Note: The tool is also embedded in API reference documentation for API methods ( example ).

1 июня 2017 г.

This update contains the following changes:

17 мая 2017 г.

This update contains the following changes:

  • The API reference documentation has been updated to make code snippets more ubiquitous and interactive. Pages that explain API methods, like channels.list or videos.rate , now feature an interactive tool that lets you view and customize code snippets in Java, JavaScript, PHP, Python, Ruby, Apps Script, and Go.

    For any given method, the tool shows code snippets for one or more use cases, and each use case describes a common way of calling that method. For example, you can call the channels.list method to retrieve data about a specific channel or about the current user's channel.

    You can also interact with code samples:

    • Modify parameter and property values, and the code snippets dynamically update to reflect the values you provide.

    • Toggle between code snippets and full samples. A code snippet shows the portion of the code that calls the API method. A full sample contains that snippet as well as boilerplate code for authorizing and sending requests. Full samples can be copied and run from the command line or a local web server.

    • Execute requests by clicking a button. (To execute requests, you need to authorize the tool to call the API on your behalf.)

    Note that this tool has replaced the APIs Explorer on the pages where it is available. (Each page displays a link so that you also have the option of loading the request you are working on in the APIs Explorer.)

  • The Data API Code Snippets tool has also been updated with a new UI that offers all of the same features described above. The major new features available on this page are:

    • Support for API requests that write data.
    • Support for Java samples.
    • More flexible and comprehensive boilerplate code for authorizing users and building API requests.

27 апреля 2017 г.

This update contains the following changes:

30 марта 2017 г.

This update contains the following changes:

  • The channel resource's new topicDetails.topicCategories[] property contains a list of Wikipedia URLs that describe the channel's content. The URLs correspond to the topic IDs returned in the resource's topicDetails.topicIds[] property.
  • The playlistItem resource's new contentDetails.videoPublishedAt property identifies the time that the video was published to YouTube. The resource already contains the snippet.publishedAt property, which identifies the time that the item was added to the playlist.
  • Like the channel resource, the video resource now returns the topicDetails.topicCategories[] property, which contains a list of Wikipedia URLs that describe the video's content. For video resources, the URLs correspond to the topic IDs returned in the resource's topicDetails.relevantTopicIds[] property.
  • The video resource's new contentDetails.contentRating.mpaatRating property identifies the rating that the Motion Picture Association of America gave to a movie trailer or preview.

27 февраля 2017 г.

As originally announced on August 11, 2016 , YouTube has switched the supported list of topic IDs to a curated list. The complete list of supported topic IDs is included in the topicDetails properties for channel and video resources as well as in the search.list method's topicId parameter.

Note that there are several changes to the curated list:

  • The following topics have been added as subtopics of Society :
    Имя topic ID
    Бизнес /m/09s1f
    Здоровье /m/0kt51
    Военный /m/01h6rj
    Политика /m/05qt0
    Религия /m/06bvp
  • The Animated cartoon topic, previously a child of Entertainment , has been removed.
  • The Children's music topic, previously a child of Music , has been removed.

As a result of this change, topics related to a video are now always returned in the video resource's topicDetails.relevantTopicIds[] property value.

29 ноября 2016 г.

This update contains the following changes:

  • There are three small changes to the list of topic IDs that will be supported as of February 10, 2017:

    • The Professional wrestling category, which was previously a child of the Sports category, is now a child of Entertainment .
    • The TV shows category, which is a child of Entertainment , is new.
    • The Health category, previously a child of Lifestyle , has been removed.

    Also note that there are a few parent categories ( Entertainment , Gaming , Lifestyle , Music , and Sports ). Any video that is associated with a child category, like Tennis , will also be associated with the parent category ( Sports ).

10 ноября 2016 г.

This update contains the following changes:

  • As first announced on August 11, 2016 , the deprecation of Freebase and the Freebase API requires several changes related to topic IDs. Topic IDs identify topics associated with channel and video resources, and you can also use the topicId search parameter to find channels or videos related to a particular topic.

    On February 10, 2017, YouTube will start returning a small set of topic IDs instead of the much more granular set of IDs returned thus far. In addition, note that channels and videos are not guaranteed to be associated with any topics, which is consistent with current API behavior.

    So that you can prepare your API Clients for those changes, the definitions of the following API parameters and properties have been updated to list the topic IDs that will be supported after that time. Note that the list of categories is the same for all of the properties.

  • Note: This is a deprecation announcement.

    The following properties are being deprecated:

    • The channel resource's topicDetails.topicIds[] property. This property will be supported until November 10, 2017.
    • The video resource's topicDetails.relevantTopicIds[] property. This property will be supported until November 10, 2017.
    • The video resource's topicDetails.topicIds[] property. This property will not contain values after February 10, 2017. (After that date, the topicDetails.relevantTopicIds[] property value will identify all of the topics associated with a video.)

  • Since Freebase has already been deprecated, the Searching with Freebase Topics guide has been removed from the documentation. That guide provided code samples to show how an application would work with the Freebase API.

    In addition, several code samples related to topic IDs have been removed from the search.list method's documentation.

2 ноября 2016 г.

This update contains the following changes:

  • New properties and parameters

    • The video resource contains several new properties:

      • The player.embedHtml property contains an <iframe> tag that you can use to embed a player that plays the video. The new player.embedHeight and player.embedWidth properties identify the dimensions of the embedded player. These properties are only returned if the API request specifies a value for at least one of the maxHeight or maxWidth parameters. Those two new parameters are explained later in this revision history entry.

      • The new hasCustomThumbnail property indicates whether the video uploader has provided a custom thumbnail image for the video. Note that this property is only visible to the video uploader.

      • The new fpbRatingReasons[] identifies reasons that the video received its FPB (South Africa) rating.

      • The new mcstRating identifies the rating that the video received in Vietnam.

    • The videos.list method supports two new parameters, maxHeight and maxWidth . You can use either parameter or both parameters when retrieving the player part in video resources.

      By default, the height of the <iframe> returned in the player.embedHtml property is 360px. The width adjusts to match the video's aspect ratio, thereby ensuring that the embedded player does not have black bars framing the video. So, for example, if a video's aspect ratio is 16:9, the player's width would be 640px.

      With the new parameters, you can specify that instead of the default dimensions, the embed code should use a height and/or width appropriate for your application layout. The API server scales the player dimensions as appropriate to ensure that the embedded player does not have black bars framing the video. Note that both parameters specify the maximum dimensions of the embedded player. Thus, if both parameters are specified, one dimension might still be smaller than the maximum amount allowed for that dimension.

      For example, suppose a video has a 16:9 aspect ratio. Thus, the player.embedHtml tag would contain a 640x360 player if the maxHeight or maxWidth parameter is not set.

      • If the maxHeight parameter is set to 720 , and the maxWidth parameter is not set, the API would return a 1280x720 player.
      • If the maxWidth parameter is set to 960 , and the maxHeight parameter is not set, the API would return a 960x540 player.
      • If the maxWidth parameter is set to 960 , and the maxHeight parameter is set to 450 , the API would return an 800x450 player.

      The new player.embedHeight and player.embedWidth properties, which are described above, identify the player's dimensions.

  • Updates to existing methods, properties and parameters

    • The channelSection resource description has been updated to note that a channel can create a maximum of 10 shelves without setting targeting data and can create a maximum of 100 shelves with targeting data.

      In addition, the channelSection resource's targeting property has been updated to reflect the fact that targeting options can only be set using the API. Targeting options are deleted if the channel section is modified using the user interface on the YouTube website.

    • The definition of the i18nLanguage resource's snippet.name property has been corrected to reflect that the value represents a language's name as it is written in the language specified by the i18nLanguage.list method's hl parameter.

    • The playlistItem resource's contentDetails.note property has been updated to note that the property value's maximum length is 280 characters.

    • The playlistItem resource's contentDetails.startAt and contentDetails.endAt properties have been deprecated. These fields are ignored if they are set in playlistItems.insert or playlistItems.update requests.

    • The playlistItems.delete and playlistItems.update methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods. Requests that use that method also need to be authorized with a token that provides access to the https://www.googleapis.com/auth/youtubepartner scope.

    • The search.list method's publishedBefore and publishedAfter parameters have both been updated to indicate that the parameter values are inclusive. So, for example, if the publishedBefore parameter is set, the API returns resources created before or at the specified time.

    • The video resource's contentDetails.contentRating.grfilmRating property supports three additional values: grfilmK12 , grfilmK15 , and grfilmK18 .

    • The videos.insert method description has been updated to note that the maximum file size for uploaded videos has increased from 64GB to 128GB.

  • New and updated errors

    • The API supports the following new errors:

      Тип ошибки Детализация ошибки Описание
      forbidden (403) homeParameterDeprecated The activities.list method returns this error to indicate that the user's home page activity data is not available through this API. This error might occur if you set the home parameter to true in an unauthorized request.
      invalidValue (400) invalidContentDetails The playlistItems.insert method returns this error to indicate that the contentDetails object in the request is invalid. One reason that this error occurs is that the contentDetails.note field is longer than 280 characters.
      forbidden (403) watchHistoryNotAccessible The playlistItems.list method returns this error to indicate that the request tried to retrieve "watch history" playlist items, but those cannot be retrieved using the API.
      forbidden (403) watchLaterNotAccessible The playlistItems.list method returns this error to indicate that the request tried to retrieve "watch later" playlist items, but those cannot be retrieved using the API.
      badRequest (400) uploadLimitExceeded The videos.insert method returns this error to indicate that the channel has exceeded the number of videos that it may upload.
      forbidden (403) forbiddenEmbedSetting The videos.update method returns this error to indicate that the API request attempts to set an invalid embed setting for the video. Note that some channels may not have permission to offer embedded players for live streams. See the YouTube Help Center for more information.
    • The playlistItems.insert method no longer returns an error if you insert a duplicate video into a playlist. That error previously occurred for some playlists, like favorite videos, that did not allow duplicates but are no longer supported. In general, playlists do allow duplicate videos.

  • Другие обновления

    • The revision history entry for September 15, 2016, has been updated to clarify that, whenever the channel resource's contentDetails.relatedPlaylists.watchHistory and contentDetails.relatedPlaylists.watchLater properties are included in a response, they always contain the values HL and WL , respectively. Moreover, those properties are only included if an authorized user is retrieving data about the user's own channel.

15 сентября 2016 г.

This update contains the following changes:

  • The August 11, 2016, revision history update discussed several changes related to topic IDs, including the fact that the set of supported topic IDs will change as of February 10, 2017. The list of topics that will be supported will be published by November 10 , 2016.

  • The following changes are now in effect. Notice of these changes was given in the revision history update on August 11, 2016:

    • If the activities.list method is called with the home parameter set to true , the API response now contains items similar to what a logged-out YouTube user would see on the home page.

      This is a slight change that is intended to provide a better user experience than the behavior described in the revision history update on August 11, 2016. That update had stated that requests using the home parameter would return an empty list.

    • The channel resource's contentDetails.relatedPlaylists.watchHistory and contentDetails.relatedPlaylists.watchLater properties now contain values of HL and WL , respectively, for all channels.

      To be clear, these properties are only visible to an authorized user retrieving data about the user's own channel. The properties always contain the values HL and WL , even for an authorized user retrieving data about the user's own channel. Thus, the watch history and watch later playlist IDs cannot be retrieved via the API.

      In addition, requests to retrieve playlist details ( playlists.list ) or playlist items ( playlistItems.list ) for a channel's watch history or watch later playlist now return empty lists. This behavior is true for the new values, HL and WL , as well as for any watch history or watch later playlist IDs that your API Client may have already stored.

  • The video resource's fileDetails.recordingLocation object and its child properties are no longer returned. Previously, this data (like the parent fileDetails object) could only be retrieved by a video's owner.

11 августа 2016 г.

This update contains the following changes:

  • The newly published YouTube API Services Terms of Service ("the Updated Terms"), discussed in detail on the YouTube Engineering and Developers Blog , provides a rich set of updates to the current Terms of Service. In addition to the Updated Terms , which will go into effect as of February 10, 2017, this update includes several supporting documents to help explain the policies that developers must follow.

    The full set of new documents is described in the revision history for the Updated Terms . In addition, future changes to the Updated Terms or to those supporting documents will also be explained in that revision history. You can subscribe to an RSS feed listing changes in that revision history from a link in that document.

  • The deprecation of Freebase and the Freebase API is causing several changes related to topic IDs. Topic IDs are used in the following API resources and methods:

    • The channel resource's topicDetails part identifies topics associated with the channel.
    • The video resource's topicDetails part identifies topics associated with the video.
    • The search.list method's topicId parameter lets you search for videos or channels related to a particular topic.

    The changes to these features are:

    • As of February 10, 2017, YouTube will start returning a small set of topic IDs instead of the much more granular set of IDs returned thus far. That set of supported topics will identify high-level categorizations like Sports or Basketball , but, for example, they will not identify specific teams or players. We will be announcing the set of supported topics so that you have time to prepare your application for this change.

    • Any Freebase topic IDs that you have already retrieved can be used to search for content until February 10, 2017. However, after that time, you will be able to use only the smaller set of topics identified in the previous item to retrieve search results by тема.

    • After February 10, 2017, if you try to search for results using a topic ID that is not in the smaller set of supported topic IDs, the API will return an empty result set.

  • Several API fields and parameters are being deprecated effective September 12, 2016:

    • The activities.list method's home parameter enabled an authorized user to retrieve the activity feed that would display on the YouTube home page for that user. Requests that use this parameter after September 12, 2016, will return an empty list.

    • The channel resource's contentDetails.relatedPlaylists.watchHistory and contentDetails.relatedPlaylists.watchLater properties are only visible to an authorized user retrieving data about the user's own channel. After September 12, 2016, the contentDetails.relatedPlaylists.watchHistory will return a value of HL and the contentDetails.relatedPlaylists.watchLater property will return a value of WL for all channels.

      Requests to retrieve playlist details ( playlists.list ) for a channel's watch history or watch later playlist will return an empty list after September 12, 2016. Requests to retrieve playlist items ( playlistItems.list ) in either of those playlists will also return an empty list after that time. This is true for the new values, HL and WL , as well as for any watch history or watch later playlist IDs that your API Client may have already stored.

    • The video resource's fileDetails.recordingLocation object or any of its child properties will no longer be returned after September 12, 2016. This data can only be retrieved by a video's owner since the parent fileDetails object can only be retrieved by a video owner.

13 июня 2016 г.

This update contains the following changes:

  • The channel resource's contentDetails.googlePlusUserId property has been deprecated. Previously, the property was only present if the channel was associated with a Google+ profile. Following the deprecation, the property will no longer be included in any channel resources.

  • The comment resource's snippet.authorGoogleplusProfileUrl property has been deprecated. Previously, the property was only present if the channel was associated with a Google+ profile. Following the deprecation, the property will no longer be included in any comment resources.

Since neither of these properties will be returned following the deprecation, both properties have been removed from the corresponding resource documentation.

31 мая 2016 г.

This update contains the following changes:

  • The subscriptions.list method's new myRecentSubscribers parameter retrieves a list of the subscribers of the authenticated user's channel in reverse chronological order of the time that they subscribed to the channel.

    Note that the new parameter only supports retrieval of the most recent 1000 subscribers to the authenticated user's channel. To retrieve a complete list of subscribers, use the mySubscribers parameter. That parameter, which does not return subscribers in a particular order, does not limit the number of subscribers that can be retrieved.

  • The definition of the snippet.thumbnails.(key) property has been updated for the activity , playlistItem , playlist , search result , thumbnail , and video resources to note that additional thumbnail image sizes are available for some videos.

    • The standard image is 640px wide and 480px tall.
    • The maxres image is 1280px wide and 720px tall.
  • The definition of the channelSection.list method's part parameter has been updated to note that the targeting part can be retrieved at a cost of 2 quota units.

  • The videos.list method now returns a forbidden ( 403 ) error when an improperly authorized request tries to retrieve the fileDetails , processingDetails , or suggestions parts of a video resource. Those parts are only available to the video's owner.

17 мая 2016 г.

The new Data API Code Snippets tool provides short code snippets for common YouTube Data API use cases. Code snippets are currently available for all read-only API methods in Apps Script, Go, JavaScript, PHP, Python, and Ruby.

For each method, the tool shows code samples for one or more use cases. For example, it provides five code snippets for the search.list method:

  • List videos by keyword
  • List videos by location
  • List live events
  • Search for the authenticated user's videos
  • List related videos

For each use case, the tool displays the parameters used in the API request. You can modify the parameter values, in which case the tool updates the code snippets to reflect the parameter values that you provided.

Finally, the tool displays the API response to each request. If you have modified the request parameters, the API response is based on your provided parameter values. Note that you need to authorize the tool to submit requests on your behalf for API responses to display.

28 апреля 2016 г.

This update contains the following changes:

  • The video resource's new contentDetails.projection property specifies the video's projection format. Valid property values are 360 and rectangular .

  • The video resource's recordingDetails.location and fileDetails.recordingLocation properties have both been updated to explain the difference between the two properties:

    • The recordingDetails.location property identifies the location that the video owner wants to associate with the video. This location is editable, searchable on public videos, and might be displayed to users for public videos.
    • The fileDetails.recordingLocation property value is immutable and represents the location associated with the original, uploaded video file. The value is only visible to the video owner.

  • The definition of the channel resource's contentDetails.relatedPlaylists.favorites property has been updated to note that the property value might contain a playlist ID that refers to an empty playlist and that cannot be fetched. This is due to the fact that favorite videos functionality has already been deprecated. Note that this property is not subject to the API deprecation policy .

  • The definition of the ineligibleAccount error, which can be returned by the comments.insert , comments.update , commentThreads.insert , or commentThreads.update method, has been updated to reflect that the error occurs when the YouTube account used to authorize the API request has not been merged with the user's Google account.

20 апреля 2016 г.

This update contains the following changes:

  • The definition of the channels.update method's part parameter has been updated to note that localizations is also a valid value for that parameter.

  • The Quota Usage section of the Getting Started guide has been updated to link to the Google Developer's Console, where you can see your actual quota and quota usage.

16 марта 2016 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The channelBanner resource documentation has been updated to note that the recommended size for the uploaded channel banner image is 2560px by 1440px. The minimum size (2048px by 1152px) has not changed.

    • The channel resource's new snippet.customUrl property identifies the custom URL associated with the channel. (Not all channels have custom URLs.) The YouTube Help Center explains eligibility requirements for getting a custom URL as well as how to set up the URL.

    • The channel resource's brandingSettings.watch object and all of its child properties have been deprecated.

    • The API response to a search.list request now contains a regionCode property. The property identifies the region code that was used for the search query. The region code instructs the API to return search results for the specified country.

      The property value is a two-letter ISO country code that identifies the region. The i18nRegions.list method returns a list of supported regions. The default value is US . If a non-supported region is specified, YouTube might still select another region, rather than the default value, to handle the query.

    • The definitions of the videoAbuseReportReason resource's snippet.label and snippet.secondaryReasons[].label properties have been updated to note that the properties contain localized label text for the abuse report reasons.

      In addition, the videoAbuseReportReasons.list method now supports the hl parameter, which specifies the language that should be used for label text in the API response. The default parameter value is en_US .

    • The video resource's new contentDetails.contentRating.ecbmctRating property identifies a video's rating from Turkey's Evaluation and Classification Board of the Ministry of Culture and Tourism.

      In addition, API properties for other rating systems support the following new property values:

      • contentDetails.contentRating.fpbRating (South Africa)
        Rating: 10; property value: fpb10
      • contentDetails.contentRating.moctwRating (Taiwan)
        Rating: R-12; property value: moctwR12
      • contentDetails.contentRating.moctwRating (Taiwan)
        Rating: R-15; property value: moctwR15
    • The video resource's liveStreamingDetails.activeLiveChatId property contains the ID of the active live chat associated with the video. The property value is only present if the video is a current live broadcast that has live chat enabled. After the broadcast ends and the live chat concludes, the property is no longer returned for the video.

    • The video resource's status.rejectionReason property supports the new property value legal .

  • The API supports the following new errors:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) notEditable The channelSections.insert , channelSections.update , and channelSections.delete methods return this error to indicate that the specified channel section cannot be created, updated, or deleted.
    badRequest (400) styleRequired The channelSections.insert and channelSections.update methods return this error to indicate that the channelSection resource submitted in the API request must specify a value for the snippet.style property.
    badRequest (400) typeRequired The channelSections.insert and channelSections.update methods return this error to indicate that the channelSection resource submitted in the API request must specify a value for the snippet.type property.
    badRequest (400) processingFailure The commentThreads.list method returns this error to indicate that the API server failed to successfully process the request. While this can be a transient error, it usually indicates that the request's input is invalid. Check the structure of the commentThread resource in the request body to ensure that it is valid.
    forbidden (403) commentsDisabled The commentThreads.list method returns this error to indicate that the video identified by the videoId parameter has disabled comments.
    badRequest (400) commentTextTooLong The commentThreads.insert method returns this error to indicate that the comment resource that is being inserted contains too many characters in the snippet.topLevelComment.snippet.textOriginal property.
    invalidValue (400) videoAlreadyInAnotherSeriesPlaylist The playlistItems.insert method returns this error to indicate that the video that you are trying to add to the playlist is already in another series playlist. See the YouTube Help Center for more information about series playlists.
    badRequest (400) subscriptionForbidden The subscriptions.insert method returns this error to indicate that you have reached your maximum number of subscriptions or that you have created too many recent subscriptions. In the latter case, you can retry the request after a few hours.
    badRequest (400) invalidCategoryId The videos.update method returns this error to indicate that the snippet.categoryId property in the uploaded video resource specified an invalid category ID. Use the videoCategories.list method to retrieve supported categories.
    badRequest (400) invalidDescription The videos.update method returns this error to indicate that the snippet.description property in the uploaded video resource specified an invalid value.
    badRequest (400) invalidPublishAt The videos.update method returns this error to indicate that the status.publishAt property in the uploaded video resource specified an invalid scheduled publishing time.
    badRequest (400) invalidRecordingDetails The videos.update method returns this error to indicate that the recordingDetails object in the uploaded video resource specified invalid recording details.
    badRequest (400) invalidTags The videos.update method returns this error to indicate that the snippet.tags property in the uploaded video resource specified an invalid value.
    badRequest (400) invalidTitle The videos.update method returns this error to indicate that the snippet.title property in the uploaded video resource specified an invalid or empty video title.
    badRequest (400) invalidVideoMetadata The videos.update method returns this error to indicate that the request metadata is invalid. This error occurs if the request updates the snippet part of a video resource but does not set a value for both the snippet.title and snippet.categoryId properties.

18 декабря 2015 г.

European Union (EU) laws require that certain disclosures must be given to and consents obtained from end users in the EU. Therefore, for end users in the European Union, you must comply with the EU User Consent Policy . We have added a notice of this requirement in our YouTube API Terms of Service .

19 ноября 2015 г.

The API now supports the ability to set and retrieve localized text for the snippet.title and snippet.description properties of the playlist and video resources, the snippet.title property of the channelSection resource, and the snippet.description property of the channel resource.

  • Setting localized titles and descriptions

    You can set localized values for a resource when calling the insert or update method for that resource. To set localized values for a resource, do both of the following:

    • Ensure that a value is set for the resource's snippet.defaultLanguage property. That property identifies the language of the resource's snippet.title and snippet.description properties. Its value can be any supported application language or most other ISO 639-1:2002 language codes. For example, if you upload a video that has an English title and description, you would set the snippet.defaultLanguage property to en .

      Note for updating channel resources: To set the snippet.defaultLanguage property for a channel resource, you actually need to update the brandingSettings.channel.defaultLanguage property.

    • Add the localizations object to the resource you are updating. Each object key is a string that identifies an application language or ISO 639-1:2002 language code, and each key maps to an object that contains the localized title (and description) for the resource.

      The sample snippet below sets the resource's default language to English. It also adds localized German and Spanish titles and descriptions to a video:

      {
        "kind": "youtube#video",
        ...
        "snippet": {
          "title": "Playing soccer",
          "description": "We play soccer in the park on Sundays.",
          "defaultLanguage": "en",
          ...
        },
        "localizations":
          "de": {
            "title": "Fußball spielen",
            "description": "Wir spielen Fußball im Park am Sonntag"
          },
          "es": {
            "title": "Jugar al fútbol",
            "description": "Nosotros jugamos fútbol en el parque los domingos",
          }
        }
      }
    • Important: Remember that when you update the localized data for a resource, your API request must include all of the existing localized versions of the data. For example, if you sent a subsequent request to add Portuguese data to the video in the example above, the request would need to include the localized data for German, Spanish, and Portuguese.

  • Retrieving localized values

    The API supports two ways to retrieve localized values for a resource:

    • Add the hl parameter to your channels.list , channelSections.list , playlists.list , or videos.list request to retrieve localized data for a specific application language that the YouTube website supports . If localized resource details are available in that language, the resource's snippet.localized object will contain the localized values. However, if localized details are not available, the snippet.localized object will contain resource details in the resource's default language .

      For example, suppose a videos.list request retrieved data for the video described above with localized German and Spanish data. If the hl parameter were set to de , the resource would contain the following data:

      {
        "kind": "youtube#video",
        ...
        "snippet": {
          "title": "Playing soccer",
          "description": "We play soccer in the park on Sundays.",
          "defaultLanguage": "en",
          "localized": {
            "title": "Fußball spielen",
            "description": "Wir spielen Fußball im Park am Sonntag"
          }
          ...
        }
      }

      However, if the hl parameter were set to fr , the snippet.localized object would contain the English title and description because English is the default language for the resource, and localized French details are not available.

      Important: The hl parameter only supports values that identify application languages that the YouTube website supports. To determine whether localized text is available for other languages, you need to retrieve the localizations part for the resource and filter to determine whether the localized text exists.

      For example, you would need to retrieve the full list of localizations to determine whether localized text is available in Appalachian English.

    • When retrieving a resource, include localizations in the part parameter value to retrieve all of the localized details for that resource. If you are retrieving localized data for a language that is not a current YouTube application language , you need to use this approach to retrieve all localizations and then filter to determine whether the desired localized data exists.

  • Errors related to localized text values

    The API also supports the following new errors for localized text values:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) defaultLanguageNotSetError This error indicates that a request that tries to insert or update the localizations object for a resource is failing because the snippet.defaultLanguage property is not set for that resource. The channels.update , channelSections.insert , channelSections.update , playlists.insert , playlists.update , videos.insert , and videos.update methods support this error.
    badRequest (400) localizationValidationError This error indicates that one of the values in a resource's localizations object failed to validate. For example, this error might occur if the object contains an invalid language code. The channels.update , channelSections.insert , channelSections.update , playlists.insert , and playlists.update methods support this error.

4 ноября 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The search.list method's order parameter has been updated to note that if you sort live broadcasts by viewCount , the API results are sorted by the broadcasts' number of concurrent viewers while the broadcasts are still ongoing.

    • The search.list method's relatedToVideoId parameter has been updated to note that if the parameter is set, the only other supported parameters are part , maxResults , pageToken , regionCode , relevanceLanguage , safeSearch , type (which must be set to video ), and fields . This update does not reflect a change in API behavior.

    • The definition of the video resource's snippet.publishedAt property has been updated to note that the property value, which specifies the date and time that the video was published, might be different than the time that the video was uploaded. For example, if a video is uploaded as a private video and then made public at a later time, the property value specifies the time that the video was made public. The updated definition also explains how the value is populated for private and unlisted videos.

      This change does not reflect a change in API behavior.

    • The definition of the video resource's status.publishAt property has been updated to note:

      • If you set this property's value when calling the videos.update method, you must also set the status.privacyStatus property value to private even if the video is already private.
      • If the request schedules a video to be published at some time in the past, it is published right away. As such, the effect of setting the status.publishAt property to a past date and time is the same as of changing the video's privacyStatus from private to public .
    • The video resource's contentDetails.contentRating.cncRating property specifies the video's rating from France's Commission de classification cinematographique. This property replaces the contentDetails.contentRating.fmocRating property, which is now deprecated.

    • The definition of the channel resource's brandingSettings.channel.keywords has been updated to correctly reflect that the property value contains a space-separated list of strings and not a comma-separated list, as previously documented. This update does not reflect a change in API behavior.

    • The documentation for the thumbnails.set method has been updated to accurately reflect that the body of the request contains the thumbnail image that you are uploading and associating with a video. The request body does not contain a thumbnail resource. Previously, the documentation said that you should not provide a request body when calling this method. This update does not reflect a change in API behavior.

    • The description of the activity resource has been updated to reflect the fact that the activities.list method does not currently include resources related to new video comments. The resource's snippet.type and contentDetails.comment have been updated as well.

  • New and updated errors

    • The API now supports the following errors:

      Подробности ошибки
      activities.insert
      Код ответа HTTP badRequest (400)
      Причина invalidMetadata
      Описание The kind property does not match the type of ID provided.
      commentThreads.update
      comments.insert
      comments.update
      Код ответа HTTP badRequest (400)
      Причина commentTextTooLong
      Описание The comment resource that is being inserted or updated contains too many characters in the snippet.topLevelComment.snippet.textOriginal property.
      playlistItems.insert
      playlistItems.update
      Код ответа HTTP forbidden (403)
      Причина playlistItemsNotAccessible
      Описание The request is not properly authorized to insert, update, or delete the specified playlist item.
      playlists.delete
      playlists.insert
      playlists.update
      Код ответа HTTP badRequest (400)
      Причина playlistForbidden
      Описание This operation is forbidden or the request is not properly authorized.
      search.list
      Код ответа HTTP badRequest (400)
      Причина invalidLocation
      Описание The location and/or locationRadius parameter value was formatted incorrectly.
      search.list
      Код ответа HTTP badRequest (400)
      Причина invalidRelevanceLanguage
      Описание The relevanceLanguage parameter value was formatted incorrectly.
      subscriptions.insert
      Код ответа HTTP badRequest (400)
      Причина subscriptionForbidden
      Описание This error occurs when any of the following are true:
      • The subscription that you are trying to create already exists
      • You have already reached your maximum number of subscriptions
      • You are trying to subscribe to your own channel, which is not supported.
      • You have created too many subscriptions recently and need to wait a few hours before retrying the request.
      videos.update
      Код ответа HTTP badRequest (400)
      Причина invalidDefaultBroadcastPrivacySetting
      Описание The request attempts to set an invalid privacy setting for the default broadcast.

28 августа 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The video resource's statistics.favoriteCount property has been deprecated.

      In accordance with our deprecation policy, this property will continue to be included in video resources for at least one year after this announcement. However, the property value is now always set to 0 .

7 августа 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The definition of the video resource's snippet.tags[] property has been updated to provide more information about how the API server calculates the length of the property's value. Note that this update does not reflect a change in the API's behavior.

      Specifically, the definition now explains that if a tag contains a space, the API server handles the tag value as though it were wrapped in quotation marks, and the quotation marks count toward the character limit. So, for the purposes of character limits, the tag Foo-Baz contains seven characters, but the tag Foo Baz contains nine characters.

    • The commentThreads.insert method no longer supports the shareOnGooglePlus parameter, which previously indicated whether a comment and replies to that comment should also be posted to the author's Google+ profile. If a request submits the parameter, the API server ignores the parameter but otherwise handles the request.

18 июня 2015 г.

This update contains the following changes:

  • Updates to existing resources and methods

    • The commentThreads.list method's new order parameter specifies the order in which the API response should list comment threads. Threads can be ordered by time or relevance. The default behavior is to order them by time.

    • The video resource's new snippet.defaultAudioLanguage property specifies the language spoken in the video's default audio track.

    • The definition of the video resource's contentDetails.licensedContent property has been updated to clarify that the content must have been originally uploaded to a channel linked to a YouTube content partner and then claimed by that partner. This does not represent a change in actual API behavior.

    • The captions.delete , captions.download , captions.insert , captions.list , and captions.update methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods. Requests that use that method also need to be authorized with a token that provides access to the https://www.googleapis.com/auth/youtubepartner scope.

  • New and updated errors

    • The API now supports the following errors:

      Подробности ошибки
      videos.rate
      Код ответа HTTP badRequest (400)
      Причина emailNotVerified
      Описание The user must verify her email address prior to rating the video.
      videos.rate
      Код ответа HTTP badRequest (400)
      Причина videoPurchaseRequired
      Описание Rental videos can only be rated by users who rented them.
    • The subscriptions.delete and subscriptions.insert methods no longer support the accountClosed and accountSuspended errors.

27 апреля 2015 г.

This update contains the following changes:

  • New resources and methods

    • The new videoAbuseReportReason resource contains information about a reason that a video would be flagged for containing abusive content. The videoAbuseReportReasons.list method lets you retrieve a list of all of the reasons why videos might be flagged.

    • The new videos.reportAbuse method provides a way to actually flag a video that contains abusive content. The body of the request contains a JSON object that specifies the video being flagged as well as the reason that the video is deemed to contain abusive content. Valid reasons can be obtained from the videoAbuseReportReason.list method described above.

      The migration guide has also been updated with an example for reporting an abusive video. With this change, the v3 API now supports all of the v2 API features that it is scheduled to support. These features are also all explained in the migration guide.

  • Updates to existing resources and methods

    • The search.list method's new forDeveloper filter parameter restricts a search to only retrieve videos uploaded via the developer's application or website. The forDeveloper parameter can be used in conjunction with optional search parameters like the q parameter.

      For this feature, each uploaded video is automatically tagged with the project number that is associated with the developer's application in the Google Developers Console .

      When a search request subsequently sets the forDeveloper parameter to true , the API server uses the request's authorization credentials to identify the developer. Therefore, a developer can restrict results to videos uploaded through the developer's own app or website but not to videos uploaded through other apps or sites.

      The new feature offers functionality that is similar, albeit not identical, to the developer tags functionality that the v2 API supported.

    • The channel resource's new snippet.country property lets channel owners associate their channels with a particular country.

      Note: To set the snippet.country property for a channel resource, you actually need to update the brandingSettings.channel.country property.

    • The API now supports targeting for channelSection resources. Channel section targeting provides a way to restrict visibility of a content section to users that match particular criteria.

      The API exposes three targeting options. A user must meet all of the targeting settings for a channel section to be visible.

    • The definition of the video resource's contentDetails.duration property has been corrected to reflect that the value can reflect hours, days, and so forth.

    • The documentation for the channelSections.delete , playlistItems.delete , playlists.delete , subscriptions.delete , and videos.delete method has been corrected to reflect that, when successful, those methods all return an HTTP 204 response code ( No Content ).

  • New and updated errors

    • The API now supports the following errors:

      Тип ошибки Детализация ошибки Описание
      badRequest (400) targetInvalidCountry The channelSections.insert and channelSections.update methods return this error if the inserted channelSection resource contained an invalid value for the targeting.countries[] property.
      badRequest (400) targetInvalidLanguage The channelSections.insert and channelSections.update methods return this error if the inserted channelSection resource contained an invalid value for the targeting.languages[] property.
      badRequest (400) targetInvalidRegion The channelSections.insert and channelSections.update methods return this error if the inserted channelSection resource contained an invalid value for the targeting.regions[] property.
      badRequest (400) operationNotSupported The comments.insert method returns this error if the API user is not able to insert a comment in reply to the top-level comment identified by the snippet.parentId property. In a commentThread resource, the snippet.canReply property indicates whether the current viewer can reply to the thread.
      badRequest (400) invalidChannelId The search.list method returns this error if the channelId parameter in the request specified an invalid channel ID.
      badRequest (400) subscriptionForbidden The subscriptions.insert method returns this error if the API user tries to subscribe to the user's own channel.
    • The captions.update method no longer supports the invalidMetadata and videoNotFound errors.

16 апреля 2015 г.

This update contains the following changes:

  • The migration guide has been updated to explain how to migrate applications still using comments functionality from the v2 API.

    The guide also calls out several commenting features that the v2 API did not support but that are supported in the v3 API . К ним относятся:

    • Retrieving comments about a channel
    • Retrieving all comment threads related to a channel, which means that the API response can contain comments about the channel or any of its videos.
    • Updating the text of a comment
    • Пометка комментария как спама
    • Setting a comment's moderation status

  • The Subscribing to push notifications guide has been updated to reflect the fact that notifications are only pushed to the Google PubSubHubBub hub and not also to the Superfeedr hub as previously indicated.

9 апреля 2015 г.

This update contains the following changes:

  • The API's new commentThread and comment resources let you retrieve, insert, update, delete, and moderate comments.

    • A commentThread resource contains information about a YouTube comment thread, which comprises a top-level comment and replies, if any exist, to that comment. A commentThread resource can represent comments about either a video or a channel.

      The top-level comment and the replies are actually comment resources that are nested inside the commentThread resource. It is important to note that the commentThread resource does not necessarily contain all replies to a comment, and you need to use the comments.list method if you want to retrieve all replies for a particular comment. In addition, some comments do not have replies.

      The API supports the following methods for commentThread resources:

      • commentThreads.list – Retrieve a list of comment threads. Use this method to retrieve comments associated with a particular video or channel.
      • commentThreads.insert – Create a new top-level comment. (Use the comments.insert method to reply to an existing comment.)
      • commentThreads.update – Modify a top-level comment.

    • A comment resource contains information about a single YouTube comment. A comment resource can represent a comment about either a video or a channel. Кроме того, комментарий может быть комментарием верхнего уровня или ответом на комментарий верхнего уровня.

      The API supports the following methods for comment resources:

      • comments.list – Retrieve a list of comment. Use this method to retrieve all of the replies to a particular comment.
      • comments.insert – Create a reply to an existing comment.
      • comments.update – Modify a comment.
      • comments.markAsSpam – Flag one or more comments as spam.
      • comments.setModerationStatus – Set the moderation status of one or more comments. For example, clear a comment for public display or reject a comment as unfit for display. The API request must be authorized by the owner of the channel or video associated with the comments..
      • comments.delete – Delete a comment.

    Note that the API's new https://www.googleapis.com/auth/youtube.force-ssl scope, described in the revision history for April 2, 2015 , is required for calls to the comments.insert , comments.update , comments.markAsSpam , comments.setModerationStatus , comments.delete , commentThreads.insert , and commentThreads.update methods.

  • The new Subscribing to push notifications guide explains the API's new support for push notifications via PubSubHubBub , a server-to-server publish/subscribe protocol for Web-accessible resources. Your PubSubHubBub callback server can receive Atom feed notifications when a channel does any of the following activities:

    • uploads a video
    • updates a video's title
    • updates a video's description

  • The migration guide has also been updated to note the new support for push notifications. However, since the v2 API supported numerous other types of push notifications that are not supported in the v3 API, the mention of PubSubHubBub support is still listed in the Deprecated section of that guide.

  • The API's new https://www.googleapis.com/auth/youtube.force-ssl scope is now a valid scope for any API method that previously supported the https://www.googleapis.com/auth/youtube scope.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) invalidRating The videos.rate method returns this error if the request contained an unexpected value for the rating parameter.
  • The subscriptions.insert method no longer supports the subscriptionLimitExceeded error, which previously indicated that the subscriber identified with the request had exceeded the subscription rate limit.

2 апреля 2015 г.

This update contains the following changes:

  • The new captions resource represents a YouTube caption track. Трек с субтитрами связан только с одним видео YouTube.

    The API supports methods to list , insert , update , download , and delete caption tracks.

  • The migration guide has also been updated to explain how to migrate applications still using captions functionality in the v2 API.

  • The API's new https://www.googleapis.com/auth/youtube.force-ssl scope requires communication with the API server to happen over an SSL connection.

    This new scope grants the same access as the https://www.googleapis.com/auth/youtube scope. And, in fact, those two scopes are functionally identical because the YouTube API server is only available via an HTTPS endpoint. As a result, even though the https://www.googleapis.com/auth/youtube scope does not require an SSL connection, there is actually no other way to make an API request.

    The new scope is required for calls to the all of the caption resource's methods.

11 марта 2015 г.

This update contains the following changes:

  • The YouTube Data API (v3) migration guide contains a new tab, named New in the v3 API , that lists features that the v3 API does support and that the v2 API did not support. The same features were previously and are still listed in other tabs in the guide. For example, the new feature explaining how to update a channel's in-video promotional campaign data is also listed under the Channels (profiles) tab.

  • The YouTube Data API (v3) migration guide has been updated to note that the v3 API will support the following v2 API feature:

  • The YouTube Data API (v3) migration guide has been updated to note that the following v2 API features will not be supported in the v3 API:

    • Retrieve video recommendations – The v3 API does not retrieve a list that only contains videos recommended for the current API user. However, you can use the v3 API to find recommended videos by calling the activities.list method and setting the home parameter value to true .

      In the API response, a resource corresponds to a recommended video if the snippet.type property's value is recommendation . In that case, the contentDetails.recommendation.reason and contentDetails.recommendation.seedResourceId properties will contain information about why the video was recommended. Note that there is no guarantee that the response will contain any particular number of recommended videos.

    • Retrieve channel suggestions

    • Retrieve new subscription videos – The v3 API does not retrieve a list that only contains videos that have recently been uploaded to channels that the API user subscribes to. However, you can use the v3 API to find new subscription videos by calling the activities.list method and setting the home parameter value to true .

      In the API response, a resource corresponds to a new subscription video if the snippet.type property's value is upload . Note that there is no guarantee that the response will contain any particular number of new subscription videos.

    • Поддержка RSS-каналов

    • Push notifications for feed updates – The v2 API supported push notifications, using either the Simple Update Protocol (SUP) or PubSubHubbub , to monitor user activity feeds for YouTube users. Notifications were provided for new channel subscriptions and when videos were rated, shared, marked as favorites, commented on, or uploaded.

      The v3 API will support push notifications using the PubSubHubbub protocol , but the notifications will only cover video uploads and updates to video titles or video descriptions.

    • Channel location – The v2 API used the <yt:location> tag to identify the user's location as entered in the channel's YouTube public profile. While some developers used this field to associate a channel with a particular country, the field's data could not consistently be used for that purpose.

    • Set or retrieve developer tags – The v2 API supported the ability to associate keywords, or developer tags, with a video at the time that the video was uploaded. Developer tags would not be displayed to YouTube users, but video owners could retrieve videos that matched a specific developer tag.

      The v3 API will provide a similar, but not identical, feature. Specifically, a developer will be able to search for videos uploaded by the developer's own application. For this feature, each uploaded video is automatically tagged with the project number that is associated with the developer's application in the Google Developers Console . The developer then uses the same project number to search for videos.

    • List videos by publication date, viewcount, or rating – In the v2 API, the orderby parameter let you sort videos in a playlist by position, duration, publication date, title, and several other values. In the v3 API, playlist items are typically sorted by position in ascending order and other sorting options are not available.

      Есть несколько исключений. A new upload, favorite video, liked video, or recently watched video is automatically added as the first item ( snippet.position = 0 ) for the following types of playlists. So, each of these lists is effectively sorted in order of newest to oldest item based on the times that items were added to the list.

      • пользовательские загрузки
      • любимые видео
      • liked videos
      • смотреть историю

      Note, however, that a new item added to the "Watch later" playlist is added as the last item in that list, so that list is effectively sorted from oldest to newest item.

    • Batch processing – The v3 API supports one of the batch processing use cases that the v2 API had supported. The v3 API's channels.list , channelSections.list , guideCategories.list , playlistItems.list , playlists.list , subscriptions.list , videoCategories.list , and videos.list methods all support an id parameter, which can be used to specify a comma-delimited list of IDs (video IDs, channel IDs, etc.). Using those methods, you can retrieve a list of multiple resources with a single request.

    With these changes, the guide now identifies all functionality that was supported in the old (v2) API that will be deprecated in the current API version (v3).

4 марта 2015 г.

This update contains the following changes:

  • The channelSections.delete and channelSections.update methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The following properties and their child properties have been deprecated:

    • brandingSettings.image.backgroundImageUrl
    • brandingSettings.image.largeBrandedBannerImageImapScript
    • brandingSettings.image.largeBrandedBannerImageUrl
    • brandingSettings.image.smallBrandedBannerImageImapScript
    • brandingSettings.image.smallBrandedBannerImageUrl

    Note: None of these properties had been subject to the API Deprecation Policy.

  • The video resource's new contentDetails.contentRating.contentDetails.contentRating.djctqRatingReasons property identifies the reasons that explain why the video received its DJCQT (Brazil) rating.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    notFound (404) channelNotFound The channels.update method returns this error if the request's id parameter specifies a channel that cannot be found.
    badRequest (400) manualSortRequiredinvalidValue The playlistItems.insert and playlistItems.update methods return this error if the request attempts to set the playlist item's position, but the playlist does not use manual sorting. For example, playlist items might be sorted by date or popularity. You can address this error by removing the snippet.position element from the resource sent in the request body. If you want the playlist item to have a specific position in the list, you need to first update the playlist's ordering setting to Manual . THis setting can be adjusted in the YouTube Video Manager .
    forbidden (403) channelClosed The playlists.list method returns this error if the request's channelId parameter specifies a channel that has been closed.
    forbidden (403) channelSuspended The playlists.list method returns this error if the request's channelId parameter specifies a channel that has been suspended.
    forbidden (403) playlistForbidden The playlists.list method returns this error if the request's id parameter does not support the request or the request is not properly authorized.
    notFound (404) channelNotFound The playlists.list method returns this error if the request's channelId parameter specifies a channel that cannot be found.
    notFound (404) playlistNotFound The playlists.list method returns this error if the request's id parameter specifies a playlist that cannot be found.
    notFound (404) videoNotFound The videos.list method returns this error if the request's id parameter specifies a video that cannot be found.
    badRequest (400) invalidRating The videos.rate method returns this error if the request contains an unexpected value for the rating parameter.

2 марта 2015 г.

This update contains the following changes:

  • The search.list method now supports the relevanceLanguage parameter, which lets you request results that are most relevant to a particular language.

    The YouTube Data API (v3) migration guide has also been updated to explain how to use this new parameter. The parameter addresses a feature gap that previously existed between the current API version (v3) and the previous version (v2), which has already been deprecated.

  • The YouTube Data API (v3) migration guide has also been updated to indicate the deprecation of the special feeds and metadata fields that the v2 API provided for describing movies, trailers, television shows, television seasons, and television episodes.

14 января 2015 г.

This update contains the following changes:

  • The YouTube Data API (v3) migration guide has been updated to explain how to use the v3 API to upload videos using JavaScript. (See the Upload a video section for details.) This functionality is comparable to the browser-based uploading functionality that the v2 API supports. Note that this change to the migration guide does not reflect an actual API change but rather the availability of new sample code for uploading videos with client-side JavaScript.

    Given the support for uploading videos with the JavaScript client library and CORS, the migration guide no longer lists browser-based uploading as a feature that may be deprecated in the v3 API.

  • The documentation for the videos.insert method has been updated to include the new JavaScript code sample described above. The list of JavaScript code samples for the YouTube Data API (v3) has also been updated.

11 ноября 2014 г.

This update contains the following changes:

  • The quota cost for a call to the search.list method has changed to 100 units.

    Important: In many cases, you can use other API methods to retrieve information at a lower quota cost. For example, consider these two ways of finding videos uploaded to the GoogleDevelopers channel.

    • Quota cost: 100 units

      Call the search.list method and search for GoogleDevelopers .

    • Quota cost: 6 units

      Call the channels.list method to find the right channel ID. Set the forUsername parameter to GoogleDevelopers and the part parameter to contentDetails . In the API response, the contentDetails.relatedPlaylists.uploads property specifies the playlist ID for the channel's uploaded videos.

      Then call the playlistItems.list method and set the playlistId parameter to the captured ID and the part parameter to snippet .

8 октября 2014 г.

This update contains the following changes:

  • The channel resource contains two new properties:

    • The status.longUploadsStatus property indicates whether the channel is eligible to upload videos that are more than 15 minutes long. This property is only returned if the channel owner authorized the API request. Valid property values are:

      • allowed – The channel can upload videos more than 15 minutes long.
      • eligible – The channel is eligible to upload videos more than 15 minutes long but must first enable the feature.
      • disallowed – The channel is not able or eligible to upload videos more than 15 minutes long.

      See the property definition for more information about these values. The YouTube Help Center also provides more detailed information about this feature.

    • The invideoPromotion.useSmartTiming property indicates whether the channel's promotional campaign uses "smart timing." This feature attempts to show promotions at a point in the video when they are more likely to be clicked and less likely to disrupt the viewing experience. This feature also picks up a single promotion to show on each video.

  • The definitions of the video resource's snippet.title and snippet.categoryId properties have both been updated to clarify the way that API handles calls to the videos.update method. If you call that method to update the snippet part of a video resource, you must set a value for both of those properties.

    If you try to update the snippet part of a video resource and do not set a value for both of those properties, the API returns an invalidRequest error. That error's description has also been updated.

  • The video resource's contentDetails.contentRating.oflcRating property, which identifies a video's rating from New Zealand's Office of Film and Literature Classification, now supports two new ratings: oflcRp13 and oflcRp16 . These correspond to the RP13 and RP16 ratings, respectively.

  • The channelBanners.insert method now supports the following error:

    Тип ошибки Детализация ошибки Описание
    badRequest bannerAlbumFull The channel owner's YouTube Channel Art album has too many images. The channel owner should go to http://photos.google.com , navigate to the albums page, and remove some from images from that album.

12 сентября 2014 г.

This update contains the following changes:

  • The quota cost for a call to the search.list method has changed from 1 unit to 2 units in addition to the cost of the specified resource parts .

13 августа 2014 г.

This update contains the following changes:

  • The subscriptions.insert method now supports the following error:

    Тип ошибки Детализация ошибки Описание
    badRequest subscriptionLimitExceeded The subscriber identified with the request has exceeded the subscription rate limit. More subscriptions can be attempted in a few hours.

12 августа 2014 г.

This update contains the following changes:

  • A new guide, titled Migrating Your Application to YouTube Data API (v3) , explains how to use the YouTube Data API (v3) to perform functionality available in the YouTube Data API (v2). The older API was officially deprecated as of March 4, 2014. The guide intends to help you migrate applications still using the v2 API to the most recent API version.

8 июля 2014 г.

This update contains the following changes:

  • The playlists.insert method now supports the following error:

    Тип ошибки Детализация ошибки Описание
    badRequest maxPlaylistExceeded This error occurs if a playlist cannot be created because the channel already has the maximum number of playlists allowed.

18 июня 2014 г.

This update contains the following changes:

28 мая 2014 г.

This update contains the following changes:

  • The search.list method now supports the location and locationRadius parameters, which let you search for videos associated with a geographic location. A request must specify a value for both parameters to retrieve results based on location, and the API will return an error if a request includes only one of the two parameters.

    • The location parameter specifies the latitude/longitude coordinates at the center of the circular geographic area.

    • The locationRadius parameter specifies the maximum distance that the location associated with a video can be from the center of the area for the video to still be included in search results.

13 мая 2014 г.

This update contains the following changes:

  • The channel resource's invideoPromotion.items[] property has been updated to note that you can typically only set one promoted item for your channel. If you try to insert too many promoted items, the API will return a tooManyPromotedItems error, which has an HTTP 400 status code.

  • The channelSection resource now can contain information about a few new types of featured content. The channelSection resource's snippet.type property now supports the following values:

    • postedPlaylists - playlists that the channel's owner posted to the channel's activity feed
    • postedVideos - videos that the channel's owner posted to the channel's activity feed
    • subscriptions - channels that the channel owner has subscribed to

  • The video resource's new contentDetails.contentRating.ifcoRating property identifies the rating that a video received from the Irish Film Classification Office.

  • The definition of the watermark resource's position.cornerPosition property has been updated to note that the watermark always appear in the upper right corner of the player.

  • The definition of the q parameter for the search.list method has been updated to note that the query term can use the Boolean NOT ( - ) operator to exclude videos associated with a particular search term. The value can also use the Boolean OR ( | ) operator to find videos associated with one of several search terms.

  • The definition of the pageInfo.totalResults property that is returned in an API response to a search.list call has been updated to note that the value is an approximation and may not represent an exact value. In addition, the maximum value is 1,000,000. You should not use this value to create pagination links. Instead, use the nextPageToken and prevPageToken property values to determine whether to show pagination links.

  • The watermarks.set and watermarks.unset methods have been updated to reflect that the API returns an HTTP 204 response code for successful requests to those methods.

2 мая 2014 г.

This update contains the following changes:

  • The new i18nLanguage resource identifies an application language that the YouTube website supports. The application language can also be referred to as a UI language. For the YouTube website, an application language could be automatically selected based on Google Account settings, browser language, or IP location, and a user could also manually select the desired UI language from the YouTube site footer.

    The API supports a method to list supported application languages. Supported languages can be used as the value of the hl parameter when calling API methods like videoCategories.list and guideCategories.list .

  • The new i18nRegion resource 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. For the YouTube website, a content region could be automatically selected based on heuristics like the YouTube domain or the user's IP location, and a user could also manually select the desired content region from the YouTube site footer.

    The API supports a method to list supported content regions. Supported region codes can be used as the value of the regionCode parameter when calling API methods like search.list , videos.list , activities.list , and videoCategories.list .

7 апреля 2014 г.

This update contains the following changes:

  • The new channelSection resource 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.

    The API supports methods to list , insert , update , or delete channel sections. You can retrieve a list of channel sections for the authenticated user's channel, by specifying a particular channel ID, or by specifying a list of unique channel section IDs.

    The error documentation has also been updated to describe the error messages that the API supports specifically for these new methods.

  • The definition of the video resource's fileDetails object has been updated to explain that that object will only be returned if the video's processingDetails.fileDetailsAvailability property has a value of available .

    Similarly, the definition of the video resource's suggestions object has been updated to explain that that object will only be returned if the video's processingDetails.tagSuggestionsAvailability property or its processingDetails.editorSuggestionsAvailability property has a value of available .

  • The documentation for the videos.insert and videos.update methods has been updated to reflect that the status.publishAt property can be set when calling those methods.

  • The definition of the channel resource's invideoPromotion object has been updated to explain that the object can only be retrieved by the channel's owner.

  • The parameter list for the videos.rate method has been updated to reflect that that method does not actually support the onBehalfOfContentOwner parameter. This was a documentation error as videos.rate requests that set this parameter return a 500 error.

31 марта 2014 г.

This update contains the following changes:

13 марта 2014 г.

This update contains the following changes:

  • The API now supports the contentOwnerDetails part for channel resources. The new part contains channel data that is relevant for YouTube partners linked with the channel, including the ID of the content owner linked to the channel and the date and time when the content owner and channel were linked. Note that this new part is not subject to the deprecation policy .

  • The documentation now lists the maximum supported character length for the following properties:

    Ресурс Свойство Максимальная длина
    channel invideoPromotion.items[].customMessage 40 символов
    video snippet.title 100 символов
    video snippet.description 5000 bytes
    video snippet.tags 500 символов. Note that the property value is a list and that commas between items in the list count toward the limit.
  • The channel resource's brandingSettings.watch.featuredPlaylistId property has been deprecated. The API will return an error if you attempt to set its value.

  • The following video resource properties have been added to the list of values that can be set when inserting or updating a video:

  • The error documentation now specifies the HTTP response code for each error type.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    badRequest (400) invalidCriteria The channels.list method returns this error if the request specifies filter parameters that cannot be used in conjunction with each other.
    badRequest (400) channelTitleUpdateForbidden The channels.update method returns this error if you attempt to update a channel's brandingSettings part and change the value of the brandingSettings.channel.title property. (Note that the API does not return the error if you omit the property.)
    badRequest (400) invalidRecentlyUploadedBy The channels.update method returns this error if the invideoPromotion.items[].id.recentlyUploadedBy property specifies an invalid channel ID.
    badRequest (400) invalidTimingOffset The channels.update method returns this error if the invideoPromotion part specifies an invalid timing offset.
    badRequest (400) tooManyPromotedItems The channels.update method returns this error if the invideoPromotion part specifies more than the allowed number of promoted items.
    forbidden (403) promotedVideoNotAllowed The channels.update method returns this error if the invideoPromotion.items[].id.videoId property specifies a video ID that either cannot be found or cannot be used as a promoted item.
    forbidden (403) websiteLinkNotAllowed The channels.update method returns this error if the invideoPromotion.items[].id.websiteUrl property specifies a URL that is not allowed.
    required (400) requiredTimingType The channels.update method returns this error if a request does not specify default timing settings for when YouTube should display a promoted item.
    required (400) requiredTiming The channels.update method must specify an invideoPromotion.items[].timing object for each promoted item.
    required (400) requiredWebsiteUrl The channels.update method must specify an invideoPromotion.items[].id.websiteUrl property for each promoted item.
    badRequest (400) invalidPublishAt The videos.insert method returns this error if the request metadata specifies an invalid scheduled publishing time.

4 марта 2014 г.

This update contains the following changes:

5 декабря 2013 г.

This update contains the following changes:

  • The search.list method's documentation has been updated to properly reflect that you do not need to specify a value for exactly one filter parameter when submitting a search request. Rather, you can set a value for zero filter parameters or for one filter parameter.

  • The definitions for the search.list method's parameters have been updated to note that you must set the type parameter's value to video if you also specify a value for any of the following parameters:

    • eventType
    • videoCaption
    • videoCategoryId
    • videoDefinition
    • videoDimension
    • videoDuration
    • videoEmbeddable
    • videoLicense
    • videoSyndicated
    • videoType

  • The minimum size of uploaded channel banner images has been reduced to 2048px by 1152px. (Previously, the minimum size was 2120px by 1192px.) In addition, note that the channel resource documentation specifies the maximum sizes of all of the banner images served from the API. For example, the maximum size of the brandingSettings.image.bannerTvImageUrl image for television applications is 2120px by 1192px, but the actual image may be 2048px by 1152px. The YouTube Help Center provides additional guidance for optimizing channel art for display on different types of devices.

  • Several channel resource property definitions have been updated to reflect the following information:

    • The brandingSettings.channel.description property's value has a maximum length of 1000 characters.
    • The brandingSettings.channel.featuredChannelsTitle property has a maximum length of 30 characters.
    • The brandingSettings.channel.featuredChannelsUrls[] property can now list up to 100 channels.
    • The brandingSettings.channel.unsubscribedTrailer property value, if set, must specify the YouTube video ID of a public or unlisted video that is owned by the channel owner.

  • The channels.update method now supports updates to the invideoPromotion.items[].promotedByContentOwner property. That property indicates whether the content owner's name will be shown when displaying the promotion. It can only be set if the API request that sets the property value is being made on the content owner's behalf using the onBehalfOfContentOwner parameter.

  • The playlistItems.list and playlistItems.insert methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The contentDetails.contentRating.acbRating property can now specify a rating from either the Australian Classification Board (ACB) for movies or from the Australian Communications and Media Authority (ACMA) for children's television programming.

  • The new contentDetails.contentRating.catvRating and contentDetails.contentRating.catvfrRating properties identify the ratings that a video received under the Canadian TV Classification System and the French-language Régie du cinéma rating system, which is used in Québec, respectively.

  • The videoCategory resource's new snippet.assignable property indicates whether updated videos or newly uploaded videos can be associated with that video category.

  • Code samples have been added for the following methods:

24 октября 2013 г.

This update contains the following changes:

  • The API includes two additional features designed to help find and feature live broadcast content:

    The new snippet.liveBroadcastContent property in search results indicates whether a video or channel resource has live broadcast content. Valid property values are upcoming , active , and none .

    • The video resource's new snippet.liveBroadcastContent property indicates whether the video is an upcoming or active live broadcast. The list below explains the property's possible values:

      • upcoming – The video is a live broadcast that has not yet started.
      • active – The video is an ongoing live broadcast.
      • none – The video is not an upcoming or active live broadcast. This will be the property value for completed broadcasts that are still viewable on YouTube.

    • The video resource's new liveStreamingDetails property is an object that contains metadata about a live video broadcast. To retrieve this metadata, include liveStreamingDetails in the part parameter value's list of resource parts. The metadata includes the following new properties:

      To retrieve this metadata, include liveStreamingDetails in the part parameter value when calling the videos.list , videos.insert , or videos.update method.

    Note that two other features for identifying live broadcast content were released on October 1, 2013 – the search.list method's eventType parameter and the search result's snippet.liveBroadcastContent property.

  • The videos.insert method now supports the notifySubscribers parameter, which indicates whether YouTube should send a notification about the new video to users who subscribe to the video's channel. The parameter's default value is True , which indicates that subscribers will be notified of newly uploaded videos. However, a channel owner who is uploading many videos might prefer to set the value to False to avoid sending a notification about each new video to the channel's subscribers.

  • The list of properties that can be modified when calling the channels.update method has been updated to include the invideoPromotion.items[].customMessage and invideoPromotion.items[].websiteUrl properties. In addition, the list has been modified to identify the brandingSettings properties that are modifiable. These brandingSettings properties were already modifiable, so the documentation change does not reflect a change to the API's existing functionality.

  • The playlists.insert , playlists.update , and playlists.delete methods now support the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The playlists.insert method now supports the onBehalfOfContentOwnerChannel parameter, which is already supported for several other methods.

  • The video resource's contentDetails.contentRating.tvpgRating property now supports a value of pg14 , which corresponds to a TV-14 rating.

  • The definition of the snippet.liveBroadcastContent property, which is part of search results, has been corrected to reflect that live is a valid property value, but active is not a valid property value.

  • The video resource's contentDetails.contentRating.mibacRating property now supports two additional ratings:

    • mibacVap (VAP) – Children should be accompanied by an adult.
    • mibacVm6 (VM6) – Restricted to 6 and over.
    • mibacVm12 (VM12) – Restricted to 12 and over.

  • The channel resource's new invideoPromotion.items[].promotedByContentOwner property indicates whether the content owner's name will be shown when displaying the promotion. This field can only be set if the API request that sets the value is being made on the content owner's behalf. See the onBehalfOfContentOwner parameter for more information.

1 октября 2013

This update contains the following changes:

  • The channel resource's new auditDetails object contains channel data that a multichannel network (MCN) would evaluate while determining whether to accept or reject a particular channel. Note that any API request that retrieves this resource part must provide an authorization token that contains the https://www.googleapis.com/auth/youtubepartner-channel-audit scope. In addition, any token that uses that scope must be revoked when the MCN decides to accept or reject the channel or within two weeks of the date that the token was issued.

  • The channel resource's invideoPromotion.items[].id.type property now supports a value of recentUpload , which indicates that the promoted item is the most recently uploaded video from a specified channel.

    By default, the channel is the same as the one for which the in-video promotion data is set. However, you can promote the most recently uploaded video from another channel by setting the value of the new invideoPromotion.items[].id.recentlyUploadedBy property to the channel ID for that channel.

  • The channel resource contains three new properties – brandingSettings.image.bannerTvLowImageUrl , brandingSettings.image.bannerTvMediumImageUrl , brandingSettings.image.bannerTvHighImageUrl – that specify the URLs for the banner images that display on channel pages in television applications.

  • The new snippet.liveBroadcastContent property in search results indicates whether a video or channel resource has live broadcast content. Valid property values are upcoming , active , and none .

    • For a video resource, a value of upcoming indicates that the video is a live broadcast that has not yet started, while a value of active indicates that the video is an ongoing live broadcast.
    • For a channel resource, a value of upcoming indicates that the channel has a scheduled broadcast that has not yet started, while a value of acive indicates that the channel has an ongoing live broadcast.

  • In the watermark resource, the targetChannelId property has changed from an object to a string. Instead of containing a child property that specifies the YouTube channel ID of the channel that the watermark image links to, the targetChannelId property now specifies that value itself. Accordingly, the resource's targetChannelId.value property has been removed.

  • The thumbnails.set method now supports the onBehalfOfContentOwner parameter, which is already supported for several other methods.

  • The search.list method now supports the eventType parameter, which restricts a search to only return either active, upcoming, or completed broadcast events.

  • The new contentDetails.contentRating.mibacRating property identifies the rating that a video received from Italy's Ministero dei Beni e delle Attivita Culturali e del Turismo.

  • The API now supports the following errors:

    Тип ошибки Детализация ошибки Описание
    badRequest invalidImage The thumbnails.set method returns this error if the provided image content is invalid.
    forbidden videoRatingDisabled The videos.rate method returns this error if the owner of the video that is being rated has disabled ratings for that video.

27 августа 2013 г.

This update contains the following changes:

  • The new watermark resource identifies an image that displays during playbacks of a specified channel's videos. Вы также можете указать целевой канал, с которым будет связано изображение, а также сведения о времени, которые определяют, когда водяной знак появляется во время воспроизведения видео и продолжительность его видимости.

    The watermarks.set method uploads and sets a channel's watermark image. The watermarks.unset method deletes a channel's watermark image.

    The error documentation describes the error messages that the API supports specifically for the watermarks.set and watermarks.unset methods.

  • The channel resource's new statistics.hiddenSubscriberCount property contains a boolean value that indicates whether the channel's number of subscribers is hidden. As such, the property's value is false if the channel's subscriber count is publicly visible.

  • The playlists.list method now supports the onBehalfOfContentOwner and onBehalfOfContentOwnerChannel parameters. Both parameters are already supported for several other methods.

  • The videos.list method now supports the regionCode parameter, which identifies the content region for which a chart should be retrieved. This parameter can only be used in conjunction with the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code.

  • The error documentation describes the following new common request error, which could occur for multiple API methods:

    Тип ошибки Детализация ошибки Описание
    forbidden insufficientPermissions The scopes associated with the OAuth 2.0 token provided for the request are insufficient for accessing the requested data.

August 15, 2013

This update contains the following changes:

  • The channel resource's invideoPromotion object has the following new and updated properties:

    • The API now supports the ability to specify a website as a promoted item. To do so, set the invideoPromotion.items[].id.type property value to website and use the new invideoPromotion.items[].id.websiteUrl property to specify the URL. Also use the new invideoPromotion.items[].customMessage property to define a custom message to display for the promotion.

      Links can be to associated websites, merchant sites, or social networking sites. See the YouTube Help Center instructions for associated websites and merchant sites for more information about enabling links for your content.

      By adding promotional links, you agree that those links will not be used to redirect traffic to unauthorized sites and that those links will comply with YouTube's AdWords policies , YouTube ad policies , YouTube Community Guidelines and YouTube Terms of Service .

    • The properties related to the timing settings for displaying promoted items during video playback have been restructured:

      • The invideoPromotion.timing object has been moved to invideoPromotion.items[].timing . This object now enables you to customize the timing data for each promoted item in the invideoPromotion.items[] list.

      • The new invideoPromotion.defaultTiming object specifies default timing settings for your promotion. Those settings define when a promoted item will display during playback of one of your channel's videos. You can override the default timing for any given promoted item using the invideoPromotion.items[].timing object.

      • The new invideoPromotion.items[].timing.durationMs property specifies the amount of time, in milliseconds, that the promotion should display. The invideoPromotion.defaultTiming object also contains a durationMs field that specifies the default amount of time that the promoted item will display.

    • The invideoPromotion.items[].type and invideoPromotion.items[].videoId properties both have been moved into the invideoPromotion.items[].id object.

  • The subscriptions.list method now supports the onBehalfOfContentOwner and onBehalfOfContentOwnerChannel parameters. Both parameters are already supported for several other methods.

  • In the API response to a thumbnails.set request, the kind property value has changed from youtube#thumbnailListResponse to youtube#thumbnailSetResponse .

  • Code samples have been added for the following methods:

    Note that the Python example for the playlistItems.insert method was also removed since the functionality it demonstrated is now handled by the videos.rate method.

  • The error documentation describes the following new request context error, which could occur for any API method that supports the mine request parameter:

    Тип ошибки Детализация ошибки Описание
    badRequest invalidMine The mine parameter cannot be used in requests where the authenticated user is a YouTube partner. You should either remove the mine parameter, authenticate as a YouTube user by removing the onBehalfOfContentOwner parameter, or act as one of the partner's channels by providing the onBehalfOfContentOwnerChannel parameter if available for the called method.

August 8, 2013

This update contains the following changes:

30 июля 2013 г.

This update contains the following changes:

  • In a channelBanner resource, the value of the kind property's value has changed from youtube#channelBannerInsertResponse to youtube#channelBannerResource . This resource is returned in response to a channelBanners.insert request.

  • The channel resource's new brandingSettings.channel.profileColor property specifies a prominent color that complements the channel's content. The property value is a pound sign ( # ) followed by a six-character hexadecimal string, such as #2793e6 .

  • The API now supports the ability to specify whether a subscription is for all of a channel's activities or just for new uploads. The subscription resource's new contentDetails.activityType property identifies the types of activities that the subscriber will be notified about. Valid property values are all and uploads .

  • The videos.list method supports new parameters for retrieving a chart of the most popular videos on YouTube:

    • The chart parameter identifies the chart that you want to retrieve. Currently, the only supported value is mostPopular . Note that the chart parameter is a filter parameter, which means it cannot be used in the same request as other filter parameters ( id and myRating ).
    • The videoCategoryId parameter identifies the video category for which the chart should be retrieved. This parameter can only be used in conjunction with the chart parameter. By default, charts are not restricted to a particular category.

  • The video resource's new topicDetails.relevantTopicIds[] property provides a list of Freebase topic IDs that are relevant to the video or its content. The subjects of these topics may be mentioned in or appear in the video.

  • The video resource's recordingDetails.location.elevation property has been renamed to recordingDetails.location.altitude , and its fileDetails.recordingLocation.location.elevation property has been renamed to fileDetails.recordingLocation.location.altitude .

  • The video resource's contentDetails.contentRating object specifies the ratings that a video received under various rating schemes, including MPAA ratings, TVPG ratings, and so forth. For each rating system, the API now supports a rating value that indicates that the video has not been rated. Note that for MPAA ratings , an "unrated" rating is frequently used to identify uncut versions of films for which the cut version of the film did receive an official rating.

  • The video resource's new contentDetails.contentRating.ytRating property identifies age-restricted content. The property value will be ytAgeRestricted if YouTube has identified the video as containing content that is inappropriate for users less than 18 years old. If the property is absent or if the property value is empty, then the content has not been identified as age-restricted.

  • The channels.list method's mySubscribers parameter has been deprecated. Use the subscriptions.list method and its mySubscribers parameter to retrieve a list of subscribers to the authenticated user's channel.

  • The channelBanners.insert , channels.update , videos.getRating , and videos.rate methods all now support the onBehalfOfContentOwner parameter. That parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value.

  • The channels.update method's documentation has been updated to reflect the fact that that method can be used to update the channel resource's brandingSettings object and its child properties. The documentation also now lists the updated list of properties that you can set for the channel resource's invideoPromotion object.

  • The error documentation describes the following new errors:

    Тип ошибки Детализация ошибки Описание
    forbidden accountDelegationForbidden This error is not specific to a particular API method. It indicates that the authenticated user is not authorized to act on behalf of the specified Google account.
    forbidden authenticatedUserAccountClosed This error is not specific to a particular API method. It indicates that the authenticated user's YouTube account is closed. If the user is acting on behalf of another Google Account, then this error would indicate that that other account is closed.
    forbidden authenticatedUserAccountSuspended This error is not specific to a particular API method. It indicates that the authenticated user's YouTube account is suspended. If the user is acting on behalf of another Google Account, then this error would indicate that that other account is suspended.
    forbidden authenticatedUserNotChannel This error is not specific to a particular API method. It indicates that the API server cannot identify the channel associated with the API request. If the request is authorized and uses the onBehalfOfContentOwner parameter, you should also set the onBehalfOfContentOwnerChannel parameter.
    forbidden cmsUserAccountNotFound This error is not specific to a particular API method. The CMS user is not allowed to act on behalf of the specified content owner.
    notFound contentOwnerAccountNotFound This error is not specific to a particular API method. The specified content owner account was not found.
    badRequest invalidPart This error is not specific to a particular API method. The request's part parameter specifies parts that cannot be written at the same time.
    badRequest videoChartNotFound The videos.list method returns this error when the request specifies an unsupported or unavailable video chart.
    notFound videoNotFound The videos.update method returns this error to indicate that the video you are trying to update cannot be found. Check the value of the id property in the request body to ensure it is correct.

10 июня 2013 г.

This update contains the following changes:

  • The channels.list method's new forUsername parameter enables you to retrieve information about a channel by specifying its YouTube username.

  • The activities.list method now supports the regionCode parameter, which instructs the API to return results relevant to the specified country. YouTube uses this value when the authorized user's previous activity on YouTube does not provide enough information to generate the activity feed.

  • Playlist resources now contain the snippet.tags property. The property will be only be returned to authorized users who are retrieving data about their own playlists. Authorized users can also set playlist tags when calling either the playlists.insert or playlists.update methods.

  • The onBehalfOfContentOwner parameter, which was previously supported for the channels.list and search.list methods, is now also supported for the videos.insert , videos.update , and videos.delete methods. Note that when this parameter is used in a call to the videos.insert method, the request must also specify a value for the new onBehalfOfContentOwnerChannel parameter, which identifies the channel to which the video will be added. The channel must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.

    Параметр указывает, что учетные данные авторизации запроса идентифицируют пользователя YouTube CMS, который действует от имени владельца контента, указанного в значении параметра. Учетная запись CMS, с помощью которой пользователь проходит аутентификацию, должна быть связана с указанным владельцем контента YouTube.

    This parameter is intended for content partners that own and manage many different YouTube channels. The parameter enables those partners to authenticate once and get access to all of their video and channel data, without having to provide authentication credentials for each individual channel.

    Specifically in regard to this release, the parameter now enables a content partner to insert, update, or delete videos in any of the YouTube channels that the partner owns.

  • The error documentation describes the following new errors:

    Тип ошибки Детализация ошибки Описание
    forbidden insufficientCapabilities This error is not specific to a particular API method. It indicates that the CMS user calling the API does not have sufficient permissions to perform the requested operation. This error is associated with the use of the onBehalfOfContentOwner parameter, which is supported for several API methods.
    unauthorized authorizationRequired The activities.list method returns this error when the request uses the home parameter but is not properly authorized.
  • In the channels resource, the invideoPromotion.channelId property has been removed because the channel ID is already specified using the resource's id property.

  • The new Working with Channel IDs guide explains how the API uses channel IDs. The guide may be especially useful for developers migrating from the previous version of the API and who have applications that either request content for the default user or that rely on the notion that every YouTube channel has a unique username, which is no longer the case.

May 22, 2013

This update contains the following changes:

14 мая 2013 г.

This update contains the following changes:

  • Standalone pages now list code samples for Java , .NET , PHP , and Ruby .

  • The page that lists Python code samples now includes examples for adding a subscription, creating a playlist, and updating a video.

10 мая 2013 г.

This update contains the following changes:

8 мая 2013 г.

This update contains the following changes:

  • Channel resources now support the inVideoPromotion object, which encapsulates information about a promotional campaign associated with the channel. A channel can use an in-video promotional campaign to display thumbnail images for a promoted video within the video player during playbacks of the channel's videos.

    You can retrieve this data by including invideoPromotion in the part parameter value in a channels.list request.

  • The new channels.update method can be used to update a channel's in-video promotional campaign data. Note that the method only supports updates to the invideoPromotion part of the channel resource and does not yet support updates to other parts of that resource.

2 мая 2013 г.

This update contains the following changes:

  • Channel resources now support the status.isLinked property, which indicates whether the channel data identifies a user that is already linked to either a YouTube username or a Google+ account. A user that has one of these links already has a public YouTube identity, which is a prerequisite for several actions, such as uploading videos.

  • Subscription resources now support the subscriberSnippet part. That object encapsulates contains snippet data for the subscriber's channel.

  • The API now supports the videos.getRating method, which retrieves the ratings that the authenticated user gave to a list of one or more videos.

  • The videos.list method's new myRating parameter enables you to retrieve a list of videos that the authenticated user rated with a like or dislike rating.

    The myRating parameter and the id parameter are both now considered filter parameters, which means that an API request must specify exactly one of the parameters. (Previously, the id parameter was a required parameter for this method.)

    The method returns a forbidden error for requests that attempt to retrieve video rating information but are not properly authorized to do so.

  • With the introduction of the myRating parameter, the videos.list method has also been updated to support pagination. Note, however, that paging parameters are only supported for requests using the myRating parameter. (Paging parameters and information are not supported for requests that use the id parameter.)

    • The maxResults parameter specifies the maximum number of videos that the API can return in the result set, and the pageToken parameter identifies a specific page in the result set that you want to retrieve.

    • The youtube#videoListResponse resource, which is returned in response to a videos.list request, now contains the pageInfo object, which contains details like the total number of results and the number of results included in the current result set. The youtube#videoListResponse resource can also include nextPageToken and prevPageToken properties, each of which provides a token that could be used to retrieve a specific page in the result set.

  • The videos.insert method supports the following new parameters:

    • autoLevels – Set this parameter value to true to instruct YouTube to automatically enhance the video's lighting and color.
    • stabilize – Set this parameter value to true to instruct YouTube to adjust the video by removing shakiness resulting from camera motions.

  • The channelTitle property has been added to the snippet for the following resources:

    • playlistItem – The property specifies the name of the channel that added the playlist item.
    • playlist – The property specifies the name of the channel that created the playlist.
    • subscription – The property specifies the name of the channel that is subscribed to.

  • Code samples have been added for the following methods:

  • The subscriptions.list method's new mySubscribers parameter enables you to retrieve a list of the currently authenticated user's subscribers. This parameter can only be used in a properly authorized request.

    Note: This functionality is intended to replace the mySubscribers parameter currently supported for the channels.list method. That parameter will be deprecated.

  • In a video resource, the property value unspecified is no longer a possible value for any of the following properties:

  • API requests that contain an unexpected parameter now return a badRequest error, and the reported reason for the error is unexpectedParameter .

  • The error that the playlistItems.insert method returns when the playlist already contains the maximum number of allowed items has been updated. The error is now reported as a forbidden error, and the error reason is playlistContainsMaximumNumberOfVideos .

19 апреля 2013 г.

This update contains the following changes:

  • The new videos.rate method lets a user set a like or dislike rating on a video or remove a rating from a video.

    The error documentation has also been updated to list the errors that the API might return in response to a videos.rate method call.

  • Thumbnail images are now identified in the API documentation as a separate resource , and the new thumbnails.set method enables you to upload a custom video thumbnail to YouTube and set it for a video.

    The error documentation has also been updated to list the errors that the API might return in response to a thumbnails.set method call.

    Note that this change does not really affect existing resources that return thumbnail images. Thumbnail images are returned in those resources in the same way that they were previously, though the documentation does now list the names of the different thumbnail sizes that the API might return.

  • The channel resource's new brandingSettings part identifies settings, text, and images for the channel's channel page and video watch pages.

  • The playlistItem resource contains the following new properties:

    • The new status object encapsulates status information about the playlist item, and the status.privacyStatus property identifies the playlist item's privacy status.

  • The video resource contains the following new properties:

  • The playlistItems.update method's documentation has been updated to reflect the fact that the snippet.resourceId property must be specified in the resource sent as the request body.

  • The search.list method now supports the following functionality:

    • The new forMine parameter restricts a search to only retrieve the authenticated user's videos.

    • The order parameter now supports the ability to sort results alphabetically by title ( order=title ) or by video count in descending order ( order=videoCount ).

    • The new safeSearch parameter indicates whether search results should include restricted content.

  • The videos.insert method supports several new errors, which are listed in the table below:

    Тип ошибки Детализация ошибки Описание
    badRequest invalidCategoryId The snippet.categoryId property specifies an invalid category ID. Use the videoCategories.list method to retrieve supported categories.
    badRequest invalidRecordingDetails The metadata specifies invalid recording details.
    badRequest invalidVideoGameRating The request metadata specifies an invalid video game rating.
    badRequest invalidVideoMetadata The request metadata is invalid.
  • The onBehalfOfContentOwner parameter has been removed from the list of supported parameters for the videos.update and videos.delete methods.

12 марта 2013 г.

This update contains the following changes:

  • The channelTitle property has been added to the snippet for the following resources:

    • activity – The property specifies the name of the channel responsible for the activity.
    • search – The property specifies the name of the channel associated with the resource that the search result identifies.
    • video – The property specifies the name of the channel that uploaded the video.

  • The search.list method supports the following new parameters:

    • The channelType parameter lets you restrict a search for channels to retrieve all channels or to retrieve only shows.

    • The videoType parameter lets you restrict a search for videos to retrieve all videos or to retrieve only movies or only episodes of shows.

  • The definition of the video resource's recordingDetails part has been updated to note that the object will only be returned for a video if the video's geolocation data or recording time has been set.

  • The playlistItems.update method now returns an invalidSnippet error, which is returned if the API request does not specify a valid snippet.

  • Several API methods support new parameters that are intended exclusively for YouTube content partners. YouTube content partners include movie and television studios, record labels, and other content creators that make their content available on YouTube.

    • Параметр onBehalfOfContentOwner указывает, что учетные данные авторизации запроса идентифицируют пользователя YouTube CMS, который действует от имени владельца контента, указанного в значении параметра. Учетная запись CMS, с помощью которой пользователь проходит аутентификацию, должна быть связана с указанным владельцем контента YouTube.

      This parameter is intended for content partners that own and manage many different YouTube channels. The parameter enables those partners to authenticate once and get access to all of their video and channel data, without having to provide authentication credentials for each individual channel.

      The channels.list , search.list , videos.delete , videos.list , and videos.update methods all support this parameter.

    • The managedByMe parameter, which is supported by the channels.list method, instructs the API to return all channels owned by the content owner that the onBehalfOfContentOwner parameter specifies.

    • The forContentOwner parameter, which is supported by the search.list method, instructs the API to restrict search results to only include resources that are owned by the content owner that the onBehalfOfContentOwner parameter specifies.

25 февраля 2013 г.

This update contains the following changes:

  • The API supports several new parts and properties for video resources:

    • The new fileDetails , processingDetails , and suggestions parts provide information to video owners about their uploaded videos. This data is very useful in applications that enable video uploads and includes the following:

      • processing status and progress
      • errors or other issues encountered while processing a video
      • availability of thumbnail images
      • suggestions for improving video or metadata quality
      • details about the original file uploaded to YouTube

      All of these parts can only be retrieved by the video owner. The list below briefly describes the new parts, and the video resource documentation defines all of the properties that each part contains.

      • The fileDetails object contains information about the video file that was uploaded to YouTube, including the file's resolution, duration, audio and video codecs, stream bitrates, and more.

      • The processingProgress object contains information about YouTube's progress in processing the uploaded video file. The object's properties identify the current processing status and estimate the time remaining until YouTube finishes processing the video. This part also indicates whether different types of data or content, such as file details or thumbnail images, are available for the video.

        This object is designed to be polled so that the video uploader can track the progress that YouTube has made in processing the uploaded video file.

      • The suggestions object contains suggestions that identify opportunities to improve the video quality or the metadata for the uploaded video.

    • The contentDetails part contains four new properties. These properties can be retrieved with unauthenticated requests.

      • dimension – Indicates whether the video is available in 2D or 3D.
      • definition – Indicates whether the video is available in standard or high definition.
      • caption – Indicates whether captions are available for the video.
      • licensedContent – Indicates whether the video contains content that has been claimed by a YouTube content partner.

    • The status part contains two new properties. Video owners can set values for both properties when inserting or updating a video. These properties can also be retrieved with unauthenticated requests.

      • embeddable – Indicates whether the video can be embedded on another website.
      • license – Specifies the video's license. Valid values are creativeCommon and youtube .

  • The definition of the part parameter has been updated for the videos.list , videos.insert , and videos.update methods to list the newly added parts described above as well as the recordingDetails part, which had been inadvertently omitted.

  • The channel resource's new contentDetails.googlePlusUserId property specifies the Google+ profile ID associated with the channel. This value can be used to generate a link to the Google+ profile.

  • Each thumbnail image object now specifies the image's width and height. Thumbnail images are currently returned in activity , channel , playlist , playlistItem , search result , subscription , and video resources.

  • The playlistItems.list now supports the videoId parameter, which can be used in conjunction with the playlistId parameter to only retrieve the playlist item that represents the specified video.

    The API returns a notFound error if the video that the parameter identifies cannot be found in the playlist.

  • The error documentation describes a new forbidden error, which indicates that a request is not properly authorized for the requested action.

  • The channel resource's snippet.channelId property has been removed. The resource's id property provides the same value.

30 января 2013 г.

This update contains the following changes:

  • The new error page lists errors that the API can return. The page includes general errors, which might occur for multiple different API methods, as well as method-specific errors.

16 января 2013 г.

This update contains the following changes:

  • Code samples are now available for the methods and languages shown in the list below:

  • An activity resource can now report a channelItem action, which occurs when YouTube adds a video to an automatically generated YouTube channel . (YouTube algorithmically identifies topics that have a significant presence on the YouTube website and automatically generates channels for those topics.)

  • The following search.list parameters have been updated:

    • The q parameter is no longer designated as a filter, which means ....
    • The relatedToVideo parameter has been renamed relatedToVideoId .
    • The published parameter has been replaced with two new parameters, publishedAfter and publishedBefore , which are described below.

  • The search.list method supports the following new parameters:

    Имя параметра Ценить Описание
    channelId string Return resources created by the specified channel.
    publishedAfter datetime Return resources created after the specified time.
    publishedBefore datetime Return resources created before the specified time.
    regionCode string Return resources for the specified country.
    videoCategoryId string Filter video search results to only include videos associated with the specified video category .
    videoEmbeddable string Filter video search results to only include videos that can be played in an embedded player on a web page. Set the parameter value to true to only retrieve embeddable videos.
    videoSyndicated string Filter video search results to only include videos that can be played outside of YouTube.com. Set the parameter value to true to only retrieve syndicated videos.
  • Several API resources support new properties. The table below identifies the resources and their new properties:

    Ресурс Имя свойства Ценить Описание
    activity contentDetails.playlistItem.playlistItemId string The playlist item ID that YouTube assigned to uniquely identify the item in the playlist.
    activity contentDetails.channelItem object An object that contains information about a resource that was added to a channel. This property is only present if the snippet.type is channelItem .
    activity contentDetails.channelItem.resourceId object An object that identifies the resource that was added to the channel. Like other resourceId properties, it contains a kind property that specifies the resource type, such as video or playlist. It also contains exactly one of several properties – videoId , playlistId , etc. – that specifies the ID that uniquely identifies that resource.
    channel status object This object encapsulates information about the channel's privacy status.
    channel status.privacyStatus string The channel's privacy status. Valid values are private and public .
    playlist contentDetails object This object contains metadata about the playlist's content.
    playlist contentDetails.itemCount unsigned integer Количество видео в плейлисте.
    playlist player object This object contains information that you would use to play the playlist in an embedded player.
    playlist player.embedHtml string An <iframe> tag that embeds a video player that plays the playlist.
    video recordingDetails object This object encapsulates information that identifies or describes the place and time that the video was recorded.
    video recordingDetails.location object This object contains geolocation information associated with the video.
    video recordingDetails.location.latitude double Широта в градусах.
    video recordingDetails.location.longitude double Долгота в градусах.
    video recordingDetails.location.elevation double Altitude above the Earth, in meters.
    video recordingDetails.locationDescription string A text description of the location where the video was recorded.
    video recordingDetails.recordingDate datetime The date and time when the video was recorded. The value is specified in ISO 8601 ( YYYY-MM-DDThh:mm:ss.sZ ) format.
  • The documentation for several API methods now identifies properties that must be specified in the request body or that are updated based on values in the request body. The table below lists those methods as well as the required or modifiable properties.

    Note: Documentation for other methods may already list required and modifiable properties.

    Метод Характеристики
    activities.insert Обязательные свойства:
    • snippet.description
    Modifiable properties:
    • snippet.description
    • contentDetails.bulletin.resourceId
    playlists.update Обязательные свойства:
    • id
    playlistItems.update Обязательные свойства:
    • id
    videos.update Обязательные свойства:
    • id
  • The API no longer reports a playlistAlreadyExists error if you try to create or update a playlist that would have the same title as a playlist that already exists in the same channel.

  • Several API methods support new error types. The table below identifies the method and the newly supported errors:

    Метод Тип ошибки Детализация ошибки Описание
    guideCategories.list notFound notFound The guide category identified by the id parameter cannot be found. Use the guideCategories.list method to retrieve a list of valid values.
    playlistItems.delete forbidden playlistItemsNotAccessible The request is not properly authorized to delete the specified playlist item.
    videoCategories.list notFound videoCategoryNotFound The video category identified by the id parameter cannot be found. Use the videoCategories.list method to retrieve a list of valid values.