{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B SaaS Account Qualifier for AI Agents",
    "description": "Qualify B2B SaaS account URLs into AI-ready lead records with hiring demand, source evidence, compact rows, and next-action routing.",
    "version": "0.1",
    "x-build-id": "CeLrCpRn9bNN5ZdSV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepapi~b2b-saas-lead-qualifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepapi-b2b-saas-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/deepapi~b2b-saas-lead-qualifier/runs": {
      "post": {
        "operationId": "runs-sync-deepapi-b2b-saas-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/deepapi~b2b-saas-lead-qualifier/run-sync": {
      "post": {
        "operationId": "run-sync-deepapi-b2b-saas-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",
        "properties": {
          "companyUrls": {
            "title": "Company URLs",
            "type": "array",
            "description": "Public company website URLs or bare domains to qualify. Localhost, private-network, and invalid entries are skipped and reported in the run diagnostics.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "Optional search queries used to discover B2B SaaS companies when company URLs are not provided.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Optional geography signal used for search discovery and confidence scoring."
          },
          "maxCompanies": {
            "title": "Max Companies",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of accepted company URLs to crawl and valid company leads to return.",
            "default": 100
          },
          "includeContactEmails": {
            "title": "Include Contact Emails",
            "type": "boolean",
            "description": "Extract public contact emails from company websites.",
            "default": true
          },
          "includeLinkedInCompanyUrl": {
            "title": "Include LinkedIn Company URL",
            "type": "boolean",
            "description": "Extract public LinkedIn company links from company websites.",
            "default": true
          },
          "requireContactEmail": {
            "title": "Require Contact Email",
            "type": "boolean",
            "description": "Clean mode: return only leads with at least one public contact email. Requires Include Contact Emails.",
            "default": false
          },
          "requireLinkedInCompanyUrl": {
            "title": "Require LinkedIn Company URL",
            "type": "boolean",
            "description": "Clean mode: return only leads with a public LinkedIn company URL. Requires Include LinkedIn Company URL.",
            "default": false
          },
          "requireJobPostingUrl": {
            "title": "Require Job Posting URL",
            "type": "boolean",
            "description": "Clean mode: return only leads with at least one matched public job posting URL.",
            "default": false
          },
          "roleKeywords": {
            "title": "Role Keywords",
            "type": "array",
            "description": "Keywords used to classify hiring signals.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": [
              "sales",
              "account executive",
              "customer success",
              "marketing",
              "engineer"
            ]
          },
          "maxOpenRolesPerCompany": {
            "title": "Max Open Roles Per Company",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of matched role titles and posting URLs to include per company. The total open role count and grouped keyword summary still reflect all matched roles.",
            "default": 25
          },
          "minConfidence": {
            "title": "Minimum Confidence",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Minimum confidence score required before a lead is returned.",
            "default": 0.6
          },
          "enableLlmEnrichment": {
            "title": "Enable LLM Enrichment",
            "type": "boolean",
            "description": "Use LiteLLM after deterministic qualification to add ICP fit, buyer persona, sales angle, and next-step guidance. Requires LiteLLM environment variables.",
            "default": false
          },
          "llmModelTier": {
            "title": "LLM Model Tier",
            "enum": [
              "cheap",
              "default",
              "premium"
            ],
            "type": "string",
            "description": "LiteLLM model tier to use when LLM enrichment is enabled. Mapped from CHEAP_MODEL, DEFAULT_MODEL, and PREMIUM_MODEL environment variables.",
            "default": "default"
          },
          "maxLlmEnrichedLeads": {
            "title": "Max LLM Enriched Leads",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of valid leads to enrich with LiteLLM in one run.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}