Broadcasts
Get Broadcast by ID
GET /2/broadcasts/:id returns a broadcast owned by the authenticated user, looked up by broadcast ID alone.
GET
/
2
/
broadcasts
/
{id}
Get a Broadcast
curl --request GET \
--url https://api.x.com/2/broadcasts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.x.com/2/broadcasts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.x.com/2/broadcasts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.x.com/2/broadcasts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.x.com/2/broadcasts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.x.com/2/broadcasts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.x.com/2/broadcasts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"available_for_replay": true,
"broadcast_id": "<string>",
"chat_option": 123,
"created_at_ms": "<string>",
"end_ms": "<string>",
"height": 123,
"id": "<string>",
"image_url": "<string>",
"image_url_medium": "<string>",
"image_url_small": "<string>",
"is_high_latency": true,
"language": "<string>",
"live_category_id": "<string>",
"media_key": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"share_url": "<string>",
"source_id": "<string>",
"start_ms": "<string>",
"state": "<string>",
"title": "<string>",
"total_watched": "<string>",
"total_watching": "<string>",
"tweet_id": "<string>",
"twitter_user_id": "<string>",
"updated_at_ms": "<string>",
"width": 123
},
"errors": [
{
"detail": "<string>",
"resource_type": "<string>",
"title": "<string>",
"type": "https://api.x.com/2/problems/resource-not-found",
"parameter": "<string>",
"resource_id": "<string>",
"status": 123,
"value": "<string>"
}
]
}{
"code": 123,
"message": "<string>"
}Returns a broadcast owned by the authenticated user, looked up by its alphanumeric
broadcast_id alone. This route replaces the deprecated Get Broadcast (GET /2/users/:user_id/broadcasts/:broadcast_id) — the owning user ID is no longer part of the path, and ownership is still enforced through the authenticated user context.
Use broadcast.fields to select which Broadcast fields to return. Many fields (image URLs, start_ms, tweet_id, viewer counts) only populate after the broadcast goes live or later in the lifecycle.
source_id is the source id of the stream source the broadcast streams from, the same value as the source’s id in Get Sources. Request it with broadcast.fields=source_id. It is omitted when the source has been deleted.
live_category_id is the id of the live category the host picked when going live, as listed by Get Live Categories. Request it with broadcast.fields=live_category_id. It is omitted when the broadcast has none.
The announcement post is created asynchronously after going live, so
tweet_id is typically not present immediately — re-fetch the broadcast a moment later to read it.Authorizations
OAuth2UserTokenUserToken
Query Parameters
A comma separated list of Broadcast fields to display. The fields available for a Broadcast object.
Minimum array length:
1Available options:
available_for_replay, broadcast_id, chat_option, created_at_ms, end_ms, height, id, image_url, image_url_medium, image_url_small, is_high_latency, language, live_category_id, media_key, scheduled_end_ms, scheduled_start_ms, share_url, source_id, start_ms, state, title, total_watched, total_watching, tweet_id, twitter_user_id, updated_at_ms, width Response
The request has succeeded.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
- Option 38
- Option 39
- Option 40
- Option 41
- Option 42
- Option 43
- Option 44
- Option 45
- Option 46
- Option 47
- Option 48
- Option 49
- Option 50
- Option 51
- Option 52
- Option 53
- Option 54
- Option 55
- Option 56
- Option 57
- Option 58
- Option 59
- Option 60
- Option 61
Show child attributes
Show child attributes
⌘I
Get a Broadcast
curl --request GET \
--url https://api.x.com/2/broadcasts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.x.com/2/broadcasts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.x.com/2/broadcasts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.x.com/2/broadcasts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.x.com/2/broadcasts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.x.com/2/broadcasts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.x.com/2/broadcasts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"available_for_replay": true,
"broadcast_id": "<string>",
"chat_option": 123,
"created_at_ms": "<string>",
"end_ms": "<string>",
"height": 123,
"id": "<string>",
"image_url": "<string>",
"image_url_medium": "<string>",
"image_url_small": "<string>",
"is_high_latency": true,
"language": "<string>",
"live_category_id": "<string>",
"media_key": "<string>",
"scheduled_end_ms": "<string>",
"scheduled_start_ms": "<string>",
"share_url": "<string>",
"source_id": "<string>",
"start_ms": "<string>",
"state": "<string>",
"title": "<string>",
"total_watched": "<string>",
"total_watching": "<string>",
"tweet_id": "<string>",
"twitter_user_id": "<string>",
"updated_at_ms": "<string>",
"width": 123
},
"errors": [
{
"detail": "<string>",
"resource_type": "<string>",
"title": "<string>",
"type": "https://api.x.com/2/problems/resource-not-found",
"parameter": "<string>",
"resource_id": "<string>",
"status": 123,
"value": "<string>"
}
]
}{
"code": 123,
"message": "<string>"
}