Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

YouTube Channel Live Streams

Dokumentacja API
https://api.sandbase.ai/v1/api/youtube/channel-lives

List a YouTube channel's live and past-live streams by handle or channel ID with cursor pagination (title, views, length, publish time).

Cena
Od $0.0012USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
0 wymaganych · 4 opcjonalnych

Playground

Wejście
Continuation token from a previous response for pagination.
YouTube channel handle.
YouTube channel ID.
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `lengthText`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a live stream that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

YouTube Channel Live Streams API

Returns a list of a YouTube channel's live and past-live streams, with title, view count, length, and a relative publish time. Pass a channel handle such as @IShowSpeed or a channelId.

Use cases

  • Track how often a creator streams and how long each stream runs.
  • Rank a channel's past live streams by view count to find its biggest broadcasts.
  • Collect stream titles and thumbnails for a channel archive or dashboard.
  • Feed stream video IDs into a video details or transcript lookup.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-lives" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle": "@IShowSpeed"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
channelIdstringNoYouTube channel ID.
cursorstringNoContinuation token from a previous response for pagination.
handlestringNoYouTube channel handle.
requireFieldsarrayNoOptional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example lengthText, and it is served only by a source that returns every one

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "lives": [
      {
        "id": "IkhjzYsvCmw",
        "image": "https://i.ytimg.com/vi/IkhjzYsvCmw/hq720.jpg",
        "lengthText": "2:00:20",
        "publishedTime": "Streamed 2d ago",
        "title": "HALLOWEEN SPIDER-MAN SPEED-VERSE IRL STREAM 🎃🕷",
        "url": "https://www.youtube.com/watch?v=IkhjzYsvCmw",
        "views": 3700000
      }
    ],
    "nextCursor": "cur_iqioDVdrk2HZB14YevFECQ"
  },
  "found": true
}

Response fields

FieldMeaning
data.lives[].idYouTube video ID of the live stream.
data.lives[].titleTitle of the stream.
data.lives[].urlFull watch URL for the stream.
data.lives[].imageThumbnail image URL.
data.lives[].viewsView count as a number.
data.lives[].lengthTextStream length as text, for example 2:00:20.
data.lives[].publishedTimeRelative publish label such as Streamed 2d ago. It is not an exact timestamp.
data.nextCursorToken for the next page of streams. Send it as cursor in the next request.
foundtrue when the channel lookup returned a result.

Notes

  • Send either handle (with the leading @) or channelId.
  • For the next page, pass data.nextCursor as cursor in the same request.
  • Set requireFields to ["lengthText"] only if you need lengthText on every stream. This can change which source serves the call and its price.
  • To get more detail on a stream, pass its id to YouTube Video Details or YouTube Video Transcript.

Pricing

Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
YouTubeOd $0.0012 za wywołanieJSON
YouTubeOd $0.00045 za wywołanieJSON
YouTubeOd $0.0012 za wywołanieJSON
YouTubeOd $0.0012 za wywołanieJSON
YouTube$0.014286 za wywołanieJSON
YouTube$0.014286 za wywołanieJSON

Przewodniki:Best YouTube API in 2026: Pricing Compared

Pytania

FAQ

Jak używać API YouTube Channel Live Streams?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/youtube/channel-lives z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API YouTube Channel Live Streams?

Od $0.0012 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API YouTube Channel Live Streams?

Nie są wymagane żadne parametry. Opcjonalne: cursor (string), handle (string), channelId (string) i requireFields (array). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API YouTube Channel Live Streams?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego YouTube lub klucza API?

Nie. YouTube Channel Live Streams działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API YouTube.