A YouTube niche monitor agent watches one niche, checks whether a spike lasts, and reports only when the numbers earn it. The loop runs on four Trends API calls: get_top_trends scans the YouTube Trending board for climbers, get_time_series pulls the niche's weekly history, get_growth measures the move across 7-day, 30-day, 3-month and 12-month windows, and get_context reads the videos behind the numbers. Run on November 6, 2026, the loop shows why the check matters: Roblox sat at a YouTube search index of 75 (latest series point, October 24) with 7-day growth of 1.35 percent and 30-day growth of zero, a flat niche, not a breakout. FNAF fell 6.25 percent over its latest 7 days. The rest of this page walks each step with the exact calls and the real numbers they returned.
The loop runs in four moves
The loop is four moves, each with one call and one output: scan, pull, check, report. Scan looks at the YouTube Trending board for anything climbing fast. Pull fetches the full weekly series for the niche behind the climb. Check compares growth across four windows and decides whether the move holds. Report writes a short note with the numbers, the videos, and the verdict. Each move has one API call and one output, so a failure in any step stops the loop instead of producing a confident report from partial data. The YouTube agent page lists the board and series calls this loop builds on, and the agent index shows the same pattern applied to other sources.
Scan the board first, never a hunch
The trigger is a climber on the YouTube Trending board, never a hunch about a keyword. On November 6, 2026 at 09:01 UTC the board's top three were an Olivia Rodrigo music video at rank 1, the Godzilla Minus Zero trailer at rank 2, and a board game video at rank 3. Sorting the same board by rank change over 7 days surfaced exactly one climber: "Overload" at rank 19, up from rank 122, a jump of 103 places. One climber in a week is a thin trigger list, and that is the point: the board hands the agent a short list of candidates instead of a reason to chase every video at the top. The call is get_top_trends with type set to YouTube Trending, sort set to rank_change, and window set to 7d. A board built the same way exists for Google Trends, covered on the Google Trends agent page, and the same scan step works there with no change to the logic.
Pull the series before judging the spike
A board rank says something moved; the series says how long it has been moving. The call is get_time_series with keyword set to the niche and source set to YouTube. For Roblox it returned 260 weekly points, about five years of history, with the last five weeks reading 75, 74, 72, 74 and 75. The latest point is dated October 24, 2026, which lags the November 6 board snapshot by almost two weeks: series data arrives slower than the board, so the agent treats the board as the alert and the series as the background. A niche that jumps on the board while its series sits flat is a one-week story until the series catches up. The data catalog lists the 14 keyword sources the series call accepts, including TikTok and Google Search for cross-checking a YouTube move.
Four windows separate noise from a trend
One window lies; four windows agree or they do not. The call is get_growth with the niche, source set to YouTube, and windows 7D, 30D, 3M and 12M in a single call. Roblox grew 1.35 percent over 7 days, 0.0 percent over 30 days, fell 1.32 percent over 3 months, and fell 8.54 percent over 12 months, from an index of 82 a year ago to 75 now. FNAF fell 6.25 percent over 7 days and 6.25 percent over 30 days, rose 7.14 percent over 3 months, and fell 11.76 percent over 12 months. Mech keyboard fell 66 percent over 12 months, from 50 to 17. None of the three niches shows a 7-day rise that survives the longer windows, so the loop reports no breakout for any of them this week. The windows do not end on the same day: Roblox runs to October 24, while FNAF and mech keyboard run to October 31, so the rows compare each niche's latest available week, not one shared week.
| Niche | 7 days | 30 days | 3 months | 12 months |
|---|---|---|---|---|
| Roblox | +1.35% | 0.0% | -1.32% | -8.54% |
| FNAF | -6.25% | -6.25% | +7.14% | -11.76% |
| Mech keyboard | n/a | n/a | n/a | -66% |
The mech keyboard row carries a gap worth stating plainly: the API returned no 7-day, 30-day or 3-month growth figure for it, so only the 12-month figure is cited. A missing figure is missing data, not a flat line, and the agent records it as such instead of printing a meaningless percentage.
Read the videos before writing the report
Numbers say a niche moved; the videos say why. The call is get_context with the niche, source set to YouTube, and the default 7-day window. For Roblox it returned 10 videos published between October 31 and November 5, 2026, with 2,705,555 views between them. The top video, "Everyone Plays Monopoly #roblox #shorts" by playit, published November 4, drew 1,165,723 views, about 43 percent of the total. One short clip carrying nearly half the views in a niche is a concentration signal: the niche's attention sits in a single format on a single channel, not spread across creators. The report names the video, the channel, the view count and the date, so a reader can check the claim in one click instead of trusting a summary. The same context call reads TikTok and other sources; the TikTok agent page shows how the identical step looks on a faster-moving feed.
Copy the loop
The whole loop fits in one scheduled job with four calls and one rule. Run it daily for the scan, weekly for the growth check.
TRIGGER get_top_trends, type "YouTube Trending", sort rank_change, window 7d
Keep any keyword that climbed 50+ ranks in 7 days.
PULL get_time_series, keyword <niche>, source "YouTube"
Keep the last 12 weekly points.
CHECK get_growth, keyword <niche>, source "YouTube",
windows 7D, 30D, 3M, 12M
Report only when 7D growth tops 10 percent, 30D growth stays
positive, and the recent index sits above its 12-month-ago value.
REPORT get_context, keyword <niche>, source "YouTube", 7 days
Name the top 3 videos with channel, views and date.
State the verdict: breakout, flat, or falling.
On November 6, 2026 the loop ran on three niches and reported nothing, because no niche passed the check. Silence is a correct output: an agent that reports every board climb as a breakout trains its readers to ignore it. The loop earns attention by staying quiet until the numbers agree.