Overview
Local SEO agencies need business data: NAP consistency, review counts, ratings, categories, and competitor presence. This workflow searches Google Maps for businesses in a target area, enriches each result with Google Search data for web presence verification, and outputs a structured dataset ready for SEO audits or lead qualification. One pipeline replaces manual directory checks.
Trigger
On-demand per client engagement, or weekly for ongoing monitoring.
Schedule
Weekly
Workflow Steps
Define Target Area and Categories
Set the geographic area (city, zip code) and business categories to search.
Search Google Maps for Businesses
Call Scavio with google-maps platform to find businesses matching the criteria.
Extract Business Details
Parse name, address, phone, rating, review count, website, and category from Maps results.
Verify Web Presence via Google Search
For each business, run a Google search to check if they have an actual website and how they rank.
Output Structured Dataset
Save results as CSV or JSON with all business fields, web presence flags, and SEO opportunity scores.
Python Implementation
import requests, os, json, csv
API_KEY = os.environ["SCAVIO_API_KEY"]
H = {"x-api-key": API_KEY, "Content-Type": "application/json"}
def search_maps(query: str) -> list:
resp = requests.post(
"https://api.scavio.dev/api/v1/search",
headers=H,
json={"query": query, "platform": "google-maps"},
timeout=15,
)
return resp.json().get("local_results", [])
def check_web_presence(business_name: str, city: str) -> dict:
resp = requests.post(
"https://api.scavio.dev/api/v1/search",
headers=H,
json={"query": f"{business_name} {city}", "country_code": "us"},
timeout=15,
)
results = resp.json().get("organic_results", [])
has_website = any(business_name.lower().replace(" ", "") in r.get("link", "").lower().replace(" ", "") for r in results[:5])
return {"has_website": has_website, "google_results": len(results)}
def collect_local_data(categories: list, city: str):
all_businesses = []
for cat in categories:
query = f"{cat} in {city}"
maps_results = search_maps(query)
for biz in maps_results:
name = biz.get("title", "")
web = check_web_presence(name, city)
all_businesses.append({
"name": name,
"address": biz.get("address", ""),
"phone": biz.get("phone", ""),
"rating": biz.get("rating", ""),
"reviews": biz.get("reviews", 0),
"category": cat,
"has_website": web["has_website"],
"google_results": web["google_results"],
})
return all_businesses
businesses = collect_local_data(["plumber", "dentist", "accountant"], "Austin TX")
print(f"Collected {len(businesses)} businesses")
no_website = [b for b in businesses if not b["has_website"]]
print(f"Without website: {len(no_website)} (lead opportunities)")JavaScript Implementation
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function searchMaps(query) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {method:'POST', headers:H, body:JSON.stringify({query, platform:'google-maps'})});
return (await r.json()).local_results || [];
}
async function checkWebPresence(businessName, city) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {method:'POST', headers:H, body:JSON.stringify({query:businessName+' '+city, country_code:'us'})});
const results = (await r.json()).organic_results || [];
const hasWebsite = results.slice(0,5).some(r=>(r.link||'').toLowerCase().replace(/ /g,'').includes(businessName.toLowerCase().replace(/ /g,'')));
return {hasWebsite, googleResults:results.length};
}
async function collectLocalData(categories, city) {
const all = [];
for (const cat of categories) {
const mapsResults = await searchMaps(cat+' in '+city);
for (const biz of mapsResults) {
const name = biz.title || '';
const web = await checkWebPresence(name, city);
all.push({name, address:biz.address||'', phone:biz.phone||'', rating:biz.rating||'', reviews:biz.reviews||0, category:cat, hasWebsite:web.hasWebsite, googleResults:web.googleResults});
}
}
return all;
}
const businesses = await collectLocalData(['plumber','dentist','accountant'], 'Austin TX');
console.log('Collected '+businesses.length+' businesses');
const noWebsite = businesses.filter(b=>!b.hasWebsite);
console.log('Without website: '+noWebsite.length+' (lead opportunities)');Platforms Used
Google Maps
Local business search with ratings and contact info
Web search with knowledge graph, PAA, and AI overviews