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`](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts/insert.md.txt)
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`](https://developers.google.com/youtube/data/reference/rest/v3/videoCategories/list.md.txt)
method.

```
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.liveBroadcasts.insert?
        part=snippet,status
```

The request body contains a
[`liveBroadcast`](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt) resource.
In this example, the request body is:

```json
{
  "snippet": {
    "title": "My Live Event",
    "scheduledStartTime": "2026-10-30T19:00:00Z",
    "categoryId": "17"
  },
  "status": {
    "privacyStatus": "unlisted"
  }
}
```

## Create a stream

Call the
[`liveStreams.insert`](https://developers.google.com/youtube/data/live/reference/rest/v3/liveStreams/insert.md.txt)
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`](https://developers.google.com/youtube/data/live/reference/rest/v3/liveStreams.md.txt) resource. In
this example, the request body is:

```json
{
  "snippet": {
    "title": "My Live Stream"
  },
  "cdn": {
    "frameRate": "30fps",
    "ingestionType": "rtmp",
    "resolution": "720p"
  }
}
```

## Bind broadcast to stream

Call the
[`liveBroadcasts.bind`](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts/bind.md.txt)
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`](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts/transition.md.txt)
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`](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts/list.md.txt)
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
```