YouTube 數據分析服務
您可以在 YouTube 數據分析服務中使用 YouTube Analytics API 在 Apps Script 中。這個 API 可讓使用者擷取 YouTube 影片和頻道的觀看統計資料、人氣指標和客層資訊。
參考資料
如需這項服務的詳細資訊,請參閱 YouTube Analytics API 的參考說明文件。與 Apps Script 中的所有進階服務一樣,YouTube Analytics 服務會使用與公開 API 相同的物件、方法和參數。詳情請參閱「如何決定方法簽章」。
程式碼範例
以下程式碼範例使用 YouTube Analytics API 的 第 2 版,以及 YouTube Data API 的 第 3 版,您可以透過 Apps Script 中的 YouTube 服務存取這些版本。
如要回報問題並尋求其他支援,請參閱 YouTube API 支援指南。
建立報表
這個函式會建立試算表,其中包含頻道影片的每日觀看次數、觀看時間指標和新訂閱人數。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-21 (世界標準時間)。
[null,null,["上次更新時間:2024-12-21 (世界標準時間)。"],[[["The YouTube Analytics API allows you to access viewing statistics, popularity metrics, and demographic data for YouTube videos and channels within Apps Script."],["This is an advanced service that requires enabling before use."],["The provided sample code demonstrates how to create a spreadsheet report containing daily view counts, watch time, and subscriber data for a YouTube channel using the API."],["The API utilizes the same objects, methods, and parameters as the public YouTube Analytics API, ensuring consistency and familiarity for developers."],["For further support and issue reporting, refer to the YouTube API support guide."]]],[]]