REST Resource: videoAdvertisingOptions

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

get

Retrieves advertising settings for the specified video.

getEnabledAds

Retrieves details about the types of allowed ads for a specified partner- or user-uploaded video.

patch

Patches the advertising settings for the specified video.

update

Updates the advertising settings for the specified video.