Overview
Extract business leads from Google Maps search results using a search API instead of scraping Google Maps directly. The workflow queries location-specific business searches, extracts business data (name, rating, address, phone), and outputs a lead list for outreach. No proxy rotation or CAPTCHA solving required.
Trigger
Daily cron at 06:30 UTC
Schedule
Daily at 06:30 UTC
Workflow Steps
Load location and category list
Read target business categories and locations from a config file. Example: 'plumbers in Austin TX', 'dentists in Portland OR'.
Query Google Maps
For each location-category pair, search the Google Maps platform endpoint to get local business results with ratings and contact info.
Deduplicate results
Compare against previously extracted businesses to avoid duplicate outreach. Match on business name and address.
Enrich with web presence
For new businesses, run a quick Google search to find their website, social profiles, and any recent news.
Output lead CSV
Write new leads to a CSV with: business name, category, address, phone, rating, review count, website, and enrichment notes.
Python Implementation
import requests, os, json, csv
from datetime import datetime
H = {"x-api-key": os.environ["SCAVIO_API_KEY"], "Content-Type": "application/json"}
def extract_leads(category, location, existing_names=set()):
r = requests.post("https://api.scavio.dev/api/v1/search", headers=H,
json={"platform": "google_maps", "query": f"{category} in {location}"}).json()
leads = []
for b in r.get("local_results", [])[:20]:
name = b.get("title", "")
if name in existing_names:
continue
leads.append({
"name": name,
"category": category,
"location": location,
"address": b.get("address", ""),
"phone": b.get("phone", ""),
"rating": b.get("rating", ""),
"reviews": b.get("reviews", 0),
"website": b.get("website", ""),
"extracted": datetime.now().strftime("%Y-%m-%d"),
})
return leads
leads = extract_leads("plumbers", "Austin TX")
print(f"Found {len(leads)} new leads")
for l in leads[:3]:
print(f" {l['name']} - {l['rating']} stars ({l['reviews']} reviews)")JavaScript Implementation
const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};
async function extractLeads(category, location, existingNames = new Set()) {
const r = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST", headers: H,
body: JSON.stringify({platform: "google_maps", query: `${category} in ${location}`})
}).then(r => r.json());
return (r.local_results || []).slice(0, 20)
.filter(b => !existingNames.has(b.title || ""))
.map(b => ({
name: b.title || "", category, location,
address: b.address || "", phone: b.phone || "",
rating: b.rating || "", reviews: b.reviews || 0,
website: b.website || "",
extracted: new Date().toISOString().split("T")[0],
}));
}
extractLeads("plumbers", "Austin TX").then(leads => {
console.log(`Found ${leads.length} new leads`);
leads.slice(0, 3).forEach(l =>
console.log(` ${l.name} - ${l.rating} stars (${l.reviews} reviews)`));
});