AI-generated Key Takeaways
- 
          The YouTube API's liveBroadcastresource allows for detailed management of live events, including the ability to designate broadcasts as "made for kids" usingmadeForKidsandselfDeclaredMadeForKids.
- 
          The liveBroadcastsresource supports methods likelist,insert,update,delete,bind,transition, andcuepointfor creating, modifying, managing, and controlling the lifecycle of live broadcasts on YouTube.
- 
          Live broadcasts have detailed metadata, accessible through the snippet,status, andcontentDetailsproperties, which allow specification of the broadcast title, start/end times, privacy settings, and whether they are being recorded, among other settings.
- 
          Broadcast settings such as enableDvr,recordFromStart, andenableAutoStartoffer control over DVR availability, automatic recording, and broadcast start/stop behavior, with specific update restrictions depending on the broadcast's state.
- 
          The monetizationDetailssection provides fine-grained control over ad scheduling and automation, with options to set ad insertion intervals, pause ads until a specific time, and choose between concurrent or non-concurrent ad display.
liveBroadcast resource now contains a
  property that identifies the "made for kids" status of that live broadcast. The YouTube API
  Services Terms of Service and Developer Policies were also updated on 10 January 2020. For more
  information, see the revision histories for the
  YouTube Live Streaming API Service and the
  YouTube API Services Terms of Service.
A liveBroadcast resource represents an event that will be streamed, using live video, on YouTube.
Methods
The API supports the following methods for liveBroadcasts resources:
- list
- Returns a list of YouTube broadcasts that match the API request parameters. Try it now.
- insert
- Creates a broadcast. Try it now.
- update
- Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcastresource'scontentDetailsobject. Try it now.
- delete
- Deletes a broadcast. Try it now.
- bind
- Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream, though a video stream may be bound to more than one broadcast. Try it now.
- transition
- Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of thestatus.streamStatusproperty for the stream bound to your broadcast isactive. Try it now.
- cuepoint
- Inserts a cuepoint into a live broadcast. The cuepoint might trigger an ad break.
Resource representation
The following JSON structure shows the format of a liveBroadcasts resource:
{
  "kind": "youtube#liveBroadcast",
  "etag": etag,
  "id": string,
  "snippet": {
    "publishedAt": datetime,
    "channelId": string,
    "title": string,
    "description": string,
    "thumbnails": {
      (key): {
        "url": string,
        "width": unsigned integer,
        "height": unsigned integer
      }
    },
    "scheduledStartTime": datetime,
    "scheduledEndTime": datetime,
    "actualStartTime": datetime,
    "actualEndTime": datetime,
    "isDefaultBroadcast": boolean,
    "liveChatId": string
  },
  "status": {
    "lifeCycleStatus": string,
    "privacyStatus": string,
    "recordingStatus": string,
    "madeForKids": string,
    "selfDeclaredMadeForKids": string,
  },
  "contentDetails": {
    "boundStreamId": string,
    "boundStreamLastUpdateTimeMs": datetime,
    "monitorStream": {
      "enableMonitorStream": boolean,
      "broadcastStreamDelayMs": unsigned integer,
      "embedHtml": string
    },
    "enableEmbed": boolean,
    "enableDvr": boolean,
    "recordFromStart": boolean,
    "enableClosedCaptions": boolean,
    "closedCaptionsType": string,
    "projection": string,
    "enableLowLatency": boolean,
    "latencyPreference": boolean,
    "enableAutoStart": boolean,
    "enableAutoStop": boolean
  },
  "statistics": {
    "totalChatCount": unsigned long
  },
  "monetizationDetails": {
      "cuepointSchedule": {
        "enabled": boolean,
        "pauseAdsUntil": datetime,
        "scheduleStrategy": string,
        "repeatIntervalSecs": unsigned integer,
      }
    }
  }
}Properties
The following table defines the properties that appear in this resource:
| Properties | |
|---|---|
| kind | stringIdentifies the API resource's type. The value will be youtube#liveBroadcast. | 
| etag | etagThe Etag of this resource. | 
| id | stringThe ID that YouTube assigns to uniquely identify the broadcast. | 
| snippet | objectThe snippetobject contains basic details about the event, including its title, description, start time, and end time. | 
| snippet.publishedAt | datetimeThe date and time that the broadcast was added to YouTube's live broadcast schedule. The value is specified in ISO 8601 ( YYYY-MM-DDThh:mm:ss.sZ) format. | 
| snippet.channelId | stringThe ID that YouTube uses to uniquely identify the channel that is publishing the broadcast. | 
| snippet.title | stringThe broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the titlefield of the corresponding video resource. | 
| snippet.description | stringThe broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting thedescriptionfield of the corresponding video resource. | 
| snippet.thumbnails | objectA map of thumbnail images associated with the broadcast. For each nested object in this object, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. | 
| snippet.thumbnails.(key) | objectValid key values are: 
 | 
| snippet.thumbnails.(key).url | stringThe image's URL. | 
| snippet.thumbnails.(key).width | unsigned integerThe image's width. | 
| snippet.thumbnails.(key).height | unsigned integerThe image's height. | 
| snippet.scheduledStartTime | datetimeThe date and time that the broadcast is scheduled to start. The value is specified in ISO 8601 ( YYYY-MM-DDThh:mm:ss.sZ) format.  Creator Studio supports the ability to create a broadcast without scheduling a start time. In this case, the broadcast starts whenever the channel owner starts streaming. For these broadcasts, thedatetimevalue corresponds to Unix epoch time zero, and this value cannot be changed using the API or in Creator Studio. | 
| snippet.scheduledEndTime | datetimeThe date and time that the broadcast is scheduled to end. The value is specified in ISO 8601 ( YYYY-MM-DDThh:mm:ss.sZ) format. If aliveBroadcastresource does not specify a value for this property, then the broadcast is scheduled to continue indefinitely. Similarly, if you don't specify a value for this property, then YouTube treats the broadcast as if it will go on indefinitely. | 
| snippet.actualStartTime | datetimeThe date and time that the broadcast actually started. This information is only available once the broadcast's state is live. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. | 
| snippet.actualEndTime | datetimeThe date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. | 
| snippet.isDefaultBroadcast | boolean
          This property will be deprecated on or after September 1, 2020. At that time, YouTube will
          stop creating a default stream and default broadcast when a channel is enabled for live
          streaming. See the deprecation
          announcement for more details.
        This property indicates whether this broadcast is the default broadcast. How default broadcasts work When a YouTube channel is enabled for live streaming, YouTube creates a default stream and a default broadcast for the channel. The stream defines how the channel owner sends live video to YouTube, and the broadcast is how viewers can see the default stream. A channel owner can use the liveStreams.listandliveBroadcasts.listmethods to identify these resources.When a channel starts streaming video to its default stream, the video is visible on the channel's default broadcast. When the stream ends, YouTube converts the completed broadcast to a YouTube video and assigns the video a YouTube video ID. After the conversion is complete, the video is included in the channel's list of uploaded videos. The video is not available immediately after the broadcast concludes, and the length of the delay is related to the actual length of the broadcast. | 
| snippet.liveChatId | stringThe ID for the broadcast's YouTube live chat. With this ID, you can use the liveChatMessageresource's methods to retrieve, insert, or delete chat messages. You can also add or remove chat moderators, ban users from participating in live chats, or remove existing bans. | 
| status | objectThe statusobject contains information about the event's status. | 
| status.lifeCycleStatus | stringThe broadcast's status. The status can be updated using the API's liveBroadcasts.transitionmethod.Valid values for this property are: 
 | 
| status.privacyStatus | stringThe broadcast's privacy status. Note that the broadcast represents exactly one YouTube video, so the privacy settings are identical to those supported for videos. In addition, you can set this field by modifying the broadcast resource or by setting the privacyStatusfield of the corresponding video resource.Valid values for this property are: 
 | 
| status.recordingStatus | stringThe broadcast's recording status. Valid values for this property are: 
 | 
| status.madeForKids | booleanThis value indicates whether the broadcast is designated as child-directed. This property value is read-only. | 
| status.selfDeclaredMadeForKids | booleanIn a liveBroadcasts.insertrequest, this property allows the channel owner to designate the broadcast as being
        child-directed. In aliveBroadcasts.listrequest, the property value is only returned if the channel owner authorized the API
        request. | 
| contentDetails | objectThe contentDetailsobject contains information about the event's video content, such as whether the content can be shown in an embedded video player or if it will be archived and therefore available for viewing after the event has concluded. | 
| contentDetails.boundStreamId | stringThis value uniquely identifies the live streambound to the broadcast. | 
| contentDetails.boundStreamLastUpdateTimeMs | datetimeThe date and time that the livestream referenced by boundStreamIdwas last updated. | 
| contentDetails.monitorStream | objectThe monitorStreamobject contains information about the monitor stream, which the broadcaster can use to review the event content before the broadcast stream is shown publicly. | 
| contentDetails.monitorStream.enableMonitorStream | booleanThis value determines whether the monitor stream is enabled for the broadcast. If the monitor stream is enabled, then YouTube will broadcast the event content on a special stream intended only for the broadcaster's consumption. The broadcaster can use the stream to review the event content and also to identify the optimal times to insert cuepoints. You need to set this value to trueif you intend to have atestingstage for your broadcast or if you want to have a broadcast delay for your event. In addition, if this property's value istrue, then you must transition your broadcast to thetestingstate before you can transition it to thelivestate. (If the property's value isfalse, your broadcast cannot have atestingstage, so you can transition the broadcast directly to thelivestate.)When you update a broadcast, this property must be set if your API request includes thecontentDetailspart in thepartparameter value. However, when youinsert a broadcast, the property is optional and has a default value oftrue.Important: This property cannot be updated once the broadcast is in the testingorlivestate. | 
| contentDetails.monitorStream.broadcastStreamDelayMs | unsigned integerIf you have set the enableMonitorStreamproperty totrue, then this property determines the length of the live broadcast delay.When you update a broadcast, this property must be set if your API request includes thecontentDetailspart in thepartparameter value. However, when youinsert a broadcast, the property is optional and has a default value of0. This value indicates that the broadcast does not have a broadcast delay. Note: This property cannot be updated once the broadcast is in thetestingorlivestate. | 
| contentDetails.monitorStream.embedHtml | stringHTML code that embeds a player that plays the monitor stream. | 
| contentDetails.enableEmbed | booleanThis setting indicates whether the broadcast video can be played in an embedded player. If you choose to archive the video (using the enableArchiveproperty), this setting will also apply to the archived video.When you update a broadcast, this property must be set if your API request includes thecontentDetailspart in thepartparameter value. However, when youinsert a broadcast, the property is optional and has a default value oftrue.Note: This property cannot be updated once the broadcast is in the testingorlivestate. | 
| contentDetails.enableDvr | booleanThis setting determines whether viewers can access DVR controls while watching the video. DVR controls enable the viewer to control the video playback experience by pausing, rewinding, or fast forwarding content. The default value for this property is true.When you update a broadcast, this property must be set if your API request includes thecontentDetailspart in thepartparameter value. However, when youinsert a broadcast, the property is optional and has a default value oftrue.Important: You must set the value to trueand also set theenableArchiveproperty's value totrueif you want to make playback available immediately after the broadcast ends. In addition, this property cannot be updated once the broadcast is in thetestingorlivestate. | 
| contentDetails.recordFromStart | booleanThis setting indicates whether YouTube will automatically start recording the broadcast after the event's status changes to live. This property's default value is true, and it can only be set tofalseif the broadcasting channel is allowed to disable recordings for live broadcasts.If your channel does not have permission to disable recordings, and you attempt to insert a broadcast with the recordFromStartproperty set tofalse, the API will return aForbiddenerror. In addition, if your channel does not have that permission and you attempt to update a broadcast to set therecordFromStartproperty tofalse, the API will return amodificationNotAllowederror.When you update a broadcast, this property must be set if your API request includes thecontentDetailspart in thepartparameter value. However, when youinsert a broadcast, the property is optional and has a default value oftrue.Important: You must also set the enableDvrproperty's value totrueif you want the playback to be available immediately after the broadcast ends. If you set this property's value totruebut don't also set theenableDvrproperty totrue, there may be a delay of around one day before the archived video will be available for playback.Note: This property cannot be updated once the broadcast is in the testingorlivestate. | 
| contentDetails.enableClosedCaptions | booleanThis property has been deprecated as of December 17, 2015. Use the contentDetails.closedCaptionsTypeproperty instead.This setting indicates whether HTTP POST closed captioning is enabled for this broadcast. For API clients that are already using this property: 
 | 
| contentDetails.closedCaptionsType | stringNote: This property replaces the contentDetails.enableClosedCaptionsproperty.This property indicates whether closed captioning is enabled for your broadcast and, if so, what type of closed captions you are providing: 
 | 
| contentDetails.projection | stringThe projection format of this broadcast. The property's default value is rectangular.Valid values for this property are: 
 | 
| contentDetails.enableLowLatency | booleanIndicates whether this broadcast should be encoded for low-latency streaming. A low-latency stream can reduce the amount of time it takes for video to be visible to users watching a broadcast, though it can also impact the resolution for viewers of the stream. | 
| contentDetails.latencyPreference | stringIndicates which latency setting to use for this broadcast. This property may be used instead of enableLowLatency, which does not supportultraLow.A low-latency stream can reduce the amount of time it takes for video to be visible to users watching a broadcast, though it can also affect the smoothness of playback. An ultra-low-latency stream further reduces the time it takes for video to be visible to viewers, making interaction with viewers easier, but ultra-low latency does not support closed captions, or resolutions higher than 1080p. Valid values for this property are: 
 | 
| contentDetails.enableAutoStart | booleanIndicates whether this broadcast should start automatically when you start streaming video on the bound live stream. | 
| contentDetails.enableAutoStop | booleanIndicates whether this broadcast should stop automatically around one minute after the channel owner stops streaming video on the bound video stream. | 
| statistics | objectThe statisticsobject contains statistics related to a live broadcast. The values for these statistics can change during the broadcast and can only be retrieved while the broadcast is live. | 
| statistics.totalChatCount | unsigned longThe total number of live chat messages associated with the broadcast. The property and its value are present if the broadcast is visible to the user, has the live chat feature enabled, and has at least one message. Note that this property won't specify a value after the broadcast ends. So, this property wouldn't identify the number of chat messages for an archived video of a completed live broadcast. | 
| monetizationDetails | objectThe monetizationDetailsobject contains information about the stream's
      monetization details, such as if the ads automator is turned on or if midroll ads insertion is
        delayed. | 
| monetizationDetails.cuepointSchedule | objectThe cuepointScheduleobject specifies the ad automation settings for the
        broadcast. | 
| monetizationDetails.cuepointSchedule.enabled | booleanThis value determines whether ads are automatically inserted in the broadcast. If the value is true,  YouTube will automatically insert midroll ads into the broadcast. The
        schedule for running ads will be determined by the value of the other fields in themonetizationDetails.cuepointScheduleobject. | 
| monetizationDetails.cuepointSchedule.pauseAdsUntil | datetimeThis value specifies that YouTube shouldn't insert midroll ads into the broadcast until the specified date and time. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. The value must be set to a future datetime to pause ads; the field value can also be set to a near future datetime to unpause ads when time passes. | 
| monetizationDetails.cuepointSchedule.scheduleStrategy | stringThis value specifies the strategy that YouTube should follow for scheduling cuepoints. Valid values are: 
 | 
| monetizationDetails.cuepointSchedule.repeatIntervalSecs | unsigned integerThis value specifies the interval, in seconds, between automatic ad insertion during a broadcast. For example, if the value is 300, YouTube can insert midroll ad cuepoints at
        five minute intervals.Note that the value specifies the time between the start of successive cuepoints. That is, the interval is not measured from the end of one cuepoint to the start of the next. |