ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Build a YouTube Channel Stats Dashboard
Tutorial

How to Build a YouTube Channel Stats Dashboard

Get YouTube channel subscriber counts, view counts, and video listings via the Scavio search API. An alternative to the YouTube Data API v3 quota limits.

Get Free API KeyAPI Docs

You can retrieve YouTube channel statistics via the Scavio search API by setting platform to youtube. This avoids the YouTube Data API v3 quota system and returns subscriber counts, view counts, and recent videos in a single request.

Prerequisites

  • Python 3.9+
  • Scavio API key

Walkthrough

Step 1: Search for a YouTube channel

Search the channel name with platform:youtube to get channel-level stats.

Python
import requests

API_KEY = "your-scavio-api-key"

def get_channel_stats(channel_name: str) -> dict:
    r = requests.post(
        "https://api.scavio.dev/api/v1/search",
        json={
            "query": channel_name,
            "platform": "youtube",
            "num_results": 5
        },
        headers={"x-api-key": API_KEY},
        timeout=20
    )
    r.raise_for_status()
    return r.json()

data = get_channel_stats("Fireship")
results = data.get("organic_results", [])
for r in results:
    print(r.get("title"), r.get("channel"), r.get("views"))

Step 2: Search for recent videos from a channel

Add the channel name plus a topic to get relevant video listings with view counts.

Python
def get_channel_videos(channel_name: str, topic: str = "") -> list:
    query = f"{channel_name} {topic}".strip()
    r = requests.post(
        "https://api.scavio.dev/api/v1/search",
        json={"query": query, "platform": "youtube", "num_results": 20},
        headers={"x-api-key": API_KEY},
        timeout=20
    )
    r.raise_for_status()
    results = r.json().get("organic_results", [])
    return [
        {
            "title": v.get("title"),
            "url": v.get("link"),
            "views": v.get("views"),
            "duration": v.get("duration"),
            "published": v.get("published_date"),
            "channel": v.get("channel")
        }
        for v in results
        if channel_name.lower() in (v.get("channel") or "").lower()
    ]

Step 3: Build a simple terminal dashboard

Display stats for multiple channels in a formatted table.

Python
CHANNELS = ["Fireship", "Theo - t3.gg", "ThePrimeagen", "Web Dev Simplified"]

print(f"{'Channel':<25} {'Recent Videos Found':>20}")
print("-" * 50)

for channel in CHANNELS:
    videos = get_channel_videos(channel)
    total_views = sum(
        int(v["views"].replace(",", "").replace(" views", "")) 
        for v in videos 
        if v.get("views") and v["views"].replace(",", "").replace(" views", "").isdigit()
    )
    print(f"{channel:<25} {len(videos):>10} videos found")

Python Example

Python
import requests
import re
from datetime import date

API_KEY = "your-scavio-api-key"

def parse_views(views_str: str) -> int:
    if not views_str:
        return 0
    cleaned = re.sub(r"[^0-9KMB.]", "", views_str.upper())
    if "B" in cleaned:
        return int(float(cleaned.replace("B", "")) * 1_000_000_000)
    if "M" in cleaned:
        return int(float(cleaned.replace("M", "")) * 1_000_000)
    if "K" in cleaned:
        return int(float(cleaned.replace("K", "")) * 1_000)
    return int(cleaned) if cleaned.isdigit() else 0

def get_channel_videos(channel_name: str, n: int = 20) -> list:
    r = requests.post(
        "https://api.scavio.dev/api/v1/search",
        json={"query": channel_name, "platform": "youtube", "num_results": n},
        headers={"x-api-key": API_KEY},
        timeout=20
    )
    r.raise_for_status()
    results = r.json().get("organic_results", [])
    return [
        {"title": v.get("title"), "url": v.get("link"),
         "views": parse_views(v.get("views","")),
         "views_raw": v.get("views"), "duration": v.get("duration"),
         "published": v.get("published_date"), "channel": v.get("channel")}
        for v in results
    ]

def channel_dashboard(channels: list) -> None:
    print(f"YouTube Dashboard — {date.today()}")
    print("=" * 70)
    for ch in channels:
        videos = get_channel_videos(ch)
        if not videos:
            print(f"{ch}: no data")
            continue
        total_views = sum(v["views"] for v in videos)
        top = sorted(videos, key=lambda v: v["views"], reverse=True)[:1]
        print(f"\n{ch}")
        print(f"  Videos found: {len(videos)} | Total tracked views: {total_views:,}")
        if top:
            print(f"  Top video: {top[0]['title'][:60]} ({top[0]['views_raw']})")

if __name__ == "__main__":
    channel_dashboard(["Fireship", "Theo - t3.gg", "ThePrimeagen"])

JavaScript Example

JavaScript
const API_KEY = 'your-scavio-api-key';

async function getChannelVideos(channelName, n = 20) {
  const res = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', 'x-api-key': API_KEY },
    body: JSON.stringify({ query: channelName, platform: 'youtube', num_results: n })
  });
  const data = await res.json();
  return data.organic_results ?? [];
}

const channels = ['Fireship', 'Theo - t3.gg'];
for (const ch of channels) {
  const videos = await getChannelVideos(ch);
  console.log(`\n${ch}: ${videos.length} videos found`);
  for (const v of videos.slice(0, 3)) {
    console.log(`  ${v.title?.slice(0, 60)} | ${v.views}`);
  }
}

Expected Output

JSON
YouTube Dashboard - 2026-05-22
======================================================================

Fireship
  Videos found: 18 | Total tracked views: 24,892,441
  Top video: Every JavaScript Framework Explained in 30 Seconds (4.2M views)

Theo - t3.gg
  Videos found: 15 | Total tracked views: 12,441,209
  Top video: I was wrong about React Server Components (2.1M views)

Related Tutorials

  • How to Build a YouTube Trend Detector
  • How to Build a Multi-Source Research Agent
  • How to Get Amazon Product Data Without Scraping

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.9+. Scavio API key. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best YouTube Data APIs Without Quota Limits (2026)

Read more
Best Of

Best YouTube Channel Data Tools and APIs in 2026

Read more
Solution

Find YouTube Influencers via API Instead of Scraping

Read more
Solution

Track YouTube Channels, Videos, and Trends

Read more
Use Case

YouTube Influencer Data via API Instead of Scraping

Read more
Use Case

n8n Search Enrichment Workflow

Read more

Start Building

Get YouTube channel subscriber counts, view counts, and video listings via the Scavio search API. An alternative to the YouTube Data API v3 quota limits.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy