Tutorial

How to Build a YouTube Influencer Discovery Pipeline

Build an influencer discovery pipeline using SERP data. Find YouTube creators by niche, score their relevance, and export contact lists.

Finding YouTube influencers for brand partnerships typically requires expensive influencer marketing platforms ($200-500/month) or manual searching. This tutorial builds an automated pipeline using SERP data to discover YouTubers in any niche, score their relevance, and compile outreach lists. Each search costs $0.005, and discovering 50 influencers in a niche costs about $0.05 (10 searches).

Prerequisites

  • Python 3.9+ installed
  • requests library installed
  • A Scavio API key from scavio.dev

Walkthrough

Step 1: Define niche search queries

Create search queries designed to surface YouTube channels in your target niche. Combine topic keywords with YouTube-specific modifiers.

Python
def generate_queries(niche: str, modifiers: list = None) -> list:
    if modifiers is None:
        modifiers = [
            'best {niche} youtube channels 2026',
            'top {niche} youtubers to follow',
            'site:youtube.com {niche} tutorial',
            'site:youtube.com {niche} review 2026',
            '{niche} youtube creator recommendations',
        ]
    return [m.format(niche=niche) for m in modifiers]

niche = 'python programming'
queries = generate_queries(niche)
for q in queries:
    print(f'  {q}')
print(f'\n{len(queries)} queries = ${len(queries) * 0.005:.3f}')

Step 2: Discover creators from search results

Search each query and extract unique YouTube channel names and video data from the results.

Python
import requests, os, time, re
from collections import defaultdict

SCAVIO_KEY = os.environ['SCAVIO_API_KEY']

def discover_creators(queries: list) -> dict:
    creators = defaultdict(lambda: {'videos': [], 'mentions': 0, 'sources': []})
    for query in queries:
        resp = requests.post('https://api.scavio.dev/api/v1/search',
            headers={'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json'},
            json={'query': query, 'country_code': 'us', 'num_results': 10})
        for r in resp.json().get('organic_results', []):
            link = r.get('link', '')
            title = r.get('title', '')
            # Extract channel from YouTube URLs
            if 'youtube.com/watch' in link:
                # Channel often in title as "Video Title - Channel Name"
                parts = title.replace(' - YouTube', '').split(' - ')
                if len(parts) >= 2:
                    channel = parts[-1].strip()
                    creators[channel]['videos'].append(parts[0].strip())
                    creators[channel]['mentions'] += 1
                    creators[channel]['sources'].append(link)
            elif 'youtube.com/@' in link or 'youtube.com/c/' in link:
                channel = title.replace(' - YouTube', '').strip()
                creators[channel]['mentions'] += 1
                creators[channel]['sources'].append(link)
        time.sleep(0.3)
    return dict(creators)

creators = discover_creators(queries)
print(f'Discovered {len(creators)} unique creators')
for name, data in sorted(creators.items(), key=lambda x: -x[1]['mentions'])[:5]:
    print(f'  {name}: {data["mentions"]} mentions, {len(data["videos"])} videos')

Step 3: Score and rank creators

Score each creator based on how often they appear across searches, number of unique videos found, and niche relevance.

Python
def score_creators(creators: dict, niche_terms: list) -> list:
    scored = []
    for name, data in creators.items():
        # Frequency score: more mentions = more prominent
        freq_score = min(data['mentions'] * 15, 40)
        # Content volume: more videos found = more active
        volume_score = min(len(data['videos']) * 10, 30)
        # Niche relevance: check if videos match niche
        niche_text = ' '.join(data['videos']).lower()
        term_hits = sum(1 for t in niche_terms if t.lower() in niche_text)
        relevance_score = min(term_hits / max(len(niche_terms), 1) * 30, 30)
        total = round(freq_score + volume_score + relevance_score, 1)
        scored.append({
            'channel': name, 'score': total,
            'mentions': data['mentions'],
            'videos_found': len(data['videos']),
            'sample_videos': data['videos'][:3],
            'channel_url': data['sources'][0] if data['sources'] else ''
        })
    scored.sort(key=lambda x: -x['score'])
    return scored

niche_terms = ['python', 'programming', 'tutorial', 'code']
ranked = score_creators(creators, niche_terms)
print(f'Top 10 {niche} YouTube creators:\n')
for i, c in enumerate(ranked[:10], 1):
    print(f'{i:2}. [{c["score"]:5.1f}] {c["channel"]}')
    if c['sample_videos']:
        print(f'     Videos: {c["sample_videos"][0][:50]}')

Python Example

Python
import requests, os, time
from collections import defaultdict

SCAVIO_KEY = os.environ['SCAVIO_API_KEY']

def find_creators(niche, count=5):
    queries = [f'site:youtube.com {niche} tutorial', f'best {niche} youtubers 2026',
               f'site:youtube.com {niche} review 2026']
    creators = defaultdict(int)
    for q in queries:
        resp = requests.post('https://api.scavio.dev/api/v1/search',
            headers={'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json'},
            json={'query': q, 'country_code': 'us', 'num_results': 10})
        for r in resp.json().get('organic_results', []):
            title = r.get('title', '').replace(' - YouTube', '')
            parts = title.split(' - ')
            if len(parts) >= 2:
                creators[parts[-1].strip()] += 1
        time.sleep(0.3)
    return sorted(creators.items(), key=lambda x: -x[1])[:count]

for name, mentions in find_creators('python programming'):
    print(f'{name}: {mentions} mentions')

JavaScript Example

JavaScript
const SCAVIO_KEY = process.env.SCAVIO_API_KEY;

async function findCreators(niche) {
  const queries = [`site:youtube.com ${niche} tutorial`, `best ${niche} youtubers 2026`];
  const creators = {};
  for (const q of queries) {
    const resp = await fetch('https://api.scavio.dev/api/v1/search', {
      method: 'POST',
      headers: { 'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json' },
      body: JSON.stringify({ query: q, country_code: 'us', num_results: 10 })
    });
    for (const r of (await resp.json()).organic_results || []) {
      const parts = r.title.replace(' - YouTube', '').split(' - ');
      if (parts.length >= 2) {
        const ch = parts[parts.length - 1].trim();
        creators[ch] = (creators[ch] || 0) + 1;
      }
    }
  }
  return Object.entries(creators).sort((a, b) => b[1] - a[1]).slice(0, 10);
}

findCreators('python programming').then(c => c.forEach(([n, m]) => console.log(`${n}: ${m}`)));

Expected Output

JSON
  best python programming youtube channels 2026
  top python programming youtubers to follow
  site:youtube.com python programming tutorial

Discovered 18 unique creators
  Tech With Tim: 4 mentions, 3 videos
  Corey Schafer: 3 mentions, 2 videos
  Programming with Mosh: 3 mentions, 2 videos

Top 10 python programming YouTube creators:
 1. [ 85.0] Tech With Tim
     Videos: Python Full Course for Beginners 2026
 2. [ 72.5] Corey Schafer
 3. [ 68.3] Programming with Mosh

Related Tutorials

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+ installed. requests library installed. A Scavio API key from scavio.dev. A Scavio API key gives you 250 free credits per month.

Yes. The free tier includes 250 credits per month, 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.

Start Building

Build an influencer discovery pipeline using SERP data. Find YouTube creators by niche, score their relevance, and export contact lists.