{
  "openapi": "3.0.1",
  "info": {
    "title": "Leads Locales de Google Maps — Email, Teléfono, Web y CNPJ",
    "description": "Convierte cualquier búsqueda de Google Maps en una lista de leads lista para llamar: nombre, categoría, teléfono, sitio web, email, dirección completa y GPS. En negocios de Brasil resuelve además el CNPJ y el registro público. Paga por resultado.",
    "version": "0.1",
    "x-build-id": "XdqQVvLewoHZwf29B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/paulovitor18~google-maps-leads-locales/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-paulovitor18-google-maps-leads-locales",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/paulovitor18~google-maps-leads-locales/runs": {
      "post": {
        "operationId": "runs-sync-paulovitor18-google-maps-leads-locales",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/paulovitor18~google-maps-leads-locales/run-sync": {
      "post": {
        "operationId": "run-sync-paulovitor18-google-maps-leads-locales",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "search_term": {
            "title": "Término de búsqueda",
            "type": "string",
            "description": "Qué buscar en Google Maps, tal como lo escribirías tú (p. ej. \"restaurantes\", \"clínicas dentales\", \"farmacias\").",
            "default": "restaurantes"
          },
          "location": {
            "title": "Ciudad / zona",
            "type": "string",
            "description": "Ciudad y zona donde buscar (p. ej. \"Madrid, España\", \"Bogotá\", \"Ciudad de México\"). Cuanto más específico, más preciso el resultado. Funciona en cualquier búsqueda de Google Maps del mundo.",
            "default": "Madrid, España"
          },
          "max_results": {
            "title": "Máximo de negocios",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Límite de negocios entregados en esta ejecución (control de coste). Google Maps suele listar ~120 por búsqueda; afina el término y la ciudad para ir más allá. Para barridos grandes, mejor DESACTIVA el paso de detalle (abajo) — sin él la recogida es rápida aunque haya muchos resultados.",
            "default": 25
          },
          "hydrate_details": {
            "title": "Obtener el contacto de cada negocio (teléfono, web, código postal) — abre cada ficha (más lento)",
            "type": "boolean",
            "description": "Abre la ficha de detalle de cada negocio para extraer teléfono, sitio web, dirección completa, código postal y GPS exacto. Es el paso que convierte un nombre en un lead de verdad, y también el más caro (una navegación extra por negocio). Desactívalo para un barrido rápido con nombre, categoría, calificación y ubicación aproximada.",
            "default": true
          },
          "max_hydrations": {
            "title": "Límite de fichas de detalle abiertas",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Limita cuántas fichas de detalle se abren (el paso caro de arriba). El valor por defecto (25) está puesto para que una ejecución por defecto quepa dentro de la prueba diaria de 5 minutos de Apify; súbelo hasta 100 para barridos mayores — tú ejecutas sin esa prisa — y por encima de eso ejecuta por lotes de término y ciudad.",
            "default": 25
          },
          "enrich_from_website": {
            "title": "Enriquecer desde el sitio web del negocio (email, redes y registro brasileño CNPJ)",
            "type": "boolean",
            "description": "Cuando el negocio tiene sitio web, lo visita una vez para encontrar email, redes sociales y — en negocios de Brasil — el CNPJ. Con un CNPJ válido consulta el registro público (razón social, situación, tamaño, capital, actividad, socios). Es best-effort: muchos sitios no publican datos de contacto en texto, y fuera de Brasil no hay CNPJ que encontrar. En esos casos el campo queda vacío y NO se te cobra el enriquecimiento.",
            "default": true
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Enrutado de red. El valor por defecto (Apify Proxy, centro de datos rotativo) se midió devolviendo 200 en Google Maps sin captcha. Si ves bloqueo o muro de consentimiento con volumen, selecciona Residencial y un país cercano a tu zona objetivo.",
            "default": {
              "useApifyProxy": true
            }
          },
          "self_test": {
            "title": "Modo diagnóstico (regresión del paquete de fixtures)",
            "type": "boolean",
            "description": "No usar en producción. Omite la búsqueda y ejecuta la batería de respuestas conocidas (parseo del feed congelado, búsqueda vacía, enriquecimiento, abstención honesta, bloqueo-no-es-vacío) para probar que el parser y la salida de red siguen correctos. Emite un único registro de diagnóstico.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}