ScavioScavio
ProductoPreciosDocumentación
Iniciar sesionComenzar
  1. Inicio
  2. Flujos de trabajo
  3. Google Maps Batch Exportar Pipeline
Flujo de trabajo

Google Maps Batch Exportar Pipeline

Batch exportar local business datos de Google Maps a traves de multiples categorias y cities en structured JSON for investigacion de mercado.

Comenzar gratisDocumentacion API

Resumen

Este flujo de trabajo exporta local business datos de Google a traves de multiples categoria y city combinations. It consultas Google local resultados for cada combination, extrae business names, ratings, resena counts, y addresses, y compiles everything en un structured conjunto de datos. El salida feeds investigacion de mercado, franchise scouting, y generacion de leads pipelines.

Desencadenador

Manual o programado (semanal)

Programación

Semanal o on-demand

Pasos del flujo de trabajo

1

Cargar categorias y cities

Leer el matrix of business categorias y objetivo cities de configuracion.

2

Consulta local resultados for cada combination

For cada category-city pair, call el Scavio API to obtener Google local pack resultados.

3

Extraer business datos

Analizar local pack resultados to obtener nombre, address, rating, resena conteo, y phone numero.

4

Deduplicate a traves de consultas

Eliminar duplicate businesses ese appear in multiples categoria searches for el same city.

5

Exportar to structured formato

Escribir el deduplicated conjunto de datos to JSON y optionally CSV for hoja de calculo importar.

6

Generar resumen statistics

Calcular promedio ratings, total businesses per city, y cobertura metricas.

Implementacion en Python

Python
import requests
import json
import time
import csv
from pathlib import Path
from datetime import datetime

API_KEY = "your_scavio_api_key"

CATEGORIES = ["coffee shops", "coworking spaces", "gyms", "restaurants"]
CITIES = ["Austin TX", "Denver CO", "Portland OR", "Nashville TN", "Raleigh NC"]

def fetch_local(category: str, city: str) -> list[dict]:
    res = requests.post(
        "https://api.scavio.dev/api/v1/search",
        headers={"x-api-key": API_KEY},
        json={"platform": "google", "query": f"{category} in {city}"},
        timeout=15,
    )
    res.raise_for_status()
    data = res.json()
    businesses = []
    for biz in data.get("local_pack", []):
        businesses.append({
            "name": biz.get("name", ""),
            "address": biz.get("address", ""),
            "rating": biz.get("rating"),
            "reviews": biz.get("reviews", 0),
            "phone": biz.get("phone", ""),
            "category": category,
            "city": city,
        })
    return businesses

def run():
    all_businesses = []
    seen = set()

    total_queries = len(CATEGORIES) * len(CITIES)
    completed = 0

    for category in CATEGORIES:
        for city in CITIES:
            businesses = fetch_local(category, city)
            for biz in businesses:
                key = f"{biz['name']}_{biz['address']}"
                if key not in seen:
                    seen.add(key)
                    all_businesses.append(biz)
            completed += 1
            if completed % 5 == 0:
                print(f"Progress: {completed}/{total_queries} queries")
                time.sleep(1)

    date = datetime.utcnow().strftime("%Y-%m-%d")

    # Export JSON
    json_path = Path(f"local_businesses_{date}.json")
    json_path.write_text(json.dumps(all_businesses, indent=2))

    # Export CSV
    csv_path = Path(f"local_businesses_{date}.csv")
    if all_businesses:
        with csv_path.open("w", newline="") as f:
            writer = csv.DictWriter(f, fieldnames=all_businesses[0].keys())
            writer.writeheader()
            writer.writerows(all_businesses)

    # Summary
    print(f"Export complete: {len(all_businesses)} unique businesses")
    print(f"  Categories: {len(CATEGORIES)} | Cities: {len(CITIES)}")
    print(f"  Avg rating: {sum(b['rating'] for b in all_businesses if b['rating']) / max(1, sum(1 for b in all_businesses if b['rating'])):.1f}")

if __name__ == "__main__":
    run()

Implementacion en JavaScript

JavaScript
const API_KEY = "your_scavio_api_key";

const CATEGORIES = ["coffee shops", "coworking spaces", "gyms", "restaurants"];
const CITIES = ["Austin TX", "Denver CO", "Portland OR", "Nashville TN", "Raleigh NC"];

async function fetchLocal(category, city) {
  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: `${category} in ${city}` }),
  });
  if (!res.ok) throw new Error(`scavio ${res.status}`);
  const data = await res.json();
  return (data.local_pack ?? []).map((biz) => ({
    name: biz.name ?? "",
    address: biz.address ?? "",
    rating: biz.rating ?? null,
    reviews: biz.reviews ?? 0,
    phone: biz.phone ?? "",
    category,
    city,
  }));
}

async function run() {
  const fs = await import("fs/promises");
  const allBusinesses = [];
  const seen = new Set();
  let completed = 0;
  const total = CATEGORIES.length * CITIES.length;

  for (const category of CATEGORIES) {
    for (const city of CITIES) {
      const businesses = await fetchLocal(category, city);
      for (const biz of businesses) {
        const key = `${biz.name}_${biz.address}`;
        if (!seen.has(key)) {
          seen.add(key);
          allBusinesses.push(biz);
        }
      }
      completed++;
      if (completed % 5 === 0) {
        console.log(`Progress: ${completed}/${total} queries`);
        await new Promise((r) => setTimeout(r, 1000));
      }
    }
  }

  const date = new Date().toISOString().slice(0, 10);
  await fs.writeFile(`local_businesses_${date}.json`, JSON.stringify(allBusinesses, null, 2));

  // CSV export
  if (allBusinesses.length) {
    const header = Object.keys(allBusinesses[0]).join(",");
    const rows = allBusinesses.map((b) => Object.values(b).map((v) => `"${String(v ?? "").replace(/"/g, '""')}"`).join(","));
    await fs.writeFile(`local_businesses_${date}.csv`, [header, ...rows].join("\n"));
  }

  const rated = allBusinesses.filter((b) => b.rating);
  const avgRating = rated.length ? rated.reduce((s, b) => s + b.rating, 0) / rated.length : 0;
  console.log(`Export: ${allBusinesses.length} unique businesses | Avg rating: ${avgRating.toFixed(1)}`);
}

run();

Plataformas utilizadas

Google

Búsqueda web con grafo de conocimiento, PAA y resúmenes de IA

Preguntas frecuentes

Este flujo de trabajo exporta local business datos de Google a traves de multiples categoria y city combinations. It consultas Google local resultados for cada combination, extrae business names, ratings, resena counts, y addresses, y compiles everything en un structured conjunto de datos. El salida feeds investigacion de mercado, franchise scouting, y generacion de leads pipelines.

Este flujo de trabajo usa un manual o programado (semanal). Semanal o on-demand.

Este flujo de trabajo usa las siguientes plataformas de Scavio: google. Cada plataforma se llama a traves del mismo endpoint de API unificado.

Si. El plan gratuito de Scavio incluye 50 creditos al registrarte sin tarjeta de credito. Es suficiente para probar y validar este flujo de trabajo antes de escalarlo.

Google Maps Batch Exportar Pipeline

Batch exportar local business datos de Google Maps a traves de multiples categorias y cities en structured JSON for investigacion de mercado.

Obtener tu clave APILeer la documentacion
ScavioScavio

API de busqueda en tiempo real para agentes de IA. Busca en todas las plataformas, no solo en Google.

Producto

  • Funciones
  • Precios
  • Panel
  • Afiliados

Desarrolladores

  • Documentacion
  • Referencia de API
  • Inicio rapido
  • Integracion MCP
  • Python SDK

Alternativas

  • Alternativa a Tavily
  • Alternativa a SerpAPI
  • Alternativa a Firecrawl
  • Alternativa a Exa

Herramientas

  • Formateador JSON
  • cURL a codigo
  • Contador de tokens
  • Todas las herramientas

© 2026 Scavio. Todos los derechos reservados.

Featured on TAAFT
Terminos de servicioPolitica de privacidad