{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Brasil — Leads Locais com E-mail, Telefone e CNPJ",
    "description": "Extraia leads locais do Google Maps no Brasil já com telefone, site, e-mail e o CNPJ da Receita Federal — pronto pra prospecção. Pague por resultado.",
    "version": "0.1",
    "x-build-id": "yTMEONl6481MKgpxu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/paulovitor18~gmaps-brasil-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-paulovitor18-gmaps-brasil-leads",
        "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~gmaps-brasil-leads/runs": {
      "post": {
        "operationId": "runs-sync-paulovitor18-gmaps-brasil-leads",
        "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~gmaps-brasil-leads/run-sync": {
      "post": {
        "operationId": "run-sync-paulovitor18-gmaps-brasil-leads",
        "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": {
          "termo": {
            "title": "Termo de busca",
            "type": "string",
            "description": "O que procurar no Google Maps, como você digitaria (ex.: \"restaurantes\", \"clínicas odontológicas\", \"farmácias\").",
            "default": "restaurantes"
          },
          "local": {
            "title": "Cidade / região",
            "type": "string",
            "description": "Cidade e UF do recorte (ex.: \"Florianópolis, SC\"). Quanto mais específico, mais preciso o resultado.",
            "default": "Florianópolis, SC"
          },
          "max_resultados": {
            "title": "Máximo de estabelecimentos",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Teto de estabelecimentos entregues nesta execução (controle de custo). O Google Maps costuma listar ~120 por busca; refine termo+cidade para varrer além disso. Para varreduras grandes, prefira DESLIGAR a hidratação (abaixo) — sem ela a coleta é rápida mesmo com muitos resultados.",
            "default": 40
          },
          "hidratar_detalhes": {
            "title": "Buscar contato de cada estabelecimento (telefone, site, CEP) — abre a ficha de cada um (mais lento)",
            "type": "boolean",
            "description": "Abre a ficha de detalhe de cada estabelecimento para extrair telefone, site, endereço completo, CEP e GPS preciso. É o passo que gera o lead de verdade, mas é o mais custoso (uma navegação extra por estabelecimento). Desligue para uma varredura rápida só com nome, categoria, nota e localização aproximada.",
            "default": true
          },
          "max_hidratacoes": {
            "title": "Teto de fichas de detalhe abertas",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Limita quantas fichas de detalhe abrir (o passo custoso acima). É o gargalo de tempo: cada ficha é uma navegação. O teto (100) cabe com folga na janela de execução; acima disso, rode em lotes por termo/cidade.",
            "default": 40
          },
          "enriquecer_cnpj": {
            "title": "Enriquecer com CNPJ + dados da Receita (quando o site publica o CNPJ)",
            "type": "boolean",
            "description": "Quando o estabelecimento tem site, visita o site uma vez para achar e-mail, redes sociais e o CNPJ; com o CNPJ válido, consulta a Receita Federal (razão social, situação cadastral, porte, capital, CNAE, sócios). É best-effort: muitos sites não publicam CNPJ em texto — nesses casos o campo volta vazio e você NÃO é cobrado pelo enriquecimento.",
            "default": true
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Roteamento de rede. O padrão (Apify Proxy, datacenter rotativo) foi medido devolvendo 200 no Google Maps sem captcha. Se ver bloqueio/consentimento em volume, selecione Residencial + país Brasil.",
            "default": {
              "useApifyProxy": true
            }
          },
          "self_test": {
            "title": "Modo diagnóstico (regressão do fixture-pack)",
            "type": "boolean",
            "description": "Não use em produção. Ignora a busca e roda a bateria de known-answers (parse do feed congelado, busca vazia, enriquecimento do Fleury, abstenção honesta) para provar que o parser e o egresso continuam corretos. Emite um único item 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}