Overview
This workflow enriches quick-service restaurant franchise location data weekly by querying Google for each location's current ratings, review counts, and competitive context. It identifies underperforming locations (low ratings), expansion opportunities (competitor gaps), and tracks operator performance trends. Designed for franchise development teams, suppliers, and consultants.
Trigger
Cron schedule (every Monday at 6 AM UTC)
Schedule
Runs every Monday at 6:00 AM UTC
Workflow Steps
Load franchise locations
Read the list of franchise brand + zip code combinations to enrich.
Query Google local results
For each location, query Scavio Google for the brand name + zip code.
Extract operator data
Parse ratings, review counts, addresses, and competitor mentions from results.
Flag performance issues
Identify locations with ratings below 3.5 or significant rating drops from previous week.
Generate territory report
Output enriched location data with performance flags and competitive density metrics.
Python Implementation
import requests
import json
from pathlib import Path
API_KEY = "your_scavio_api_key"
def enrich_qsr_operators(brand: str, zip_codes: list[str]) -> dict:
results = []
for zip_code in zip_codes:
res = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY},
json={"platform": "google", "query": f"{brand} {zip_code}"},
timeout=15,
)
if not res.ok:
continue
organic = res.json().get("organic", [])
for r in organic[:5]:
results.append({
"brand": brand,
"zip": zip_code,
"name": r.get("title", ""),
"snippet": r.get("snippet", ""),
"link": r.get("link", ""),
})
print(f"Enriched {len(results)} {brand} locations across {len(zip_codes)} zip codes")
Path(f"qsr_{brand.lower().replace(' ', '_')}_enrichment.json").write_text(json.dumps(results, indent=2))
return {"brand": brand, "locations": len(results), "zip_codes": len(zip_codes)}
result = enrich_qsr_operators("Subway", ["75001", "75002", "75003", "75004", "75005"])
print(f"Enrichment complete: {result['locations']} locations")JavaScript Implementation
const API_KEY = "your_scavio_api_key";
async function enrichQSR(brand, zipCodes) {
const results = [];
for (const zip of zipCodes) {
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", query: `${brand} ${zip}` }),
});
if (!res.ok) continue;
for (const r of ((await res.json()).organic ?? []).slice(0, 5)) {
results.push({ brand, zip, name: r.title ?? "", link: r.link ?? "" });
}
}
console.log(`Enriched ${results.length} ${brand} locations`);
return results;
}
await enrichQSR("Subway", ["75001", "75002", "75003"]);Platforms Used
Web search with knowledge graph, PAA, and AI overviews