REST Resource: videoAdvertisingOptions
Stay organized with collections
Save and categorize content based on your preferences.
Resource: VideoAdvertisingOption
The advertising settings for a video. The settings identify the types of ads that can run during the video as well as the times when ads are allowed to run during the video.
JSON representation
|
{
"kind"
:
string
,
"adFormats"
:
[
string
]
,
"breakPosition"
:
[
string
]
,
"adBreaks"
:
[
{
object (
AdBreak
)
}
]
,
"autoGeneratedBreaks"
:
boolean
,
"id"
:
string
,
"tpAdServerVideoId"
:
string
,
"tpTargetingUrl"
:
string
,
"tpUrlParameters"
:
string
}
|
Fields
|
kind
|
string
The type of the API resource. For this resource, the value is
youtubePartner#videoAdvertisingOption
.
|
adFormats[]
|
string
A list of ad formats that the video is allowed to show. Note: as of November 2023, only third_party_ads can be enabled/disabled in this column. See
support article
for more information. The following ad format controls are no longer available and should not be included in the API request:
instream_standard
,
display
,
preroll
,
postroll
.
|
breakPosition[]
|
string
The point at which the break occurs during the video playback.
|
adBreaks[]
|
object (
AdBreak
)
A list of times when YouTube can show an in-stream advertisement during playback of the video.
|
autoGeneratedBreaks
|
boolean
Enables this video for automatically generated midroll breaks.
|
id
|
string
The ID that YouTube uses to uniquely identify the video associated with the advertising settings.
|
tpAdServerVideoId
|
string
A value that uniquely identifies the video to the third-party ad server.
|
tpTargetingUrl
|
string
The base URL for a third-party ad server from which YouTube can retrieve in-stream ads for the video.
|
tpUrlParameters
|
string
A parameter string to append to the end of the request to the third-party ad server.
|
AdBreak
An
adBreak
resource contains information about a time when YouTube can show an in-stream advertisement during video playback.
JSON representation
|
{
"position"
:
string
,
"midrollSeconds"
:
integer
}
|
Fields
|
position
|
string
The point at which the break occurs during the video playback.
|
midrollSeconds
|
integer
The time of the ad break specified as the number of seconds after the start of the video when the break occurs.
|
Methods
|
|
Retrieves advertising settings for the specified video.
|
|
Retrieves details about the types of allowed ads for a specified partner- or user-uploaded video.
|
|
Patches the advertising settings for the specified video.
|
|
Updates the advertising settings for the specified video.
|
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-12-11 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]