{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B Lead Cleaner — Bulk Email Verification & Data Quality",
    "description": "Bulk email verification and lead list cleaning for any Apify dataset. Verify business emails with MX and deliverability checks, remove duplicates, catch role and disposable addresses, and flag off-target contacts with an explained ACCEPT, REVIEW or REJECT decision on every row.",
    "version": "0.0",
    "x-build-id": "IUx0Q5QL4boaDFOkr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kamerozkan~b2b-lead-cleaner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kamerozkan-b2b-lead-cleaner",
        "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/kamerozkan~b2b-lead-cleaner/runs": {
      "post": {
        "operationId": "runs-sync-kamerozkan-b2b-lead-cleaner",
        "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/kamerozkan~b2b-lead-cleaner/run-sync": {
      "post": {
        "operationId": "run-sync-kamerozkan-b2b-lead-cleaner",
        "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": {
          "datasetId": {
            "title": "Source Apify dataset",
            "type": "string",
            "description": "Select the dataset produced by any lead scraper. The Actor receives read-only access to this dataset and cannot access other account data. Leave empty when using pasted rows."
          },
          "rows": {
            "title": "Or paste lead rows",
            "maxItems": 5000,
            "type": "array",
            "description": "Useful for a quick test. When a source dataset is selected above, that dataset automatically takes priority over these example rows.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "qualityMode": {
            "title": "Quality mode",
            "enum": [
              "BALANCED",
              "STRICT",
              "CUSTOM"
            ],
            "type": "string",
            "description": "Balanced is recommended. Strict requires more company evidence. Custom uses the advanced rule overrides below.",
            "default": "BALANCED"
          },
          "maxItems": {
            "title": "Maximum leads to audit",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Start with 100 to inspect the decisions, then increase the limit.",
            "default": 1000
          },
          "targeting": {
            "title": "Optional targeting contract",
            "type": "object",
            "description": "When values are supplied, non-matching leads are rejected with an exact reason.",
            "properties": {
              "countries": {
                "title": "Accepted countries",
                "type": "array",
                "description": "Examples: United States, Germany, United Kingdom.",
                "editor": "stringList",
                "uniqueItems": true,
                "maxItems": 50,
                "items": {
                  "type": "string"
                }
              },
              "cities": {
                "title": "Accepted cities",
                "type": "array",
                "description": "Optional city targeting.",
                "editor": "stringList",
                "uniqueItems": true,
                "maxItems": 100,
                "items": {
                  "type": "string"
                }
              },
              "titleKeywords": {
                "title": "Accepted job title keywords",
                "type": "array",
                "description": "A lead passes when its title contains at least one value, for example CMO or Head of Growth.",
                "editor": "stringList",
                "uniqueItems": true,
                "maxItems": 100,
                "items": {
                  "type": "string"
                }
              },
              "excludedTitleKeywords": {
                "title": "Excluded job title keywords",
                "type": "array",
                "description": "Reject titles containing any of these values.",
                "editor": "stringList",
                "uniqueItems": true,
                "maxItems": 100,
                "items": {
                  "type": "string"
                }
              },
              "industries": {
                "title": "Accepted industries",
                "type": "array",
                "description": "A lead passes when its industry contains at least one value.",
                "editor": "stringList",
                "uniqueItems": true,
                "maxItems": 100,
                "items": {
                  "type": "string"
                }
              },
              "companyDomains": {
                "title": "Accepted company domains",
                "type": "array",
                "description": "Optional account list. Subdomains of an accepted domain also pass.",
                "editor": "stringList",
                "uniqueItems": true,
                "maxItems": 500,
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "rules": {
            "title": "Quality rule overrides",
            "type": "object",
            "description": "Defaults come from the selected quality mode. Set only the values you need to change.",
            "properties": {
              "requireEmail": {
                "title": "Require an email",
                "type": "boolean",
                "description": "Reject leads without an email address."
              },
              "checkMx": {
                "title": "Check email domain MX records",
                "type": "boolean",
                "description": "Confirm that the email domain is configured to receive mail. This does not claim that the individual mailbox exists."
              },
              "requireMx": {
                "title": "Require a valid MX result",
                "type": "boolean",
                "description": "Reject emails whose domain has no mail server. Temporary DNS errors are sent to REVIEW."
              },
              "rejectPersonalEmail": {
                "title": "Reject personal email providers",
                "type": "boolean",
                "description": "Reject Gmail, Yahoo, Outlook, Proton, and similar personal inboxes."
              },
              "rejectDisposableEmail": {
                "title": "Reject disposable email providers",
                "type": "boolean",
                "description": "Reject known temporary inbox domains."
              },
              "rejectRoleBasedEmail": {
                "title": "Reject role-based inboxes",
                "type": "boolean",
                "description": "Reject addresses such as info@, support@, and sales@. Balanced mode only warns."
              },
              "requireEmailCompanyDomainMatch": {
                "title": "Require email and company domain match",
                "type": "boolean",
                "description": "Reject a business email when its domain differs from the supplied company website."
              },
              "requireCompanyDomain": {
                "title": "Require a company domain",
                "type": "boolean",
                "description": "Strict mode requires company domain evidence. Balanced mode sends missing domains to REVIEW."
              },
              "checkWebsite": {
                "title": "Check company website reachability",
                "type": "boolean",
                "description": "Safely probe public company domains. Private and local network targets are never requested."
              },
              "requireWebsiteReachable": {
                "title": "Require a reachable company website",
                "type": "boolean",
                "description": "Reject confirmed unreachable domains. Blocked or uncertain responses go to REVIEW."
              },
              "maxAgeDays": {
                "title": "Maximum lead age in days",
                "type": "integer",
                "description": "When set, old evidence is rejected and missing timestamps go to REVIEW.",
                "minimum": 1,
                "maximum": 3650
              },
              "acceptScore": {
                "title": "Minimum ACCEPT score",
                "type": "integer",
                "description": "Rows below this score go to REVIEW unless a hard reject rule applies.",
                "minimum": 1,
                "maximum": 100
              },
              "reviewScore": {
                "title": "Minimum REVIEW score",
                "type": "integer",
                "description": "Rows below this score are rejected.",
                "minimum": 0,
                "maximum": 99
              },
              "sourceCostUsd": {
                "title": "Original lead batch cost",
                "type": "number",
                "description": "Optional. Used to calculate the real source cost per accepted lead.",
                "minimum": 0,
                "maximum": 1000000
              }
            },
            "additionalProperties": false
          },
          "fieldMap": {
            "title": "Manual field mapping",
            "type": "object",
            "description": "Usually unnecessary. Override auto-detection with dot paths such as contact.email or company.website.",
            "properties": {
              "fullName": {
                "title": "Full name path",
                "type": "string",
                "description": "Dot path for the contact's full name.",
                "editor": "textfield"
              },
              "title": {
                "title": "Job title path",
                "type": "string",
                "description": "Dot path for the contact's job title.",
                "editor": "textfield"
              },
              "email": {
                "title": "Email path",
                "type": "string",
                "description": "Dot path for the contact's email.",
                "editor": "textfield"
              },
              "phone": {
                "title": "Phone path",
                "type": "string",
                "description": "Dot path for the contact's phone.",
                "editor": "textfield"
              },
              "linkedin": {
                "title": "LinkedIn path",
                "type": "string",
                "description": "Dot path for the contact's LinkedIn URL.",
                "editor": "textfield"
              },
              "country": {
                "title": "Country path",
                "type": "string",
                "description": "Dot path for the contact's country.",
                "editor": "textfield"
              },
              "city": {
                "title": "City path",
                "type": "string",
                "description": "Dot path for the contact's city.",
                "editor": "textfield"
              },
              "companyName": {
                "title": "Company name path",
                "type": "string",
                "description": "Dot path for the company name.",
                "editor": "textfield"
              },
              "companyDomain": {
                "title": "Company domain path",
                "type": "string",
                "description": "Dot path for the company domain or website.",
                "editor": "textfield"
              },
              "industry": {
                "title": "Industry path",
                "type": "string",
                "description": "Dot path for the company industry.",
                "editor": "textfield"
              },
              "updatedAt": {
                "title": "Freshness timestamp path",
                "type": "string",
                "description": "Dot path for the lead's last update or verification time.",
                "editor": "textfield"
              }
            },
            "additionalProperties": false
          },
          "monitorName": {
            "title": "Monitoring list name",
            "maxLength": 80,
            "type": "string",
            "description": "Optional. Reuse the same name on scheduled runs to reject leads already seen in earlier runs."
          },
          "historyKey": {
            "title": "Legacy history key",
            "type": "string",
            "description": "Deprecated compatibility field for existing saved tasks. New integrations should use monitorName."
          },
          "maxConcurrency": {
            "title": "Maximum network concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Controls parallel MX and optional website checks."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}