The following examples show how to use the YouTube Live Streaming API to create and manage live broadcasts and streams.
Create a broadcast
Call the
liveBroadcasts.insert
method to schedule a new live event. The request body must define the
broadcast's title, scheduled start time, and privacy status. You can also
optionally specify the video category using the snippet.categoryId property.
You can retrieve a list of categories using the
videoCategories.list
method.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.liveBroadcasts.insert? part=snippet,status
The request body contains a
liveBroadcast resource.
In this example, the request body is:
{
"snippet": {
"title": "My Live Event",
"scheduledStartTime": "2026-10-30T19:00:00Z",
"categoryId": "17"
},
"status": {
"privacyStatus": "unlisted"
}
}
Create a stream
Call the
liveStreams.insert
method to create a stream that defines the transmission settings for your video.
You must specify the stream's title and its CDN settings (ingestion type,
resolution, and frame rate).
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.liveStreams.insert? part=snippet,cdn
The request body contains a
liveStream resource. In
this example, the request body is:
{
"snippet": {
"title": "My Live Stream"
},
"cdn": {
"frameRate": "30fps",
"ingestionType": "rtmp",
"resolution": "720p"
}
}
Bind broadcast to stream
Call the
liveBroadcasts.bind
method to associate your broadcast with your stream. Set the id parameter to
the broadcast ID and the streamId query parameter to the stream ID.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.liveBroadcasts.bind? id=BROADCAST_ID &streamId=STREAM_ID &part=id,snippet
Transition broadcast status
Call the
liveBroadcasts.transition
method to change the state of your broadcast. For example, to start testing,
transition the status to testing. To start the actual broadcast, transition
the status to live.
This example transitions the broadcast to testing. Set the id parameter to
the broadcast ID and the broadcastStatus parameter to testing.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.liveBroadcasts.transition? broadcastStatus=testing &id=BROADCAST_ID &part=id,status
Retrieve broadcasts
Call the
liveBroadcasts.list
method to retrieve broadcasts. You can filter by broadcastStatus (for example,
active, completed, or upcoming) or retrieve your own broadcasts using the
mine parameter.
This example retrieves the authenticated user's upcoming broadcasts.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.liveBroadcasts.list? part=snippet,status &broadcastStatus=upcoming &mine=true