{
  "openapi": "3.0.1",
  "info": {
    "title": "Lead Scorer and Enricher",
    "description": "Score a list of company URLs against your own scoring rules, then enrich the qualified ones with department-specific contacts (name, title, email, LinkedIn). Turns a raw domain list into an SDR-ready pitch list in one Run.",
    "version": "0.0",
    "x-build-id": "N7L5TtDBWlvU5pudE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/advantageous_subcontra~lead-scorer-and-enricher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-advantageous_subcontra-lead-scorer-and-enricher",
        "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/advantageous_subcontra~lead-scorer-and-enricher/runs": {
      "post": {
        "operationId": "runs-sync-advantageous_subcontra-lead-scorer-and-enricher",
        "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/advantageous_subcontra~lead-scorer-and-enricher/run-sync": {
      "post": {
        "operationId": "run-sync-advantageous_subcontra-lead-scorer-and-enricher",
        "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": [
          "companyUrls"
        ],
        "properties": {
          "companyUrls": {
            "title": "Company URLs",
            "type": "array",
            "description": "List of company websites to score and enrich. Accepts full URLs (https://acme.com) or bare domains (acme.com). Normalized internally.",
            "items": {
              "type": "string"
            }
          },
          "techScoringRules": {
            "title": "Tech-stack scoring rules",
            "type": "array",
            "description": "Weights added to a company's score when BuiltWith detects the named technology. Empty list skips the BuiltWith scoring step entirely.",
            "items": {
              "type": "object",
              "properties": {
                "tech": {
                  "type": "string",
                  "title": "Technology name",
                  "description": "Name of the technology to match against BuiltWith's technologies[].name (case-insensitive)."
                },
                "weight": {
                  "type": "number",
                  "title": "Weight",
                  "description": "Score delta added when the technology is detected. Negative values are allowed."
                }
              },
              "required": [
                "tech",
                "weight"
              ]
            },
            "default": []
          },
          "contentScoringRules": {
            "title": "Website-content scoring rules",
            "type": "array",
            "description": "Yes/no questions the LLM evaluates against each company's homepage markdown. Weight is added to the score when the LLM answers yes. Empty list skips the Website Content Crawler and LLM scoring step entirely.",
            "items": {
              "type": "object",
              "properties": {
                "question": {
                  "type": "string",
                  "title": "Yes/no question",
                  "description": "Question the LLM will evaluate against the homepage markdown. Phrase so a plain 'yes' means the company matches."
                },
                "weight": {
                  "type": "number",
                  "title": "Weight",
                  "description": "Score delta added when the LLM answers yes. Negative values are allowed."
                }
              },
              "required": [
                "question",
                "weight"
              ]
            },
            "default": []
          },
          "llmModel": {
            "title": "LLM model (OpenRouter id)",
            "type": "string",
            "description": "OpenRouter model id used for content scoring. Cheap defaults: openai/gpt-4o-mini, google/gemini-2.5-flash.",
            "default": "openai/gpt-4o-mini"
          },
          "qualificationThreshold": {
            "title": "Qualification threshold",
            "type": "number",
            "description": "Companies whose total score is greater than or equal to this value proceed to enrichment; the rest land in the droped_companies dataset.",
            "default": 0
          },
          "targetDepartments": {
            "title": "Target departments",
            "type": "array",
            "description": "Which departments to hunt for contacts in during enrichment. Mirrors vdrmota/contact-info-scraper's leadsEnrichmentDepartments field.",
            "items": {
              "type": "string",
              "enum": [
                "c_suite",
                "product",
                "engineering_technical",
                "design",
                "education",
                "finance",
                "human_resources",
                "information_technology",
                "legal",
                "marketing",
                "medical_health",
                "operations",
                "sales",
                "consulting"
              ],
              "enumTitles": [
                "C-Suite",
                "Product",
                "Engineering & Technical",
                "Design",
                "Education",
                "Finance",
                "Human Resources",
                "Information Technology",
                "Legal",
                "Marketing",
                "Medical & Health",
                "Operations",
                "Sales",
                "Consulting"
              ]
            },
            "default": [
              "marketing",
              "sales"
            ]
          },
          "maxLeadsPerCompany": {
            "title": "Max leads per company",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper bound on contacts discovered per qualified company. Cost multiplier: maxLeadsPerCompany x number-of-qualified-companies is the ceiling on billed leads. Apify only charges for leads successfully found.",
            "default": 3
          },
          "useScalelistFallback": {
            "title": "Use Scalelist email fallback",
            "type": "boolean",
            "description": "When enabled, any lead returned with a name but no email is retried via scalelist/email-finder. Small extra cost per resolved email.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}