自
2025 年 9 月 8 日起,每個新委刊項都必須聲明是否會放送歐盟政治廣告。如果透過 Display & Video 360 API 和 SDF 上傳的檔案未提供聲明,系統就會失敗。如要進一步瞭解如何更新整合服務以進行這項聲明,請參閱
淘汰項目頁面。
擷取 YouTube &;合作夥伴委刊項
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
您可以使用 Display & Video 360 API 擷取 YouTube 與合作夥伴委刊項、其廣告群組和廣告資源,以及與 YouTube 與合作夥伴廣告放送相關的指定目標。YouTube 與合作夥伴資源和指定目標只能透過使用者介面建立
或更新。
本頁說明如何使用 Display & Video 360 API 識別 YouTube 與合作夥伴資源,並擷取相關的指定目標,以及如何在使用者介面中使用結構化資料檔案 (SDF) 大量建立及更新 YouTube 與合作夥伴資源。
找出 YouTube 與合作夥伴資源
YouTube 與合作夥伴資源包含特定類型的委刊項、廣告群組和廣告。
委刊項
下列 LineItemType
值的委刊項為 YouTube 與合作夥伴委刊項,無法建立或更新:
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_ACTION
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_AUDIO
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_NON_SKIPPABLE
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_NON_SKIPPABLE_OVER_THE_TOP
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_REACH
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_REACH_OVER_THE_TOP
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_SIMPLE
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_SIMPLE_OVER_THE_TOP
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_TARGET_FREQUENCY
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE
您可以從 LineItem
資源的 youtubeAndPartnersSettings
欄位擷取 YouTube 與合作夥伴委刊項專屬的設定。
YouTube 廣告群組和廣告
YouTube 廣告群組和廣告是 YouTube 與合作夥伴委刊項下的子資源,可進一步指定。
YouTube 與合作夥伴委刊項下方可包含多個 AdGroup
資源,每個資源都有自己的額外指定目標和出價策略。每個 AdGroup
資源下方可包含多個相同廣告格式的 AdGroupAd
資源,每個資源都包含專屬的廣告素材資訊和額外追蹤網址清單。
擷取指定目標
用於放送 YouTube 與合作夥伴廣告的指定目標會在廣告主層級、委刊項層級和廣告群組層級指派。
從父項資源繼承的 YouTube 與合作夥伴指定目標,不會反映在子項資源的指定目標設定中,這與非 YouTube 與合作夥伴資源的標準相同。
如要擷取與 YouTube 與合作夥伴廣告放送相關的所有指定目標,您必須:
嘗試修改 YouTube 指定目標
與 YouTube 與合作夥伴資源一樣,您無法使用 Display & Video 360 API 修改
YouTube 與合作夥伴指定目標。若嘗試修改下列指定目標,系統會傳回錯誤:
- 在下列指定目標類型的任何層級指派指定目標:
TARGETING_TYPE_SESSION_POSITION
、TARGETING_TYPE_YOUTUBE_CHANNEL
和 TARGETING_TYPE_YOUTUBE_VIDEO
。
- 指定給 YouTube 與合作夥伴委刊項資源的指定目標。
- 指派給
AdGroup
資源的指定目標。
使用 SDF UI 上傳功能建立及更新
雖然您無法使用 Display & Video 360 API 建立或更新 YouTube 與合作夥伴資源,但您可以透過 結構化資料檔案 (SDF) 上傳功能,在 Display & Video 360 UI 中大量建立或更新 YouTube 與合作夥伴委刊項、廣告群組和廣告。
這些資源會透過 委刊項、YouTube 廣告群組和 YouTube 廣告檔案格式,在 SDF 中呈現。
您可以使用 Display & Video 360 API 產生及下載結構化資料檔案。編輯現有資料列以修改現有資源,或新增資料列來建立新資源,然後透過 Display & Video 360 UI 上傳更新後的檔案。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eThe Display & Video 360 API can be used to retrieve YouTube & Partners line items, ad groups, ads, and their targeting information.\u003c/p\u003e\n"],["\u003cp\u003eYouTube & Partners resources and targeting cannot be created or updated through the API; they must be managed through the Display & Video 360 UI.\u003c/p\u003e\n"],["\u003cp\u003eTo retrieve all targeting relevant to a YouTube & Partners ad, you need to retrieve targeting from the advertiser, line item, and ad group levels.\u003c/p\u003e\n"],["\u003cp\u003eYou can use Structured Data Files (SDF) to create and update YouTube & Partners resources in bulk through the Display & Video 360 UI.\u003c/p\u003e\n"],["\u003cp\u003eThe Display & Video 360 API can be used to generate and download SDFs for editing and subsequent upload through the UI.\u003c/p\u003e\n"]]],["The Display & Video 360 API allows retrieval of YouTube & Partners line items, ad groups, ads, and their targeting. However, these resources and targeting cannot be created or updated via the API. To identify them, look for specific `LineItemType` values. Retrieval of targeting requires fetching data from the advertiser, line item, and ad group levels. Modifications, including targeting adjustments and creation of these resources, can only be done using Structured Data Files (SDF) uploaded through the Display & Video 360 UI.\n"],null,["# Retrieve YouTube & Partners Line Items\n\nYou can retrieve YouTube \\& Partners line items, their ad groups and ad\nresources, and targeting relevant to YouTube \\& Partners ad serving using\nDisplay \\& Video 360 API. **YouTube \\& Partners resources and targeting can only be created**\n**or updated through the UI**.\n\nThis page describes how to use the Display \\& Video 360 API to identify YouTube \\& Partners\nresources and retrieve relevant targeting, and how to create and update YouTube\n\\& Partners resources in bulk using Structured Data Files (SDF) in the UI.\n\nIdentify YouTube \\& Partners resources\n--------------------------------------\n\nYouTube \\& Partners resources consist of certain types of line items, [Ad\nGroups](/display-video/api/reference/rest/v4/advertisers.adGroups), and [Ads](/display-video/api/reference/rest/v4/advertisers.adGroupAds).\n\n### Line Items\n\nLine items of the following [`LineItemType`](/display-video/api/reference/rest/v4/advertisers.lineItems#LineItemType) values are YouTube \\&\nPartners line items and **cannot be created or updated**:\n\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_ACTION`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_AUDIO`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_NON_SKIPPABLE`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_NON_SKIPPABLE_OVER_THE_TOP`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_REACH`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_REACH_OVER_THE_TOP`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_SIMPLE`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_SIMPLE_OVER_THE_TOP`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_TARGET_FREQUENCY`\n- `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE`\n\nSettings specific to YouTube \\& Partners line items can be retrieved from the\n[`youtubeAndPartnersSettings`](/display-video/api/reference/rest/v4/advertisers.lineItems#LineItem.FIELDS.youtube_and_partners_settings) field of the\n[`LineItem`](/display-video/api/reference/rest/v4/advertisers.lineItems#LineItem) resource.\n\n### YouTube Ad Groups and Ads\n\nYouTube Ad Groups and Ads are child resources under YouTube \\& Partner\nline items that allow for further specification.\n\nA YouTube \\& Partners line item can have multiple\n[`AdGroup`](/display-video/api/reference/rest/v4/advertisers.adGroups) resources under it, each with its own [additional\ntargeting](/display-video/api/reference/rest/v4/advertisers.adGroups.targetingTypes.assignedTargetingOptions) and [bidding strategy](/display-video/api/reference/rest/v4/advertisers.adGroups#AdGroup.FIELDS.bid_strategy). Under each\n[`AdGroup`](/display-video/api/reference/rest/v4/advertisers.adGroups) resource can be multiple [`AdGroupAd`](/display-video/api/reference/rest/v4/advertisers.adGroupAds)\nresources of the same [ad format](/display-video/api/reference/rest/v4/advertisers.adGroups#AdGroupFormat), each with its own [creative\ninformation](/display-video/api/reference/rest/v4/advertisers.adGroupAds#AdGroupAd.FIELDS.oneof_ad_details) and [list of additional tracking\nURLs](/display-video/api/reference/rest/v4/advertisers.adGroupAds#AdGroupAd.FIELDS.ad_urls).\n\nRetrieve targeting\n------------------\n\n[Targeting used for serving YouTube \\& Partners ads](//support.google.com/displayvideo/answer/6260055) is\nassigned at the advertiser level, line item level, and Ad Group level.\n\nYouTube \\& Partners targeting inherited from parent resources are not reflected\nin the targeting settings of child resources, as is [standard for non-YouTube\n\\& Partners resources](/display-video/api/guides/best-practices/targeting#utilize_targeting_inheritance).\n\nIn order to retrieve all targeting relevant to the serving of a YouTube \\&\nPartners ad, you must:\n\n- retrieve targeting assigned to its parent advertiser using [`advertisers.listAssignedTargetingOptions`](/display-video/api/reference/rest/v4/advertisers/listAssignedTargetingOptions),\n- retrieve targeting assigned to its parent line item using [`advertisers.lineItems.bulkListAssignedTargetingOptions`](/display-video/api/reference/rest/v4/advertisers.lineItems/bulkListAssignedTargetingOptions),\n- and retrieve targeting assigned to its parent ad group using [`advertisers.adGroups.bulkListAssignedTargetingOptions`](/display-video/api/reference/rest/v4/advertisers.adGroups/bulkListAssignedTargetingOptions).\n\n### Attempting to modify YouTube targeting\n\nAs is the case with YouTube \\& Partners resources, **you cannot modify**\n**YouTube \\& Partners targeting using the Display \\& Video 360 API**. Any attempt to modify\nthe following targeting will return an error:\n\n- Targeting assigned at any level of the following [targeting types](/display-video/api/reference/rest/v4/TargetingType): `TARGETING_TYPE_SESSION_POSITION`, `TARGETING_TYPE_YOUTUBE_CHANNEL`, and `TARGETING_TYPE_YOUTUBE_VIDEO`.\n- Targeting assigned to [YouTube \\& Partners line item resources](#line_items).\n- Targeting assigned to [`AdGroup`](/display-video/api/reference/rest/v4/advertisers.adGroups) resources.\n\nCreate and update using SDF UI upload\n-------------------------------------\n\nAlthough you cannot create or update YouTube \\& Partners resources using the\nDisplay \\& Video 360 API, you can create or update YouTube \\& Partners line items, ad groups,\nand ads in bulk using [Structured Data File (SDF) upload through the\nDisplay \\& Video 360 UI](//support.google.com/displayvideo/answer/6301070).\n\nThese resources are represented in SDF through the [Line Item](/display-video/api/structured-data-file/v6/LineItem),\n[Youtube Ad Group](/display-video/api/structured-data-file/v6/AdGroup), and [YouTube Ad](/display-video/api/structured-data-file/v6/AdGroupAd) file\nformats.\n\nYou can [generate and download Structured Data Files using\nDisplay \\& Video 360 API](/display-video/api/guides/downloading-sdfs/create). Edit existing rows to make changes to existing\nresources or add new rows for create new resources, and upload the updated\nfiles through the Display \\& Video 360 UI."]]