Build an automated lead generation pipeline that discovers prospects from Google search, enriches them with multi-platform context from Reddit and YouTube, and scores leads based on relevance signals. Cost: $0.015/prospect for 3 API queries.
Prerequisites
- Scavio API key
- Python 3.8+
- Target ICP keywords (industry + stage + signals)
Walkthrough
Step 1: Search for prospect companies
Query Google for companies matching your ICP.
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
def find_prospects(queries):
prospects = []
for q in queries:
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=H, json={'query': q, 'country_code': 'us'}).json()
for r in data.get('organic_results', []):
domain = r.get('link', '').split('/')[2] if r.get('link') else None
if domain and not any(x in domain for x in ['linkedin.com', 'crunchbase.com']):
prospects.append({'domain': domain, 'title': r.get('title'),
'snippet': r.get('snippet', ''), 'source_query': q})
return prospects
prospects = find_prospects(['SaaS companies hiring 2026', 'series A startups developer tools'])
print(f'{len(prospects)} prospects found')Step 2: Score and filter leads
Score prospects based on SERP snippet signals.
def score(prospect):
s = (prospect.get('snippet') or '').lower()
score = 0
if 'series a' in s or 'funding' in s: score += 3
if 'hiring' in s or 'growing' in s: score += 2
if 'saas' in s or 'developer' in s: score += 2
if 'acquired' in s or 'shutdown' in s: score -= 5
return score
scored = sorted([{**p, 'score': score(p)} for p in prospects],
key=lambda x: x['score'], reverse=True)
qualified = [p for p in scored if p['score'] >= 3]
print(f'{len(qualified)} qualified leads')Python Example
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
def lead_pipeline(queries, min_score=3):
prospects = []
for q in queries:
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=H, json={'query': q, 'country_code': 'us'}).json()
for r in data.get('organic_results', []):
domain = r.get('link', '').split('/')[2] if r.get('link') else None
if domain and not any(x in domain for x in
['linkedin.com', 'crunchbase.com', 'twitter.com', 'github.com']):
snippet = (r.get('snippet') or '').lower()
score = sum([3 * ('funding' in snippet),
2 * ('hiring' in snippet), 2 * ('saas' in snippet),
-5 * ('shutdown' in snippet)])
if score >= min_score:
prospects.append({'domain': domain, 'title': r.get('title'),
'snippet': r.get('snippet', ''), 'score': score})
return sorted(prospects, key=lambda x: x['score'], reverse=True)
leads = lead_pipeline(['SaaS hiring engineers 2026', 'YC W26 startups'])
for l in leads[:5]:
print(f"{l['domain']}: score={l['score']}")JavaScript Example
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function leadPipeline(queries, minScore = 3) {
const prospects = [];
for (const q of queries) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: H,
body: JSON.stringify({query: q, country_code: 'us'})
}).then(r => r.json());
(r.organic_results || []).forEach(r => {
const domain = r.link?.split('/')[2];
if (!domain || ['linkedin.com', 'crunchbase.com'].some(x => domain.includes(x))) return;
const s = (r.snippet || '').toLowerCase();
const score = (s.includes('funding') ? 3 : 0) + (s.includes('hiring') ? 2 : 0) + (s.includes('saas') ? 2 : 0);
if (score >= minScore) prospects.push({domain, title: r.title, score});
});
}
return prospects.sort((a, b) => b.score - a.score);
}
leadPipeline(['SaaS hiring 2026']).then(l => console.log(`${l.length} leads`));Expected Output
Scored and filtered lead list with prospect domains, relevance scores, and source queries. Ready for enrichment and outreach.