API Docs / Use Cases

Use Cases

Practical recipes for common workflows you can build with the Tuberalytics API. Each use case includes the relevant endpoints and a step-by-step workflow overview.


Niche Research Dashboard

Build a custom dashboard that displays niche metrics, top channels, and trending videos.

Relevant Endpoints

Endpoint Purpose
GET /api/v1/niches/search Find niches by keyword
GET /api/v1/niches/:id Get niche details and market dynamics
GET /api/v1/niches/:id/channels List channels in the niche
GET /api/v1/niches/:id/videos List top videos in the niche
GET /api/v1/niches/:id/keywords Get niche keywords

Workflow

  1. Search for a niche by keyword (GET /api/v1/niches/search?q=ai+automation)
  2. Fetch niche details for market dynamics scores (GET /api/v1/niches/:id)
  3. Pull the top channels (GET /api/v1/niches/:id/channels?per_page=25)
  4. Pull trending videos (GET /api/v1/niches/:id/videos?per_page=25)
  5. Display everything in your dashboard UI — subscriber distributions, view trends, supply/demand scores

Tip: Cache niche data and refresh daily. Market dynamics don't change minute-to-minute.


Competitor Monitoring

Track a channel's competitors and get alerts when the competitive landscape changes.

Relevant Endpoints

Endpoint Purpose
POST /api/v1/me/channels Add a channel to tracking
POST /api/v1/channels/:id/analyze Run AI analysis
POST /api/v1/channels/:id/competitors/discover Discover competitors
GET /api/v1/channels/:id/competitors List current competitors
GET /api/v1/channels/:id/videos Get competitor videos

Workflow

  1. Add your channel to tracking (POST /api/v1/me/channels)
  2. Run AI analysis to establish a profile (POST /api/v1/channels/:id/analyze)
  3. Discover competitors (POST /api/v1/channels/:id/competitors/discover)
  4. Set up a webhook for competitors.discovered and video.new.competitor events
  5. When a webhook fires, fetch the updated competitor list and compare against your stored snapshot
  6. Alert on changes — new competitors entering the space, competitors gaining subscribers, outlier videos

Tip: Run competitor discovery weekly. Set up outlier.detected.competitor webhooks to catch viral competitor videos in real-time.


Content Idea Generation

Find outlier videos in your niche and extract patterns for content ideas.

Relevant Endpoints

Endpoint Purpose
GET /api/v1/niches/:id/videos Get videos in a niche
GET /api/v1/leaderboards/videos Top-performing videos
GET /api/v1/channels/:id/profile Channel profile with title formulas
GET /api/v1/videos/:id Video details including metrics
GET /api/v1/videos/:id/transcript Video transcript

Workflow

  1. Get top-performing videos from the niche leaderboard (GET /api/v1/leaderboards/videos?niche_id=42&period=month)
  2. For each outlier video, fetch the full details (GET /api/v1/videos/:id)
  3. Optionally fetch the transcript for deeper analysis (GET /api/v1/videos/:id/transcript)
  4. Get the channel profile for title formulas and content style (GET /api/v1/channels/:id/profile)
  5. Analyze patterns — common title structures, topics that over-perform, thumbnail styles
  6. Generate content ideas based on proven formats with your own angle

Tip: Filter by period=week to spot emerging trends before they saturate. Cross-reference with niche keywords for SEO-optimized topic ideas.


Skool Revenue Tracker

Monitor Skool community revenue across channels in a niche.

Relevant Endpoints

Endpoint Purpose
GET /api/v1/niches/:id/channels Channels in a niche
GET /api/v1/channels/:id/skool Channel's Skool community data
GET /api/v1/channels/search Search for channels with Skool

Workflow

  1. Search for channels in your target niche (GET /api/v1/niches/:id/channels?per_page=100)
  2. For each channel, fetch Skool data (GET /api/v1/channels/:id/skool)
  3. Filter to channels with active Skool communities
  4. Track metrics over time: member count, monthly price, estimated MRR
  5. Store snapshots in your database and compute week-over-week growth
  6. Build a leaderboard of Skool revenue by channel

Tip: Run this weekly and track MRR trends. A channel whose Skool MRR is growing fast signals a monetization strategy worth studying.


Automated Channel Onboarding

Add a channel and automatically run the full analysis pipeline — analysis, competitor discovery, and keyword generation.

Relevant Endpoints

Endpoint Purpose
POST /api/v1/me/channels Add channel to tracking
POST /api/v1/channels/:id/analyze Run AI analysis
POST /api/v1/channels/:id/competitors/discover Discover competitors
POST /api/v1/channels/:id/keywords/generate Generate keywords

Workflow

  1. Add the channel (POST /api/v1/me/channels with youtube_url)
  2. Trigger AI analysis (POST /api/v1/channels/:id/analyze)
  3. Wait for channel.analysis.completed webhook (or poll the profile endpoint)
  4. Trigger competitor discovery (POST /api/v1/channels/:id/competitors/discover)
  5. Trigger keyword generation (POST /api/v1/channels/:id/keywords/generate)
  6. Wait for competitors.discovered and keywords.generated webhooks
  7. Fetch the complete picture: profile, competitors, and keywords

Pseudo-code

// Step 1: Add channel
POST /api/v1/me/channels
{ "youtube_url": "https://youtube.com/@nicksaraev" }
// Response: { "data": { "channel_id": 170 } }

// Step 2: Analyze (async  returns 202)
POST /api/v1/channels/170/analyze

// Step 3: After webhook fires, trigger next steps
POST /api/v1/channels/170/competitors/discover
POST /api/v1/channels/170/keywords/generate

Tip: Use webhooks to chain these steps automatically. Each webhook callback triggers the next API call in the pipeline.


Weekly Niche Report

Generate a weekly summary of niche activity — top channels, trending videos, and market changes — delivered to Slack or email.

Relevant Endpoints

Endpoint Purpose
GET /api/v1/niches/:id Niche details with market dynamics
GET /api/v1/niches/:id/channels Top channels
GET /api/v1/niches/:id/videos Recent videos
GET /api/v1/leaderboards/videos Top videos by performance
GET /api/v1/leaderboards/channels Top channels by growth

Workflow

  1. Fetch niche details for current market dynamics (GET /api/v1/niches/:id)
  2. Get the channel leaderboard (GET /api/v1/leaderboards/channels?niche_id=42&period=week)
  3. Get the video leaderboard (GET /api/v1/leaderboards/videos?niche_id=42&period=week)
  4. Format a digest:
    • Market dynamics summary (supply/demand scores)
    • Top 5 channels by subscriber growth
    • Top 5 videos by view count
    • New entrants (channels that appeared this week)
  5. Send via Slack webhook, email API, or any messaging platform

Example Slack Message

Weekly Niche Report: AI Automation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Market: Supply 7.2 / Demand 8.5 (opportunity!)

Top Channels This Week:
1. Nick Saraev — +12,400 subs
2. AI Jason — +8,200 subs
3. Matt Wolfe — +6,100 subs

Top Videos This Week:
1. "I Automated My Entire Business" — 1.2M views
2. "The AI Tool That Changes Everything" — 890K views
3. "Why Most AI Automations Fail" — 650K views

Tip: Use Make.com or N8N to automate this without writing code. Schedule it every Monday morning.


AI Agent Integration

Connect an LLM-powered agent (ChatGPT, Claude, custom agent) to the Tuberalytics API for conversational YouTube research.

Resources

Resource Purpose
/llms.txt Short API summary for LLM context
/llms-full.txt Complete API reference for LLM context
All API endpoints Tool-calling targets

Workflow

  1. Feed the LLM your API documentation:
    • For lightweight context, fetch https://tuberalytics.com/llms.txt
    • For complete reference, fetch https://tuberalytics.com/llms-full.txt
  2. Define API endpoints as tools/functions the LLM can call
  3. The LLM generates API requests based on user questions
  4. Execute the API calls and return results to the LLM
  5. The LLM interprets the data and answers in natural language

Example Conversation

User: "What are the top channels in the AI automation niche?"

Agent thinks: I need to search for the niche, then get its channels.
Agent calls: GET /api/v1/niches/search?q=ai+automation
Agent calls: GET /api/v1/niches/42/channels?per_page=10

Agent responds: "The top channels in AI Automation are:
1. Nick Saraev (250K subs) — focuses on no-code automation tutorials
2. AI Jason (180K subs) — covers AI tools and workflows
3. Matt Wolfe (520K subs) — broad AI coverage with automation content"

Tool Definition Example (OpenAI function-calling format)

{
  "name": "search_channels",
  "description": "Search for YouTube channels by keyword",
  "parameters": {
    "type": "object",
    "properties": {
      "q": {
        "type": "string",
        "description": "Search query"
      },
      "per_page": {
        "type": "integer",
        "description": "Results per page (max 100)"
      }
    },
    "required": ["q"]
  }
}

Tip: Start with /llms.txt for a compact overview that fits in most context windows. Use /llms-full.txt when the agent needs detailed parameter documentation.