{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Service Lead Qualifier",
    "description": "Rank local service businesses by outreach-readiness and return evidence-backed qualified leads.",
    "version": "0.5",
    "x-build-id": "DFfTOQuDEPjuTrxjb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rasputinkaiser~local-service-lead-qualifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rasputinkaiser-local-service-lead-qualifier",
        "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/rasputinkaiser~local-service-lead-qualifier/runs": {
      "post": {
        "operationId": "runs-sync-rasputinkaiser-local-service-lead-qualifier",
        "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/rasputinkaiser~local-service-lead-qualifier/run-sync": {
      "post": {
        "operationId": "run-sync-rasputinkaiser-local-service-lead-qualifier",
        "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": [
          "vertical",
          "locations"
        ],
        "properties": {
          "discoveryMode": {
            "title": "Discovery mode",
            "enum": [
              "demo",
              "providedCandidates",
              "livePlaces"
            ],
            "type": "string",
            "description": "Live places discovers real businesses on Google Maps for the given vertical and locations (this is the mode for real lead runs). Provided candidates scores business rows you already have. Demo emits three clearly fake sample businesses (.invalid domains) so you can verify the pipeline and output shape without any discovery spend.",
            "default": "demo"
          },
          "vertical": {
            "title": "Vertical",
            "type": "string",
            "description": "One local service vertical. Relevance-filtered verticals: HVAC, roofers, plumbers, dentists, lawyers, med spas, landscapers, pest control, electricians, garage door, cleaning, painters, locksmiths, movers, auto repair, veterinarians. Other verticals still work but without cross-vertical noise filtering.",
            "default": "HVAC"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Cities, counties, metros, or states to evaluate.",
            "items": {
              "type": "string"
            },
            "default": [
              "Dallas, TX"
            ]
          },
          "maxPlacesPerLocation": {
            "title": "Maximum places per location",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap for discovered or provided candidates per location. Live discovery and candidate evaluation are billed per place, so this cap bounds run cost.",
            "default": 50
          },
          "qualificationThreshold": {
            "title": "Qualification threshold",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only emit leads at or above this score.",
            "default": 65
          },
          "maxQualifiedLeads": {
            "title": "Maximum qualified leads",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many qualified leads are emitted, even if more candidates remain. Use this to control spend and list size.",
            "default": 100
          },
          "minimumReviewCount": {
            "title": "Minimum review count",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Skip candidates with fewer than this many public reviews before any scoring or billing. 0 keeps every credibility-gated candidate; 3 or more gives a firmer evidence floor for volume outreach.",
            "default": 0
          },
          "minimumEvidenceSignals": {
            "title": "Minimum evidence signals",
            "minimum": 2,
            "maximum": 8,
            "type": "integer",
            "description": "Minimum number of score reasons required before a lead can be emitted.",
            "default": 2
          },
          "excludeChains": {
            "title": "Exclude chains and franchises",
            "type": "boolean",
            "description": "Skip listings that look like national chains or franchises (known brand names, franchise unit markers like #1042, or the same name repeated 3+ times in one location's results). These are usually poor targets for SMB outreach. Filtered before any billing and counted in RUN_SUMMARY.filteredChains.",
            "default": false
          },
          "suppressBusinessIdentifiers": {
            "title": "Businesses to skip",
            "type": "array",
            "description": "Optional CRM suppression list for repeat runs. Add an exact website domain, business phone, public email, or business name for any company you already contacted or already manage. Matches are skipped before enrichment and billing; only the count is retained in RUN_SUMMARY.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "requireContactPath": {
            "title": "Require contact path",
            "type": "boolean",
            "description": "Only emit or score candidates with at least one public contact path such as phone, email, website, or Maps URL.",
            "default": true
          },
          "offerType": {
            "title": "Offer type",
            "type": "string",
            "description": "Suggested offer buyers can pitch to emitted leads.",
            "default": "Local SEO and conversion audit"
          },
          "includeWebsiteCrawl": {
            "title": "Include website crawl",
            "type": "boolean",
            "description": "Fetch candidate websites and infer conversion, recency, and hiring signals. Defaults to on for provided-candidate and live-place runs; demo mode skips crawling its non-resolvable fixture domains.",
            "default": true
          },
          "includeContactExtraction": {
            "title": "Include contact extraction",
            "type": "boolean",
            "description": "Extract public emails and social profile links from crawled candidate pages. Defaults to on for provided-candidate and live-place runs.",
            "default": true
          },
          "includeUpstreamContactEnrichment": {
            "title": "Include upstream contact enrichment",
            "type": "boolean",
            "description": "Enable the Google Maps Scraper's paid contact add-on (scrapeContacts) during live discovery. It extracts business emails and social profile links from each place's website far more reliably than this Actor's static crawl, at a small extra upstream cost per place (see the discovery Actor's pricing). Only applies to Live places mode.",
            "default": false
          },
          "maxWebsitePages": {
            "title": "Maximum website pages per candidate",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Crawl cap for homepage plus contact/about/careers pages found on the same website.",
            "default": 2
          },
          "websiteTimeoutSecs": {
            "title": "Website timeout seconds",
            "minimum": 3,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum time to wait for each website page request.",
            "default": 10
          },
          "debugRejected": {
            "title": "Debug rejected leads",
            "type": "boolean",
            "description": "Include below-threshold candidates in logs only, not dataset output.",
            "default": false
          },
          "placesActorId": {
            "title": "Place discovery Actor",
            "type": "string",
            "description": "Apify Store Actor used for live place discovery when discovery mode is Live places. Defaults to the Google Maps Scraper. An alternative Actor must accept searchStringsArray/locationQuery-style input and return items shaped like the Google Maps Scraper's (title/name, website, phone, categoryName/category, totalScore/rating, reviewsCount/reviewCount, url).",
            "default": "compass/crawler-google-places"
          },
          "parallelLocationDiscovery": {
            "title": "Parallel location discovery",
            "type": "boolean",
            "description": "Start the next location's discovery while the current location is still being evaluated (one location of lookahead). Cuts wall-clock time on multi-city runs. Off by default: if a run stops early at a lead or charge limit, the prefetched location's discovery has already been paid for.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used for this Actor's own website/contact enrichment requests. The discovery Actor manages its own proxying and does not receive this value.",
            "default": {
              "useApifyProxy": true
            }
          },
          "candidates": {
            "title": "Provided candidates",
            "type": "array",
            "description": "Optional candidate rows to score when discovery mode is Provided candidates.",
            "items": {
              "type": "object",
              "properties": {
                "businessName": {
                  "title": "Business name",
                  "description": "Business display name.",
                  "type": "string"
                },
                "location": {
                  "title": "Location",
                  "description": "Candidate location, such as Dallas, TX.",
                  "type": "string"
                },
                "address": {
                  "title": "Address",
                  "description": "Street address or formatted business address.",
                  "type": "string"
                },
                "phone": {
                  "title": "Phone",
                  "description": "Public business phone number.",
                  "type": "string"
                },
                "website": {
                  "title": "Website",
                  "description": "Business website URL.",
                  "type": "string"
                },
                "categoryName": {
                  "title": "Primary category",
                  "description": "Primary business category from the source listing, when available.",
                  "type": "string"
                },
                "categories": {
                  "title": "Categories",
                  "description": "Business categories from the source listing, when available.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "emails": {
                  "title": "Emails",
                  "description": "Public business email addresses.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "socialProfiles": {
                  "title": "Social profiles",
                  "description": "Public social profile URLs.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "rating": {
                  "title": "Rating",
                  "description": "Public review rating.",
                  "type": "number"
                },
                "reviewCount": {
                  "title": "Review count",
                  "description": "Number of public reviews.",
                  "type": "integer"
                },
                "hasBookingCta": {
                  "title": "Has booking CTA",
                  "description": "Whether the website has an obvious booking or contact call to action.",
                  "type": "boolean"
                },
                "hasRecentCopy": {
                  "title": "Has recent copy",
                  "description": "Whether the website appears to have recent service, offer, or promotion copy.",
                  "type": "boolean"
                },
                "hasHiringSignal": {
                  "title": "Has hiring signal",
                  "description": "Whether candidate evidence suggests hiring or growth.",
                  "type": "boolean"
                },
                "hasMultipleLocations": {
                  "title": "Has multiple locations",
                  "description": "Whether the business appears to operate multiple locations.",
                  "type": "boolean"
                },
                "competitiveDensity": {
                  "title": "Competitive density",
                  "description": "Estimated local competitive density for the vertical.",
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "sourceUrls": {
                  "title": "Source URLs",
                  "description": "Evidence URLs used to score this candidate.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "notes": {
                  "title": "Notes",
                  "description": "Optional caller-provided context for this candidate.",
                  "type": "string"
                }
              }
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}