Overview
This workflow searches Google Maps for businesses matching a query and location, extracts structured details like name, address, phone, rating, and website, then enriches each lead with additional data before pushing to a CRM or spreadsheet. It is ideal for sales teams that need a repeatable pipeline for local lead sourcing without manual searching.
Trigger
Cron schedule (daily at 9 AM UTC) or manual trigger
Schedule
Runs daily at 9 AM UTC or on manual trigger
Workflow Steps
Define search parameters
Set the business type, location, and any filters such as minimum rating or review count.
Search Google Maps
Call the Scavio API with platform google-maps to find businesses matching the criteria.
Extract lead details
Parse each result for name, address, phone number, website, rating, and review count.
Deduplicate against existing leads
Compare extracted leads against the CRM or database to avoid creating duplicates.
Enrich with website data
For leads with a website, optionally fetch the homepage to extract email addresses or social profiles.
Push to CRM
Create new lead records in the CRM with all enriched fields attached.
Python Implementation
import requests
import json
API_KEY = "your_scavio_api_key"
def search_maps(query: str, location: str) -> list[dict]:
res = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY},
json={
"platform": "google-maps",
"query": f"{query} in {location}",
},
timeout=15,
)
res.raise_for_status()
data = res.json()
leads = []
for place in data.get("local_results", []):
leads.append({
"name": place.get("title"),
"address": place.get("address"),
"phone": place.get("phone"),
"website": place.get("website"),
"rating": place.get("rating"),
"reviews": place.get("reviews"),
})
return leads
def push_to_crm(leads: list[dict]):
# Replace with your CRM API call
for lead in leads:
print(f"Creating lead: {lead['name']} - {lead.get('phone', 'N/A')}")
def run():
queries = [
{"query": "plumber", "location": "Austin, TX"},
{"query": "dentist", "location": "Denver, CO"},
]
all_leads = []
for q in queries:
leads = search_maps(q["query"], q["location"])
all_leads.extend(leads)
print(f"Found {len(all_leads)} leads")
push_to_crm(all_leads)
if __name__ == "__main__":
run()JavaScript Implementation
const API_KEY = "your_scavio_api_key";
async function searchMaps(query, location) {
const res = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST",
headers: {
"x-api-key": API_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
platform: "google-maps",
query: `${query} in ${location}`,
}),
});
if (!res.ok) throw new Error(`scavio ${res.status}`);
const data = await res.json();
return (data.local_results ?? []).map((place) => ({
name: place.title,
address: place.address,
phone: place.phone,
website: place.website,
rating: place.rating,
reviews: place.reviews,
}));
}
async function pushToCrm(leads) {
// Replace with your CRM API call
for (const lead of leads) {
console.log(`Creating lead: ${lead.name} - ${lead.phone ?? "N/A"}`);
}
}
async function run() {
const queries = [
{ query: "plumber", location: "Austin, TX" },
{ query: "dentist", location: "Denver, CO" },
];
const allLeads = [];
for (const q of queries) {
const leads = await searchMaps(q.query, q.location);
allLeads.push(...leads);
}
console.log(`Found ${allLeads.length} leads`);
await pushToCrm(allLeads);
}
run();Platforms Used
Google Maps
Local business search with ratings and contact info