{
  "openapi": "3.0.1",
  "info": {
    "title": "Contact Scraper BR — Email, WhatsApp + Receita Federal (CNPJ)",
    "description": "Bulk website contact scraper for Brazilian B2B lead enrichment. Finds emails, phones, WhatsApp links, contact pages, forms, and social profiles — then exports a CRM-ready CSV (one row per company, 26 columns) that imports directly into Google Sheets, Excel, Pipedrive, HubSpot, or RD Station.",
    "version": "0.2",
    "x-build-id": "1gefKZaFUPlsaaSgo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/joaosbp~website-contact-finder-br/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-joaosbp-website-contact-finder-br",
        "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/joaosbp~website-contact-finder-br/runs": {
      "post": {
        "operationId": "runs-sync-joaosbp-website-contact-finder-br",
        "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/joaosbp~website-contact-finder-br/run-sync": {
      "post": {
        "operationId": "run-sync-joaosbp-website-contact-finder-br",
        "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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Business websites",
            "type": "array",
            "description": "Public business website URLs to scan for contact channels.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Maximum websites",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of websites processed in one run.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Concurrent websites",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of websites processed concurrently. Use a lower value with browser rendering.",
            "default": 3
          },
          "useBrowser": {
            "title": "Render JavaScript pages",
            "type": "boolean",
            "description": "Use Playwright for JavaScript-heavy websites. Keep disabled for faster and cheaper HTTP processing.",
            "default": false
          },
          "followContactPages": {
            "title": "Follow contact pages",
            "type": "boolean",
            "description": "Follow same-domain contact/support links discovered on each homepage and merge their contact channels into one result.",
            "default": false
          },
          "maxSecondaryPages": {
            "title": "Maximum secondary pages per website",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Strict per-domain budget for discovered contact pages. Only used when contact-page following is enabled.",
            "default": 2
          },
          "maxRetries": {
            "title": "Maximum retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retry attempts for transient network, timeout, 429, or server errors.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for each website request or browser navigation.",
            "default": 20
          },
          "maxContentBytes": {
            "title": "Maximum response size",
            "minimum": 50000,
            "maximum": 5000000,
            "type": "integer",
            "description": "Maximum bytes read from each website to protect memory and control cost.",
            "default": 2000000
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration. Most public business websites do not require a proxy.",
            "default": {
              "useApifyProxy": false
            }
          },
          "enrichCnpj": {
            "title": "Enrich with Receita Federal (CNPJ)",
            "type": "boolean",
            "description": "Detect CNPJ on each website and enrich with public Receita Federal data (razão social, porte, situação cadastral, CNAE, município/UF) via BrasilAPI. Adds a lead score boost. Free, no auth required.",
            "default": true
          },
          "googleSheets": {
            "title": "Google Sheets export (optional)",
            "type": "object",
            "description": "Export results directly to Google Sheets without downloading CSV. Requires spreadsheet ID and auth (service account JSON or API key).",
            "properties": {
              "spreadsheetId": {
                "title": "Spreadsheet ID",
                "type": "string",
                "description": "The ID from the Google Sheets URL (between /d/ and /edit)"
              },
              "sheetName": {
                "title": "Sheet/tab name",
                "type": "string",
                "description": "Name of the sheet tab to write to",
                "default": "Leads"
              },
              "apiKey": {
                "title": "Google API key",
                "type": "string",
                "description": "Google Cloud API key with Sheets API enabled (simpler, requires shared/public sheet)"
              },
              "serviceAccountJson": {
                "title": "Service account JSON",
                "type": "string",
                "description": "Full service account JSON key for full automation (no user interaction)"
              },
              "mode": {
                "title": "Write mode",
                "type": "string",
                "enum": [
                  "append",
                  "overwrite"
                ],
                "description": "append: add rows to existing data; overwrite: replace all data",
                "default": "append"
              }
            }
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "URL to receive run completion notification with top leads (Slack, Discord, Make, n8n, Zapier, custom endpoint)."
          },
          "webhookSecret": {
            "title": "Webhook secret (optional)",
            "type": "string",
            "description": "Bearer token for webhook authentication."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}