{
  "openapi": "3.0.1",
  "info": {
    "title": "VoiceAI Auto-Prospect Finder",
    "description": "This actor combines Google Maps, Yelp, BBB, Facebook Graph, website crawling, email discovery, phone validation, and optional Apollo + OutScraper enrichment into one powerful data pipeline — giving you Tier A/B/C scored prospects with full business and contact details.",
    "version": "1.0",
    "x-build-id": "USr8R1Jf3QpXO7SXe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ronnie173~voiceai-prospect-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ronnie173-voiceai-prospect-finder",
        "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/ronnie173~voiceai-prospect-finder/runs": {
      "post": {
        "operationId": "runs-sync-ronnie173-voiceai-prospect-finder",
        "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/ronnie173~voiceai-prospect-finder/run-sync": {
      "post": {
        "operationId": "run-sync-ronnie173-voiceai-prospect-finder",
        "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": [
          "keywords",
          "locations"
        ],
        "properties": {
          "keywords": {
            "title": "Search Keywords",
            "minItems": 1,
            "type": "array",
            "description": "Business types or keywords to search for (e.g., 'roofer', 'roofing contractor', 'plumber')",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "minItems": 1,
            "type": "array",
            "description": "Cities or locations to search (e.g., 'Dallas, TX', 'Houston, TX')",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerLocation": {
            "title": "Max Results Per Location",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of prospects to collect per location",
            "default": 20
          },
          "gmapsProvider": {
            "title": "Google Maps Provider",
            "enum": [
              "apify",
              "outscraper"
            ],
            "type": "string",
            "description": "Choose your Google Maps data provider",
            "default": "apify"
          },
          "outscraperGmapsKey": {
            "title": "Outscraper API Key (for Google Maps)",
            "type": "string",
            "description": "Your Outscraper API key if using 'outscraper' as gmapsProvider. Get it from https://app.outscraper.com/"
          },
          "emailDiscovery": {
            "title": "Enable Email Discovery",
            "type": "boolean",
            "description": "Scrape business websites for email addresses",
            "default": true
          },
          "phoneValidation": {
            "title": "Enable Phone Validation",
            "type": "boolean",
            "description": "Validate and format phone numbers (requires PHONEVALIDATOR_KEY env variable)",
            "default": true
          },
          "enableOutscraper": {
            "title": "Enable Outscraper Email Enrichment",
            "type": "boolean",
            "description": "Use Outscraper to find additional emails (requires OUTSCRAPER_API_KEY env variable)",
            "default": false
          },
          "enableBBB": {
            "title": "Enable Better Business Bureau (BBB) Enrichment",
            "type": "boolean",
            "description": "Enrich prospects with BBB ratings and review counts (no API key required, web scraping)",
            "default": true
          },
          "enableApollo": {
            "title": "Enable Apollo Email Enrichment",
            "type": "boolean",
            "description": "Use Apollo.io for email pattern discovery (requires APOLLO_API_KEY env variable)",
            "default": false
          },
          "scoreWeights": {
            "title": "Scoring Weights",
            "type": "object",
            "description": "Customize prospect scoring weights (each 0-1, should sum to 1.0)"
          },
          "webhook": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Send results to this webhook URL (n8n, Make, Zapier, etc.)"
          },
          "pushToGHL": {
            "title": "Push to GoHighLevel",
            "type": "boolean",
            "description": "Automatically push qualified leads to GoHighLevel CRM",
            "default": false
          },
          "ghlApiKey": {
            "title": "GoHighLevel API Key",
            "type": "string",
            "description": "Your GHL API key (or use GHL_API_KEY env variable). Get from https://marketplace.gohighlevel.com/"
          },
          "ghlLocationId": {
            "title": "GoHighLevel Location ID",
            "type": "string",
            "description": "Your GHL Location ID (or use GHL_LOCATION_ID env variable)"
          },
          "ghlPipelineId": {
            "title": "GoHighLevel Pipeline ID (Optional)",
            "type": "string",
            "description": "Pipeline ID for creating opportunities (or use GHL_PIPELINE_ID env variable)"
          },
          "ghlStageId": {
            "title": "GoHighLevel Stage ID (Optional)",
            "type": "string",
            "description": "Stage ID for opportunities (or use GHL_STAGE_ID env variable)"
          },
          "ghlSource": {
            "title": "GoHighLevel Source Tag",
            "type": "string",
            "description": "Source tag for contacts (defaults to 'VoiceAI Auto-Prospect')",
            "default": "VoiceAI Auto-Prospect"
          },
          "ghlSmartListId": {
            "title": "GoHighLevel Smart List/Workflow ID",
            "type": "string",
            "description": "Automatically add contacts to this smart list or workflow (optional)"
          },
          "ghlAutoAddTags": {
            "title": "Additional Auto-Add Tags",
            "type": "array",
            "description": "Extra tags to add to all contacts (e.g., 'VoiceAI-2024', 'Q4-Campaign')",
            "items": {
              "type": "string"
            }
          },
          "enableSlack": {
            "title": "Enable Slack Notifications",
            "type": "boolean",
            "description": "Send Tier A lead alerts to Slack (requires SLACK_WEBHOOK_URL env variable)",
            "default": false
          },
          "slackWebhookUrl": {
            "title": "Slack Webhook URL",
            "type": "string",
            "description": "Override SLACK_WEBHOOK_URL environment variable"
          },
          "enableTelegram": {
            "title": "Enable Telegram Notifications",
            "type": "boolean",
            "description": "Send Tier A lead alerts to Telegram (requires TELEGRAM_BOT_TOKEN env variable)",
            "default": false
          },
          "telegramBotToken": {
            "title": "Telegram Bot Token",
            "type": "string",
            "description": "Override TELEGRAM_BOT_TOKEN environment variable"
          },
          "telegramChatId": {
            "title": "Telegram Chat ID",
            "type": "string",
            "description": "Your Telegram chat ID for notifications"
          },
          "yelpApiKey": {
            "title": "Yelp API Key",
            "type": "string",
            "description": "Yelp Fusion API key for additional business data"
          },
          "facebookToken": {
            "title": "Facebook Graph API Token",
            "type": "string",
            "description": "Facebook token for social media signals"
          },
          "debug": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable detailed logging for troubleshooting",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}