自
2025 年 9 月 8 日起,每个新订单项都需要声明是否会投放欧盟 (EU) 政治广告。Display & Video 360 API 和未提供声明的 SDF 上传操作将会失败。如需详细了解如何更新集成以进行此声明,请参阅我们的
弃用页面。
常见问题解答
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
常规
API 的最新版本是什么?
本文档介绍的 API 的最新版本为 v4
。
不可以。您可以使用 Bid Manager API 创建、检索和运行 Display & Video 360 离线报告。
使用 API
我使用哪个网址访问该 API?
https://displayvideo.googleapis.com
支持哪些身份验证方法?
OAuth 2.0 是唯一受支持的身份验证方法。
Display & Video 360 API 请求必须获得以下范围的授权:
https://www.googleapis.com/auth/display-video
对 users
服务的请求还必须获得以下额外范围的授权:
https://www.googleapis.com/auth/display-video-user-management
我想编写代码。在哪里可以找到客户端库?
请参阅客户端库指南。
如果我不想使用客户端库,该怎么办?
我们建议您使用我们的某个客户端库,但您也可以使用直接 HTTP 请求与 Display & Video 360 API 交互。
一些更复杂的方法(例如 advertisers.assets.upload
和 media.upload
)更难直接转换为 HTTP 请求。如需查看使用 c网址 向这些方法发出 HTTP 请求的示例,请参阅我们的广告素材和自定义出价指南。
我需要哪些 Display & Video 360 权限?
如需使用 Display & Video 360 API,进行身份验证的 Google 账号必须是 Display & Video 360 用户,并且有权访问相关合作伙伴或广告客户。
Display & Video 360 用户必须具有以下某个用户角色,相关合作伙伴或广告客户才能执行以下操作:
- 只读:使用
get
或 list
调用检索资源,不包括 user
资源。
- 标准:检索、创建和更新资源。检索对同一合作伙伴或广告客户拥有权限的
user
资源。
- 管理员:检索、创建和更新资源。为您管理的合作伙伴或广告客户检索、创建和授予对
user
资源的访问权限。
如何使用 API 更新 YouTube & Partners 资源?
Display & Video 360 API 不支持创建或更新 YouTube 和合作伙伴资源。在 Display & Video 360 界面中上传结构化数据文件 (SDF),批量创建或更新 YouTube 及合作伙伴资源。如需详细了解如何使用 SDF 上传功能,请参阅我们的 指南页面,了解 YouTube 及合作伙伴资源。
如何定位到地理位置?
您可以使用以下定位类型为订单项指定地理位置定位条件:
TARGETING_TYPE_GEO_REGION
TARGETING_TYPE_POI
TARGETING_TYPE_BUSINESS_CHAIN
TARGETING_TYPE_REGIONAL_LOCATION_LIST
TARGETING_TYPE_PROXIMITY_LOCATION_LIST
使用 targetingTypes.targetingOptions.search
检索前三种定位类型的定位选项 ID。使用 advertisers.locationLists
服务检索和管理位置列表资源。
此外,您还可以构建 TARGETING_TYPE_POI
定位选项 ID,以直接定位到特定纬度/经度坐标周围的邻近区域。
我了解到,可以使用 API 下载结构化数据文件 (SDF),但如何上传这些文件?
Display & Video 360 API 不支持 SDF 上传。我们建议您改为通过 API 提供的 CREATE
、PATCH
和 DELETE
方法管理资源。如果您仍想使用 SDF 管理资源,可以通过 Display & Video 360 界面更新这些文件。
支持
API 是否存在任何已知问题或限制?
您的项目每秒可以发出的请求数受到限制,具体限制详见我们的使用限制指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe Display & Video 360 API v3 allows programmatic access to resources like advertisers, campaigns, and line items, but not performance data.\u003c/p\u003e\n"],["\u003cp\u003eOAuth 2.0 is the required authentication method, using specific scopes for Display & Video 360 and user management.\u003c/p\u003e\n"],["\u003cp\u003eWhile client libraries are recommended, direct HTTP requests can be used; however, some methods might be more complex to implement.\u003c/p\u003e\n"],["\u003cp\u003eUser roles (Read Only, Standard, Admin) dictate API access levels for retrieving, creating, and updating resources.\u003c/p\u003e\n"],["\u003cp\u003eGeographic targeting can be applied using various targeting types, including geo regions, POIs, and custom location lists.\u003c/p\u003e\n"]]],[],null,["# Frequently Asked Questions\n\nGeneral\n-------\n\n### What's the latest version of the API?\n\nThe latest version of the API that this document addresses is\n`v4`.\n\n### Can I retrieve performance data using this API?\n\nNo. Use the [Bid Manager API](/bid-manager/guides/getting-started-api) to create, retrieve, and run\nDisplay \\& Video 360 offline reports.\n\nUse the API\n-----------\n\n### What URL do I use to access the API?\n\n`https://displayvideo.googleapis.com`\n\n### What methods of authentication are supported?\n\nOAuth 2.0 is the only supported method of authentication.\n\nDisplay \\& Video 360 API requests must be authorized for the following scope:\n\n- `https://www.googleapis.com/auth/display-video`\n\nRequests to the [`users`](/display-video/api/reference/rest/current/users) service must also be authorized for the\nfollowing additional scope:\n\n- `https://www.googleapis.com/auth/display-video-user-management`\n\n### I want to write code. Where can I find client libraries?\n\nRefer to the [client library](/display-video/api/guides/getting-started/libraries) guide.\n\n### What if I don't want to use a client library?\n\nWe recommend that you use one of our client libraries but you can also interact\nwith the Display \\& Video 360 API using direct HTTP requests.\n\nSome more involved methods, such as [`advertisers.assets.upload`](/display-video/api/reference/rest/current/advertisers.assets/upload)\nand [`media.upload`](/display-video/api/reference/rest/current/media/upload), are harder to translate directly to HTTP\nrequests. See examples of HTTP requests to these methods using cURL on our\n[Creative](/display-video/api/guides/creating-creatives/overview#upload_an_asset) and [Custom Bidding](/display-video/api/guides/managing-line-items/custom-bidding#upload_a_script_file) guides.\n\n### What Display \\& Video 360 permissions do I need?\n\nIn order to use the Display \\& Video 360 API, the authenticating Google Account must be a\nDisplay \\& Video 360 user with access to relevant partners or advertisers.\n\nThe Display \\& Video 360 user must have one of the following [user\nroles](//support.google.com/displayvideo/answer/2723011) for the relevant partners or advertisers to do the\nfollowing actions:\n\n- **Read only** : Retrieve resources using `get` or `list` calls, excluding `user` resources.\n- **Standard** : Retrieve, create, and update resources. Retrieve `user` resources with permissions to the same partners or advertisers.\n- **Admin** : Retrieve, create, and update resources. Retrieve, create and grant access to `user` resources for the partners or advertisers you administrate.\n\n### How do I update YouTube \\& Partners resources using the API?\n\nThe Display \\& Video 360 API does not support creating or updating YouTube \\& Partners\nresources. Create or update YouTube \\& Partners resources in bulk by uploading\nStructured Data Files (SDF) in the [Display \\& Video 360 interface](//displayvideo.google.com/). For\nmore details on how to use SDF upload, read our [guide page](/display-video/api/guides/managing-line-items/youtube#create_and_update_using_sdf_ui_upload) about\nYouTube \\& Partners resources.\n\n### How do I target geographic locations?\n\nGeographic targeting can be assigned to line items using the following targeting\ntypes:\n\n- `TARGETING_TYPE_GEO_REGION`\n- `TARGETING_TYPE_POI`\n- `TARGETING_TYPE_BUSINESS_CHAIN`\n- `TARGETING_TYPE_REGIONAL_LOCATION_LIST`\n- `TARGETING_TYPE_PROXIMITY_LOCATION_LIST`\n\nRetrieve targeting option IDs for the first three targeting types using\n[`targetingTypes.targetingOptions.search`](/display-video/api/reference/rest/current/targetingTypes.targetingOptions/search). Retrieve and manage\nlocation list resources using the [`advertisers.locationLists`](/display-video/api/reference/rest/current/advertisers.locationLists)\nservice.\n\nIn addition, you can also [build a `TARGETING_TYPE_POI` targeting option\nID](/display-video/api/guides/managing-line-items/targeting#build_poi_targeting_option_ids) to directly target a proximity radius around\nspecific latitude-longitude coordinates.\n\n### I see that I can download Structured Data Files (SDFs) using the API, but how do I upload them?\n\nThe Display \\& Video 360 API does not support SDF upload. We recommend [managing\nresources](/display-video/api/guides/managing-line-items/resources) through `CREATE`, `PATCH`, and `DELETE` methods\nprovided by the API instead. If you still want to manage resources using SDFs,\nthose files can be updated in the [Display \\& Video 360 interface](//displayvideo.google.com/).\n\nSupport\n-------\n\n### Does the API have any known issues or limitations?\n\nThere are limits on the number of requests your project can make per second,\nwhich are outlined in our [usage limits guide](/display-video/api/limits)."]]