title: How to find ID for stream for a broadcast ID or vice-versa (YouTube Data API)?
body: <p>I would like to find the streams associated with a broadcast with 'ready' status. I've been looking at the broadcasts using this call, and don't see either the streams or a key I can use to correlate them:</p>
  <pre><code>curl -H &quot;Authorization: Bearer XXX_AUTH_TOKEN_XXX&quot; &quot;https://www.googleapis.com/youtube/v3/liveBroadcasts?part=status&amp;broadcastStatus=all&amp;maxResults=100&quot;
  </code></pre>
  <p>This produces:</p>
  <pre><code>{
    &quot;kind&quot;: &quot;youtube#liveBroadcastListResponse&quot;,
    &quot;etag&quot;: &quot;LgRz6pjADsE_wIIphSY6n_M3LDE&quot;,
    &quot;pageInfo&quot;: {
      &quot;totalResults&quot;: 39,
      &quot;resultsPerPage&quot;: 50
    },
    &quot;items&quot;: [
      {
        &quot;kind&quot;: &quot;youtube#liveBroadcast&quot;,
        &quot;etag&quot;: &quot;DC7GxUyFsLEyJorVsv7gl7yBxYY&quot;,
        &quot;id&quot;: &quot;BRsOTPMIb_s&quot;,
        &quot;status&quot;: {
          &quot;lifeCycleStatus&quot;: &quot;ready&quot;,
          &quot;privacyStatus&quot;: &quot;public&quot;,
          &quot;recordingStatus&quot;: &quot;notRecording&quot;,
          &quot;madeForKids&quot;: false,
          &quot;selfDeclaredMadeForKids&quot;: false
        }
      },
       ...
   ]
  }
  </code></pre>
  <p>Similarly, I would like to know if a stream in the 'inactive' state is associated with an existing broadcast, so I can add it to a new one if needed.</p>
  <pre><code>curl -H &quot;Authorization: Bearer XXX_AUTH_TOKEN_XXX&quot; &quot;https://www.googleapis.com/youtube/v3/liveStreams?part=snippet,cdn,contentDetails,status&amp;mine=true&amp;maxResults=100&quot;
  </code></pre>
  <p>This produces:</p>
  <pre><code>{
    &quot;kind&quot;: &quot;youtube#liveStream&quot;,
    &quot;etag&quot;: &quot;i3qny6yeyCwtlZkNHB5lgMLGF1I&quot;,
    &quot;id&quot;: &quot;EFWoMyGEmXWkp7dWPLYdWA1615776388366728&quot;,
    &quot;snippet&quot;: {
      &quot;publishedAt&quot;: &quot;2021-03-15T02:46:29Z&quot;,
      &quot;channelId&quot;: &quot;XXXXXXXXXXXXXXXXXXXXXXXX&quot;,
      &quot;title&quot;: &quot;Default stream key&quot;,
      &quot;description&quot;: &quot;Description for default stream key&quot;,
      &quot;isDefaultStream&quot;: false
    },
    &quot;cdn&quot;: {
      &quot;ingestionType&quot;: &quot;rtmp&quot;,
      &quot;ingestionInfo&quot;: {
        &quot;streamName&quot;: &quot;XXXX-XXXX-XXXX-XXXX-XXXX&quot;,
        &quot;ingestionAddress&quot;: &quot;rtmp://a.rtmp.youtube.com/live2&quot;,
        &quot;backupIngestionAddress&quot;: &quot;rtmp://b.rtmp.youtube.com/live2?backup=1&quot;,
        &quot;rtmpsIngestionAddress&quot;: &quot;rtmps://a.rtmps.youtube.com/live2&quot;,
        &quot;rtmpsBackupIngestionAddress&quot;: &quot;rtmps://b.rtmps.youtube.com/live2?backup=1&quot;
      },
      &quot;resolution&quot;: &quot;variable&quot;,
      &quot;frameRate&quot;: &quot;variable&quot;
    },
    &quot;status&quot;: {
      &quot;streamStatus&quot;: &quot;inactive&quot;,
      &quot;healthStatus&quot;: {
        &quot;status&quot;: &quot;noData&quot;
      }
    },
    &quot;contentDetails&quot;: {
      &quot;closedCaptionsIngestionUrl&quot;: &quot;http://upload.youtube.com/closedcaption?cid=sdgs-zk2j-grt3-x9jj-d7ks&quot;,
      &quot;isReusable&quot;: true
    }
  }
  </code></pre>
  <p>For example, the broadcast above apparently is related to the stream above since they were created by YouTube Studio, as the default ones when manually starting a stream. However, it is unclear from the two JSON snippets what connects them.</p>
  <p>Any ideas on how to relate them is greatly appreciated!</p>