我们正在更新 YouTube 数据分析和报告 API,以便与 YouTube 统计 Shorts 观看次数的方式保持一致。
了解详情
中国钢铁业完胜美337调查案
百度 此前,反对党接连指控政府部长和支持政府的议员收买反对党议员,以换取他们在弹劾案表决中投反对票。
以下列表列出了适用于 YouTube Analytics API 和 YouTube Reporting API 的代码示例。您还可以从 GitHub 代码库下载这些示例。
Java
批量数据报告 (YouTube Reporting API)
- 创建报告作业(
reportTypes.list
、jobs.create
)
- 检索报告(
jobs.list
、jobs.reports.list
)
JavaScript
查询报告 (YouTube Analytics API)
- 检索每日频道统计信息 (
reports.query
)
PHP
批量数据报告 (YouTube Reporting API)
- 创建报告作业(
reportTypes.list
、jobs.create
)
- 检索报告 (
jobs.list
、jobs.reports.list
)
Python
批量数据报告 (YouTube Reporting API)
- 创建报告作业 (
reportTypes.list
、jobs.create
)
- 检索报告(
jobs.list
、jobs.reports.list
)
查询报告 (YouTube Analytics API)
- 检索每日频道统计信息 (
reports.query
)
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-06。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-08-06。"],[[["This page lists available code samples for the YouTube Analytics API and YouTube Reporting API, which can also be downloaded from the linked GitHub repository."],["Code examples for creating reporting jobs and retrieving reports using the YouTube Reporting API are available in Java, PHP, and Python."],["JavaScript and Python code samples are provided for querying and retrieving daily channel statistics through the YouTube Analytics API."],["The code samples provided in Java, PHP, and Python are used to list the available report types, as well as creating, and listing jobs and their reports."]]],["Code samples for YouTube's Analytics and Reporting APIs are available on GitHub. For the Reporting API, Java, PHP, and Python samples demonstrate creating reporting jobs using `reportTypes.list` and `jobs.create`, and retrieving reports using `jobs.list` and `jobs.reports.list`. For the Analytics API, JavaScript and Python examples illustrate retrieving daily channel statistics via `reports.query`.\n"]]