Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can use a JSON schedule to tell a custom program which YouTube live event to manage next and when. YouTube’s Live Streaming API provides operations for broadcasts and video streams, but it does not provide a built-in JSON playlist-rotation feature. Your application must validate the schedule, select the next entry, and manage the relevant YouTube resources.

What “rotate” means in YouTube’s Live Streaming API

The API separates the event viewers see from the video input sent to YouTube:

  • liveBroadcast: the event, corresponding to one YouTube video. It includes metadata such as scheduled start and end times and lifecycle status. If no scheduled end time is provided, YouTube treats the broadcast as continuing indefinitely. Google’s liveBroadcast reference.
  • liveStream: the video input that can be bound to a broadcast. A broadcast can be bound to one stream; a stream can be bound to more than one broadcast. Google’s bind method reference.

So first decide what your schedule is rotating: separate scheduled events, streams reused across events, or input sources within one continuously active production. Those are different workflows. Changing a JSON playlist does not, by itself, switch the live input.

Choose a scheduling approach

Approach Setup and repeatability Control and operational work
YouTube Studio scheduling Uses YouTube’s interface rather than a custom scheduler; suited to manual event setup. Less custom automation, but the schedule’s selection and ordering are not driven by your own JSON program.
Custom API scheduler with pre-created broadcasts Requires API authentication and setup. Reuses a finite set of already-created events. Your code interprets the schedule and manages binding, state checks, monitoring, and recovery.
Custom API scheduler that creates or binds resources as needed Requires the same authentication plus logic for creating or finding resources as events arrive. Offers control over resource handling, while increasing the need for idempotency, logging, and error recovery.

The API documents operations to create, bind, list, update, and transition broadcasts, as well as create, list, and update streams. It does not prescribe a JSON format or rotation policy; those belong to your application. See the YouTube Live Streaming API reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Roku Streaming Stick HD with Voice Remote
  • HD streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
  • Compact without compromises: The sleek design of Roku Streaming Stick won’t block neighboring HDMI ports, and it even powers from your TV alone, plugging into the back and staying out of sight. No wall outlet, no extra cords, no clutter.
  • No more juggling remotes: Power up your TV, adjust the volume, and control your Roku device with one remote. Use your voice to quickly search, play entertainment, and more.
  • Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
  • TV, simplified: With setup that only takes minutes, a simple-to-navigate Home Screen, and an uncluttered remote control that does all you need—Roku makes it easier to watch the TV you love.

Design a JSON schedule your program can act on

YouTube does not prescribe a JSON schedule schema. The following is an application design example, not a format accepted directly by YouTube:

{
  "timezone": "UTC",
  "entries": [
    {
      "broadcastId": "YOUR_BROADCAST_ID",
      "streamId": "YOUR_STREAM_ID",
      "start": "2026-10-10T18:00:00Z",
      "end": "2026-10-10T19:00:00Z",
      "order": 1
    },
    {
      "broadcastId": "YOUR_NEXT_BROADCAST_ID",
      "streamId": "YOUR_STREAM_ID",
      "start": "2026-10-10T19:00:00Z",
      "order": 2
    }
  ]
}

Use stable resource identifiers where resources already exist, ISO 8601 timestamps, and an explicit ordering or recurrence rule. The optional end here is your scheduler’s field; YouTube’s broadcast resource uses scheduledEndTime. Use UTC (the trailing Z) or define another deterministic timezone policy so daylight-saving changes do not make an event ambiguous. Decide how your scheduler handles overlaps, missing end times, late starts, and entries that have already passed.

Rank #2
Sale
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
  • Ultra-speedy streaming: Roku Ultra is 30% faster than any other Roku player, delivering a lightning-fast interface and apps that launch in a snap.
  • Cinematic streaming: This TV streaming device brings the movie theater to your living room with spectacular 4K, HDR10+, and Dolby Vision picture alongside immersive Dolby Atmos audio.
  • The ultimate Roku remote: The rechargeable Roku Voice Remote Pro offers backlit buttons, hands-free voice controls, and a lost remote finder.
  • No more fumbling in the dark: See what you’re pressing with backlit buttons.
  • Say goodbye to batteries: Keep your remote powered for months on a single charge.

Implement the rotation safely

  1. Validate the schedule before making API changes. Parse the JSON and reject invalid timestamps, missing resource identifiers, duplicate or conflicting entries, and past entries if your workflow does not permit them. Resolve the next entry using the declared order and time policy.
  2. Authorize the channel and verify eligibility. Use credentials with the permissions required by the API methods you call, and confirm live streaming is enabled for the authorized user. The broadcasts.list reference documents authorization scopes and possible errors, including insufficient live permissions or live streaming not being enabled.
  3. Find the relevant broadcast and inspect its state. You can list by status, ID, or authenticated owner. The list method requires a part parameter and exactly one of broadcastStatus, id, or mine. Its documented status filter accepts active, all, completed, and upcoming. Request the resource fields your logic needs, then ensure the event is in a state appropriate for the operation.
  4. Create or bind only when needed. If the schedule references resources that do not yet exist, create them deliberately; otherwise find and reuse the intended resources. Bind the selected stream to the broadcast as required by the workflow, then check stream readiness before attempting lifecycle transitions. The API reference documents the relevant broadcast operations and stream operations.
  5. Check state before transitioning. Google’s reference specifically says to verify that the stream bound to a broadcast is active before transitioning the broadcast to testing. Apply the same state-aware discipline to other transitions: inspect the current broadcast state and do not blindly repeat a transition after an uncertain response.
  6. Make retries idempotent and observable. Persist the schedule entry and the YouTube resource IDs created for it. Before retrying a create operation, check whether the intended resource already exists so a timeout does not lead to duplicate broadcasts. Log API requests’ outcomes and errors, and make failures visible for operator review. These are application safeguards, not guarantees provided by YouTube.
  7. Test with a controlled event before unattended use. Confirm that the selected broadcast is visible as intended, the correct stream is bound, start and end handling match your policy, and your scheduler responds safely to expired credentials, connectivity loss, and API errors. Results depend on the actual channel and implementation; do not assume a schedule has been tested until it has been exercised there.

Common failure points and recovery

  • Authorization or live-permission error: confirm the authenticated account has the required authorization and that live streaming is enabled for that user. Review the error returned by the API before retrying.
  • List request rejected: include part and exactly one supported selector: broadcastStatus, id, or mine. Check that a status value is one of the documented options.
  • Broadcast cannot transition to testing: inspect the bound stream’s state first. The reference requires the stream to be active for this transition; resolve stream readiness before trying again.
  • Wrong event selected: validate UTC timestamps, ordering, overlap rules, and resource IDs before execution. Log the chosen entry and broadcast ID so the selection can be diagnosed.
  • Duplicate event after a retry: persist created resource IDs and check for an existing intended broadcast before issuing another create request.
  • Rotation stops after an API or network error: retain the schedule entry and last known resource state, log the failure, and retry only after checking current state. Avoid replaying a mutating operation blindly.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If your actual goal is to keep uploaded videos looping as a 24/7 YouTube stream—not to have your own program rotate API-managed broadcast events—StreamNeo is a simpler alternative: upload a recording or build a playlist, add your YouTube stream key, and go live. It runs from the cloud, so nothing has to stay on at home; videos stream as uploaded at any quality up to 4K 60fps for one flat price per slot; it can recover automatically if YouTube drops the stream. The first day is free with no card. Monthly service is $9.99 per month. Start your free day with StreamNeo.

Quick Recap

SaleBestseller No. 1
SaleBestseller No. 2
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
No more fumbling in the dark: See what you’re pressing with backlit buttons.; Say goodbye to batteries: Keep your remote powered for months on a single charge.
$96.71
Bestseller No. 5
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.
$49.99
Best Value
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
  • Essential 4K streaming – Get everything you need to stream in brilliant 4K Ultra HD with High Dynamic Range 10+ (HDR10+).
  • The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
  • Make your TV even smarter – Fire TV gives you instant access to a world of content, tailor-made recommendations, and Alexa, all backed by fast performance.
  • All your favorite apps in one place – Experience endless entertainment with access to Prime Video, Netflix, YouTube, Disney+, Apple TV+, HBO Max, Hulu, Peacock, Paramount+, and thousands more. Easily discover what to watch from hundreds of thousands of movies and TV episodes (subscription fees may apply), including free, ad-supported content.
  • Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.
Rank #4
Amazon Fire TV Stick 4K Plus with AI-powered Fire TV Search, Wi-Fi 6, stream hundreds of thousands of movies and shows, free & live TV, find shows faster with Alexa+
  • Advanced 4K streaming - Elevate your entertainment with the next generation of our best-selling 4K stick, with improved streaming performance optimized for 4K TVs.
  • The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
  • Cloud gaming, no console required – Stream Call of Duty: Black Ops 7, Hogwarts Legacy, Outer Worlds 2, Ninja Gaiden 4, and hundreds of games on your Fire TV Stick 4K Select with Xbox Game Pass and Luna via cloud gaming. Xbox Game Pass subscription and compatible controller required. Each sold separately.
  • Smarter picks with Alexa+ – Getting to what you love has never been easier. Press the voice remote button and talk naturally to find what to watch across your apps, manage your smart home, or dive into virtually any topic.
  • Wi-Fi 6 support - Enjoy smooth 4K streaming, even when other devices are connected to your router.
Rank #3
Sale
Roku Streaming Stick 4K with Voice Remote - HDR10+ & Dolby Vision
  • Stunning 4K and Dolby Vision streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
  • Breathtaking picture quality: Stunningly sharp 4K picture brings out rich detail in your entertainment with four times the resolution of HD. Watch as colors pop off your screen and enjoy lifelike clarity with Dolby Vision and HDR10+.
  • Seamless streaming for any room: With Roku Streaming Stick 4K, watch your favorite entertainment on any TV in the house, even in rooms farther from your router thanks to the long-range Wi-Fi receiver.
  • Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
  • Compact without compromises: Our sleek design won’t block neighboring HDMI ports, so you can switch from streaming to gaming with ease. Plus, it’s designed to stay hidden behind your TV, keeping wires neatly out of sight

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.