Мы обновляем API данных, чтобы он соответствовал тому, как YouTube подсчитывает просмотры коротких видео.
Узнать больше
VideoCategories
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Ресурс videoCategory
определяет категорию, которая была или может быть связана с загруженными видео.
Методы
API поддерживает следующие методы для ресурсов videoCategories
:
- list
- Возвращает список категорий, которые можно связать с видео на YouTube. Попробуйте прямо сейчас .
Представление ресурсов
Следующая структура JSON показывает формат ресурса videoCategories
:
{
"kind": "youtube#videoCategory",
"etag": etag,
"id": string,
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": string,
"assignable": boolean
}
}
Характеристики
В следующей таблице определены свойства, которые отображаются в этом ресурсе:
Характеристики |
---|
kind | string Определяет тип ресурса API. Значение будет youtube#videoCategory . |
etag | etag Etag этого ресурса. |
id | string Идентификатор, который YouTube использует для уникальной идентификации категории видео. |
snippet | object Объект snippet содержит основные сведения о категории видео, включая ее название. |
snippet. channelId | string Канал YouTube, создавший данную категорию видео. |
snippet. title | string Название категории видео. |
snippet. assignable | boolean Указывает, можно ли связать видео с категорией. |
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-08-21 UTC.
[null,null,["Последнее обновление: 2025-08-21 UTC."],[[["\u003cp\u003eA \u003ccode\u003evideoCategory\u003c/code\u003e resource in the YouTube API defines a category that can be associated with uploaded videos.\u003c/p\u003e\n"],["\u003cp\u003eThe API's \u003ccode\u003evideoCategories\u003c/code\u003e list method returns a list of categories applicable to YouTube videos.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003evideoCategory\u003c/code\u003e resource includes an ID, a title, and information about whether the category is assignable to videos.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esnippet\u003c/code\u003e section within a \u003ccode\u003evideoCategory\u003c/code\u003e resource provides basic details such as the channel that created it and its title.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekind\u003c/code\u003e property of the resource is always a string that identifies the resource type as \u003ccode\u003eyoutube#videoCategory\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `videoCategory` resource identifies video categories for YouTube uploads. The API's `videoCategories.list` method retrieves a list of these categories. Each category is represented with a unique ID, title, and the channel ID that created it. The resource also includes an `assignable` property that indicates if videos can be linked to the specific category. The resource type is identified as `youtube#videoCategory`.\n"],null,["# VideoCategories\n\nA **videoCategory** resource identifies a category that has been or could be associated with uploaded videos.\n\nMethods\n-------\n\nThe API supports the following methods for `videoCategories` resources:\n\n[list](/youtube/v3/docs/videoCategories/list)\n: Returns a list of categories that can be associated with YouTube videos.\n [Try it now](/youtube/v3/docs/videoCategories/list#usage).\n\nResource representation\n-----------------------\n\nThe following JSON structure shows the format of a `videoCategories` resource: \n\n```verilog\n{\n \"#kind\": \"youtube#videoCategory\",\n \"#etag\": etag,\n \"#id\": string,\n \"#snippet\": {\n \"#snippet.channelId\": \"UCBR8-60-B28hp2BmDPdntcQ\",\n \"#snippet.title\": string,\n \"#snippet.assignable\": boolean\n }\n}\n```\n\n### Properties\n\nThe following table defines the properties that appear in this resource:\n\n| Properties ||\n|----------------------|-----------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the API resource's type. The value will be `youtube#videoCategory`. |\n| `etag` | `etag` The Etag of this resource. |\n| `id` | `string` The ID that YouTube uses to uniquely identify the video category. |\n| `snippet` | `object` The `snippet` object contains basic details about the video category, including its title. |\n| snippet.`channelId` | `string` The YouTube channel that created the video category. |\n| snippet.`title` | `string` The video category's title. |\n| snippet.`assignable` | `boolean` Indicates whether videos can be associated with the category. |"]]