YouTube Intelligence is a full-stack AI application that searches YouTube for any topic, pulls transcripts and channel stats, runs advanced LLM synthesis in the cloud via Gemini, and renders the results in a brutalist web dashboard. The frontend is hosted on Vercel, powered by a serverless Python backend running on Modal.
YouTube is where purchase decisions are made — especially for expensive, considered purchases like cars, appliances, and tech. It is one of the few platforms that exposes reach mechanics transparently: view counts show how far an opinion has travelled, like/dislike ratios show whether it landed, and subscriber counts let you weight enthusiast voices against casual ones. This tool turns that public opinion layer into structured commercial intelligence.
You enter a search query like "Best fitness watches in Australia". The frontend sends a request to your serverless Modal backend. Modal finds the top YouTube videos for that query, fetches their full transcripts, pulls video and channel stats from the YouTube Data API, grabs the top comments, and runs 5 structured LLM prompts per video (via Google Gemini) to extract sentiment, themes, comment breakdown, creator vs audience agreement, and sponsorship detection. It then runs a cross-video meta analysis to identify temporal trends and unique points of view across all videos.
Optionally, enter a client name on the results dashboard and the app calls your Modal backend again to generate a client-specific intelligence report with prioritised, effort-tagged recommendations.
| Layer | Tool | What for |
|---|---|---|
| Frontend | Vercel (HTML/CSS/JS) | User interface, state management, live dashboard rendering |
| Backend API | Modal (FastAPI/Python) | Serverless execution environment for heavy scraping and processing |
| YouTube Search & Transcripts | SerpAPI | Find video IDs and fetch full spoken transcripts per video |
| Video & Channel Stats | YouTube Data API v3 | Views, likes, subs, dates, duration, top comments |
| LLM — Intelligence Pipeline | Google Gemini | Sentiment, themes, and comment analysis per video |
| LLM — Client Report | Google Gemini | Client intelligence generation from compiled dashboard context |
To run the backend, you need an account on Modal.com and three API keys stored securely as Modal Secrets:
1. SerpAPI key
2. YouTube Data API v3 key (free)
3. Gemini API Key
SERPAPI_KEY, YOUTUBE_API_KEY, and GEMINI_API_KEY. Your Python backend will automatically load these at runtime.
| Section | What it shows | How it's calculated |
|---|---|---|
| Channel Distribution | Which channels drive the narrative by share of total views | Each channel's views ÷ total views. Top 5 shown, rest grouped as Others. Like ratio percentile tags added per channel. |
| Dominant Themes | What topics come up most across all videos | LLM cross-video meta analysis. Percentage estimated from frequency across transcripts. |
| Temporal Trend | How the conversation shifted from oldest to newest video | LLM analyses videos sorted by publish date. No video numbers — natural prose only. |
| Unique POVs | The single most distinctive claim per video | LLM extracts 1 POV per video. Tagged with that video's SUBS and VIEWS for credibility context. |
| Sponsored flag | YES/NO — explicit sponsorship from a brand related to the query | LLM scans transcript for "sponsored by", "paid partnership", "brought to you by". Only flags if sponsor is relevant to the search query. |
| Comment Breakdown | % split of viewer themes in comments. Hidden if insufficient data. | LLM clusters comments into themes with % estimates. Card is only shown if 2+ meaningful themes are found. |
| Download Analysis | PDF of the full dashboard | Browser print() with print-specific CSS — renders cleanly on white background. |
| Client Intelligence | What the analysis means for a specific client, with recommendations | Frontend sends compiled context back to Modal to query Gemini for bespoke brand strategies. |
| Tag | Type | Meaning |
|---|---|---|
| HIGH | Priority | Act immediately — clear gap or risk identified |
| MID | Priority | Important but not urgent — plan into next quarter |
| LOW | Priority | Nice to have — revisit when capacity allows |
| S | Effort | Small — days of work |
| M | Effort | Medium — weeks of work |
| H | Effort | Heavy — months, likely cross-functional |
| content | Category | Content strategy or creation |
| product | Category | Product or feature related |
| comms | Category | Communications, PR, messaging |
| media | Category | Media, paid, creator partnerships |
| research | Category | Further research or monitoring needed |
To update the backend logic: modal deploy modal_app.py
To update the frontend UI: Push changes to your GitHub repository and Vercel will rebuild automatically.