Raw franchise operator names are not enough for outreach. This pipeline enriches operator leads with location counts, revenue signals, news mentions, and contact information by searching for each operator. Each enrichment costs $0.010-0.015 across multiple queries per operator.
Prerequisites
- Python 3.8+
- requests library
- A Scavio API key from scavio.dev
- A list of franchise operator names to enrich
Walkthrough
Step 1: Enrich operators with web data
Search for each operator to find their website, location count, and news mentions.
import os, requests, json
from datetime import datetime
API_KEY = os.environ['SCAVIO_API_KEY']
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}
OPERATORS = [
{'name': 'Sun Holdings', 'brand': 'Burger King'},
{'name': 'Dhanani Group', 'brand': 'Subway'},
{'name': 'Carrols Restaurant Group', 'brand': 'Burger King'},
]
def enrich_operator(operator):
name = operator['name']
brand = operator['brand']
enriched = {**operator, 'website': '', 'locations': '', 'news': [], 'revenue_signals': []}
# Search for company website and info
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': f'{name} franchise {brand}', 'country_code': 'us'}, timeout=10).json()
organic = data.get('organic_results', [])
if organic:
enriched['website'] = organic[0].get('link', '')
for r in organic:
snippet = r.get('snippet', '').lower()
if 'location' in snippet or 'unit' in snippet or 'restaurant' in snippet:
enriched['locations'] = r.get('snippet', '')[:100]
if any(w in snippet for w in ['revenue', 'million', 'billion', 'sales']):
enriched['revenue_signals'].append(r.get('snippet', '')[:100])
# Search for recent news
news_data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': f'{name} {brand} news 2026', 'country_code': 'us'}, timeout=10).json()
for r in news_data.get('organic_results', [])[:3]:
enriched['news'].append({'title': r.get('title', '')[:60], 'link': r.get('link', '')})
return enriched
enriched_ops = []
for op in OPERATORS:
enriched = enrich_operator(op)
enriched_ops.append(enriched)
print(f' {op["name"]:30} | Website: {enriched["website"][:35]}')
print(f' News: {len(enriched["news"])} | Revenue signals: {len(enriched["revenue_signals"])}')
print(f'\nCost: ${len(OPERATORS) * 2 * 0.005:.3f} ({len(OPERATORS)} operators x 2 queries)')Step 2: Score and prioritize operators
Score each operator based on enrichment data to prioritize outreach.
def score_operator(enriched):
score = 0
# Has website
if enriched['website']: score += 20
# Has location data
if enriched['locations']: score += 20
# Revenue signals
score += min(len(enriched['revenue_signals']) * 15, 30)
# Recent news (active company)
score += min(len(enriched['news']) * 10, 30)
enriched['score'] = score
return enriched
scored = [score_operator(op) for op in enriched_ops]
scored.sort(key=lambda x: x['score'], reverse=True)
print(f'\n=== Operator Priority Ranking ===')
for i, op in enumerate(scored, 1):
print(f' {i}. [{op["score"]:3}/100] {op["name"]:30} ({op["brand"]})')
if op['website']:
print(f' Website: {op["website"][:50]}')
if op['locations']:
print(f' Locations: {op["locations"][:60]}')
if op['news']:
print(f' Latest: {op["news"][0]["title"][:50]}')Step 3: Export enriched data for CRM
Export scored and enriched operator data to CSV for sales team import.
import csv
def export_enriched(operators):
filename = f'enriched_operators_{datetime.now().strftime("%Y%m%d")}.csv'
with open(filename, 'w', newline='') as f:
fields = ['score', 'name', 'brand', 'website', 'locations', 'news_count', 'revenue_signals_count']
writer = csv.writer(f)
writer.writerow(fields)
for op in operators:
writer.writerow([
op['score'], op['name'], op['brand'], op['website'],
op.get('locations', '')[:80], len(op['news']), len(op['revenue_signals'])
])
print(f'\n=== Enrichment Pipeline Summary ===')
print(f' Operators enriched: {len(operators)}')
print(f' High priority (70+): {sum(1 for o in operators if o["score"] >= 70)}')
print(f' Medium priority (40-69): {sum(1 for o in operators if 40 <= o["score"] < 70)}')
print(f' Low priority (<40): {sum(1 for o in operators if o["score"] < 40)}')
print(f' Exported to: {filename}')
print(f'\n Cost per operator: $0.010')
print(f' Total cost: ${len(operators) * 0.010:.3f}')
print(f' vs. ZoomInfo enrichment: $0.50-2.00/record')
export_enriched(scored)Python Example
import os, requests
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
def enrich(name, brand):
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': f'{name} franchise {brand}', 'country_code': 'us'}, timeout=10).json()
top = data.get('organic_results', [{}])[0]
print(f'{name}: {top.get("link", "no website")}')
enrich('Sun Holdings', 'Burger King')
print('Cost: $0.005')JavaScript Example
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
const data = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: SH,
body: JSON.stringify({ query: 'Sun Holdings franchise Burger King', country_code: 'us' })
}).then(r => r.json());
const top = (data.organic_results || [])[0];
console.log(`Website: ${top?.link || 'not found'}`);Expected Output
Sun Holdings | Website: https://sunholdings.net
News: 3 | Revenue signals: 2
Dhanani Group | Website: https://dhananigroup.com
News: 2 | Revenue signals: 1
Carrols Restaurant Group | Website: https://carrols.com
News: 3 | Revenue signals: 2
Cost: $0.030
=== Operator Priority Ranking ===
1. [ 90/100] Sun Holdings (Burger King)
Website: https://sunholdings.net
Locations: Operates over 1,000 restaurants across 7 states
=== Enrichment Pipeline Summary ===
Operators enriched: 3
High priority (70+): 2
Cost per operator: $0.010