GuideCategories: list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
注意:這是淘汰公告。
自 2020 年 9 月 9 日起,guideCategories
資源和 guideCategories.list
方法均已淘汰。
傳回可與 YouTube 頻道建立關聯的類別清單。
配額影響:呼叫此方法會產生 1 個單位的配額費用。
要求
HTTP 要求
GET https://www.googleapis.com/youtube/v3/guideCategories
參數
下表列出這項查詢支援的參數。列出的所有參數都是查詢參數。
參數 |
必要參數 |
part |
string
part 參數會指定 API 回應中要包含的 guideCategory 資源屬性。將參數值設為 snippet 。
|
篩選器 (請指定下列其中一個參數) |
id |
string
id 參數會指定以半形逗號分隔的 YouTube 頻道類別 ID 清單,用於擷取資源。在 guideCategory 資源中,id 屬性會指定 YouTube 頻道類別 ID。 |
regionCode |
string
regionCode 參數會指示 API 傳回指定國家/地區可用的節目表類別清單。參數值為 ISO 3166-1 alpha-2 國家/地區代碼。 |
選用參數 |
hl |
string
hl 參數會指定 API 回應中文字值所用的語言。預設值為 en-US 。 |
回應
如果成功的話,這個方法會傳回回應內文,其結構如下:
{
"kind": "youtube#guideCategoryListResponse",
"etag": etag,
"nextPageToken": string,
"prevPageToken": string,
"pageInfo": {
"totalResults": integer,
"resultsPerPage": integer
},
"items": [
guideCategory resource
]
}
屬性
下表定義這個資源中顯示的屬性:
屬性 |
kind |
string
識別 API 資源的類型。值為 youtube#guideCategoryListResponse 。 |
etag |
etag
這項資源的 Etag。 |
nextPageToken |
string
這個權杖可用做 pageToken 參數的值,以擷取結果集中的下一頁。 |
prevPageToken |
string
這個權杖可用做 pageToken 參數的值,以擷取結果集中的上一頁。 |
pageInfo |
object
pageInfo 物件會封裝結果集的換頁資訊。 |
pageInfo.totalResults |
integer
結果集中的結果總數。 |
pageInfo.resultsPerPage |
integer
API 回應中包含的結果數量。 |
items[] |
list
可與 YouTube 頻道建立關聯的類別清單。在這個對應中,類別 ID 是對應鍵,值則是對應的 guideCategory 資源。 |
錯誤
下表列出 API 可能在呼叫這個方法時傳回的錯誤訊息。詳情請參閱錯誤訊息說明文件。
試試看!
使用 APIs Explorer 呼叫這個 API,並查看 API 要求和回應。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-22 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-22 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eguideCategories\u003c/code\u003e resource and \u003ccode\u003eguideCategories.list\u003c/code\u003e method have been deprecated as of September 9, 2020.\u003c/p\u003e\n"],["\u003cp\u003eThis API method, when functional, returned a list of categories associated with YouTube channels.\u003c/p\u003e\n"],["\u003cp\u003eA call to this method has a quota cost of 1 unit.\u003c/p\u003e\n"],["\u003cp\u003eThe API request requires the \u003ccode\u003epart\u003c/code\u003e parameter with the value \u003ccode\u003esnippet\u003c/code\u003e, and either the \u003ccode\u003eid\u003c/code\u003e or \u003ccode\u003eregionCode\u003c/code\u003e as a filtering parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe method's response, when functional, included properties such as \u003ccode\u003ekind\u003c/code\u003e, \u003ccode\u003eetag\u003c/code\u003e, \u003ccode\u003enextPageToken\u003c/code\u003e, \u003ccode\u003eprevPageToken\u003c/code\u003e, and \u003ccode\u003epageInfo\u003c/code\u003e, along with a list of \u003ccode\u003eguideCategory\u003c/code\u003e resources in the \u003ccode\u003eitems\u003c/code\u003e property.\u003c/p\u003e\n"]]],["The `guideCategories` resource and `guideCategories.list` method were deprecated on September 9, 2020. This method previously returned a list of YouTube channel categories. Key parameters included `part` (specifying properties), `id` (category IDs), and `regionCode` (country-specific categories). The method had a quota cost of 1 unit and did not use a request body. A successful response included metadata like `kind`, `etag`, `pageInfo`, and a list of `guideCategory` resources.\n"],null,[]]