{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Lead Finder & Client Opportunity Matcher (Laya & JEV AI)",
    "description": "Find local and online businesses that need your services. Scan websites for tech gaps, extract verified emails and phone numbers, and score sales readiness.",
    "version": "1.0",
    "x-build-id": "lpEG69SY8PKpgw5rB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eternallabs~b2b-lead-finder-client-opportunity-matcher-laya-jev-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eternallabs-b2b-lead-finder-client-opportunity-matcher-laya-jev-ai",
        "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/eternallabs~b2b-lead-finder-client-opportunity-matcher-laya-jev-ai/runs": {
      "post": {
        "operationId": "runs-sync-eternallabs-b2b-lead-finder-client-opportunity-matcher-laya-jev-ai",
        "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/eternallabs~b2b-lead-finder-client-opportunity-matcher-laya-jev-ai/run-sync": {
      "post": {
        "operationId": "run-sync-eternallabs-b2b-lead-finder-client-opportunity-matcher-laya-jev-ai",
        "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": [
          "searchQueries",
          "serviceToSell"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search queries / Business categories",
            "type": "array",
            "description": "Categories or keywords of businesses to target (e.g., 'restaurants', 'dentists', 'real estate agencies', 'lawyers').",
            "default": [
              "restaurants"
            ]
          },
          "locations": {
            "title": "Target locations / Cities",
            "type": "array",
            "description": "Locations, cities, or regions to search within (e.g., 'London, UK', 'Manchester, UK', 'New York, USA').",
            "default": [
              "London, UK"
            ]
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Optional country filter to focus geographic search.",
            "default": "United Kingdom"
          },
          "serviceToSell": {
            "title": "Your Service / Business Offering",
            "type": "string",
            "description": "What your business offers (e.g. 'web site, tech', 'web development', 'online booking integration', 'SEO', 'e-commerce'). The Actor matches prospect vulnerabilities to your offering and calculates their conversion probability.",
            "default": "web site, tech"
          },
          "maxResults": {
            "title": "Maximum businesses to process",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of qualified business leads to collect and analyze.",
            "default": 50
          },
          "analyzeWebsite": {
            "title": "Analyze websites & tech stack",
            "type": "boolean",
            "description": "Fetch and analyze the business website, detecting CMS, ecommerce, booking, SSL, mobile-friendliness, and performance.",
            "default": true
          },
          "findContacts": {
            "title": "Extract public contact details",
            "type": "boolean",
            "description": "Extract publicly visible emails, telephone numbers, and contact forms from websites and business profiles.",
            "default": true
          },
          "aiQualification": {
            "title": "AI qualification & custom pitch",
            "type": "boolean",
            "description": "Use AI to evaluate signals, synthesize problem points, and generate tailored sales pitches based strictly on verified facts.",
            "default": true
          },
          "includeSocialProfiles": {
            "title": "Detect social profiles",
            "type": "boolean",
            "description": "Identify LinkedIn, Instagram, Facebook, and X/Twitter profiles associated with the business.",
            "default": true
          },
          "minimumRating": {
            "title": "Minimum business rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Filter businesses by minimum review rating (0.0 to 5.0).",
            "default": 0
          },
          "minimumReviews": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Filter businesses by minimum number of customer reviews.",
            "default": 0
          },
          "crawlDepth": {
            "title": "Website crawl depth",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Depth of website crawling. Depth 1 inspects the homepage; Depth 2 also discovers and inspects contact/about pages.",
            "default": 2
          },
          "concurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of concurrent website analysis workers.",
            "default": 5
          },
          "language": {
            "title": "Language code",
            "type": "string",
            "description": "Language code for search results and output pitches.",
            "default": "en"
          },
          "discoverySource": {
            "title": "Business discovery provider",
            "enum": [
              "osm",
              "apify_google_places",
              "direct_seeds"
            ],
            "type": "string",
            "description": "Source for local business discovery. 'osm' uses OpenStreetMap Overpass (built-in, free, no key needed). 'apify_google_places' delegates to an Apify Google Maps actor. 'direct_seeds' processes direct seed lists.",
            "default": "osm"
          },
          "apifyGooglePlacesActorId": {
            "title": "Apify Google Places Actor ID",
            "type": "string",
            "description": "Apify Actor ID used if discoverySource is 'apify_google_places'.",
            "default": "compass/crawler-google-places"
          },
          "seedBusinesses": {
            "title": "Seed businesses (for direct_seeds mode)",
            "type": "array",
            "description": "Direct list of business objects with name, website, and city to analyze directly.",
            "default": []
          },
          "aiApiKey": {
            "title": "AI API Key",
            "type": "string",
            "description": "API key for AI qualification (OpenAI, Gemini, Groq, OpenRouter, Anthropic, or DeepSeek). Can also be provided via the AI_API_KEY environment variable."
          },
          "aiProvider": {
            "title": "AI Provider",
            "enum": [
              "openai",
              "gemini",
              "anthropic",
              "groq",
              "openrouter",
              "deepseek"
            ],
            "type": "string",
            "description": "Provider for AI qualification and pitch generation.",
            "default": "openai"
          },
          "aiModel": {
            "title": "AI Model name",
            "type": "string",
            "description": "Model ID to use for lead qualification (e.g., 'gpt-4o-mini', 'gemini-2.0-flash', 'claude-3-5-haiku-20241022', 'llama-3.3-70b-versatile').",
            "default": "gpt-4o-mini"
          },
          "aiBaseUrl": {
            "title": "Custom AI Base URL",
            "type": "string",
            "description": "Optional custom endpoint for OpenAI-compatible proxies or local models (e.g. Ollama, vLLM)."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}