{
  "openapi": "3.0.1",
  "info": {
    "title": "Email Verifier, Phone & Lead Data Validator (DataTrust AI)",
    "description": "Enterprise data cleaning engine with MX DNS checks, disposable blocker, E.164 phone normalization, deduplication & AI quality scoring.",
    "version": "1.0",
    "x-build-id": "CRSWwRUGcZgoohMOV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/as33~email-verifier-phone-lead-data-validator-datatrust-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-as33-email-verifier-phone-lead-data-validator-datatrust-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/as33~email-verifier-phone-lead-data-validator-datatrust-ai/runs": {
      "post": {
        "operationId": "runs-sync-as33-email-verifier-phone-lead-data-validator-datatrust-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/as33~email-verifier-phone-lead-data-validator-datatrust-ai/run-sync": {
      "post": {
        "operationId": "run-sync-as33-email-verifier-phone-lead-data-validator-datatrust-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",
        "properties": {
          "inputRecords": {
            "title": "Direct Input Records (JSON Lead List)",
            "type": "array",
            "description": "Array of raw B2B lead records to clean and verify. E.g. [{\"name\": \"John Doe\", \"email\": \"john@example.com\", \"phone\": \"+1 555-0199\", \"website\": \"https://example.com\"}]"
          },
          "rawCsvText": {
            "title": "Raw CSV Lead Text (Optional)",
            "type": "string",
            "description": "Paste comma-separated CSV text directly here with headers (e.g. email, phone, company)."
          },
          "apifyDatasetId": {
            "title": "Apify Dataset ID (Scraper Integration)",
            "type": "string",
            "description": "Load lead records automatically from any Apify Scraper Dataset ID (Apollo, Google Maps, LinkedIn scrapers)."
          },
          "fieldMapping": {
            "title": "Custom Column Field Mapping",
            "type": "object",
            "description": "Map custom dataset columns to standard keys: { \"Contact Mail\": \"email\", \"Work Tel\": \"phone\", \"Company Site\": \"website\" }",
            "default": {}
          },
          "licenseKey": {
            "title": "Pro / Paid License Key (Optional)",
            "type": "string",
            "description": "Enter your license key or upgrade your Apify subscription to remove the 100-record free tier limit."
          },
          "enableDeduplication": {
            "title": "Enable Smart Lead Deduplication",
            "type": "boolean",
            "description": "Identify and flag duplicate contacts using intelligent multi-field composite matching.",
            "default": true
          },
          "deduplicationKeys": {
            "title": "Deduplication Keys",
            "type": "array",
            "description": "Fields used to determine duplicate records (e.g. ['email'], ['phone'], or ['email', 'phone']).",
            "default": [
              "email",
              "phone"
            ],
            "items": {
              "type": "string"
            }
          },
          "deduplicationAction": {
            "title": "Deduplication Strategy",
            "enum": [
              "flag_and_link",
              "filter_out",
              "keep_all_marked"
            ],
            "type": "string",
            "description": "Choose whether to flag duplicate records or filter secondary duplicates out of the primary dataset.",
            "default": "flag_and_link"
          },
          "normalizeTextCasing": {
            "title": "Standardize Name & Title Casing",
            "type": "boolean",
            "description": "Convert SHOUTING or all-lowercase names, company titles, and addresses into clean Title Case.",
            "default": true
          },
          "preserveOriginalFields": {
            "title": "Preserve Original Raw Values",
            "type": "boolean",
            "description": "Store untouched raw inputs inside '_raw' object to preserve original data transparency.",
            "default": true
          },
          "verifyEmails": {
            "title": "Enable Bulk Email Verification",
            "type": "boolean",
            "description": "Run multi-layer deliverability verification checks across all email inputs.",
            "default": true
          },
          "checkMxRecords": {
            "title": "Verify Live Domain MX & DNS Records",
            "type": "boolean",
            "description": "Perform live DNS resolution to confirm if the mail server exists and is ready to accept mail.",
            "default": true
          },
          "detectDisposableEmails": {
            "title": "Block Disposable / Temp Emails (800+ Domains)",
            "type": "boolean",
            "description": "Filter addresses against 800+ temporary/burner domains (Mailinator, TempMail, GuerrillaMail, etc.).",
            "default": true
          },
          "customDisposableDomains": {
            "title": "Custom Disposable Domains List",
            "type": "array",
            "description": "Add custom domains to block as disposable addresses.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "verifyWebsites": {
            "title": "Enable Website & URL Verification",
            "type": "boolean",
            "description": "Test URL reachability, track HTTP redirect chains, and verify target domain status.",
            "default": true
          },
          "extractWebMetadata": {
            "title": "Extract Public Page Title & Meta",
            "type": "boolean",
            "description": "Extract HTML page title and meta description from active websites.",
            "default": true
          },
          "httpTimeoutSeconds": {
            "title": "HTTP Request Timeout (seconds)",
            "minimum": 2,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum allowed duration (in seconds) for website ping attempts.",
            "default": 8
          },
          "normalizePhones": {
            "title": "Enable Phone Normalization (E.164)",
            "type": "boolean",
            "description": "Standardize raw phone numbers to international E.164 and national standard formats.",
            "default": true
          },
          "defaultCountryCode": {
            "title": "Default Country Code (ISO 3166-1 alpha-2)",
            "type": "string",
            "description": "Fallback country code when international prefix is missing (e.g. US, GB, DE, CA, AU).",
            "default": "US"
          },
          "enableEnrichment": {
            "title": "Enable Permitted Public Enrichment",
            "type": "boolean",
            "description": "Extract domain brand names, TLD categories, and public web metadata.",
            "default": true
          },
          "enableAiIntelligence": {
            "title": "Enable AI Intelligence Features (Gemini)",
            "type": "boolean",
            "description": "Use Gemini AI to semantically classify industries, detect anomalous values, and audit lead health.",
            "default": true
          },
          "generateExecutiveReport": {
            "title": "Generate AI Executive Quality Audit",
            "type": "boolean",
            "description": "Produce a comprehensive natural-language dataset health report detailing anomalies and fixes.",
            "default": true
          },
          "highQualityThreshold": {
            "title": "High Quality Score Threshold (Score >=)",
            "minimum": 50,
            "maximum": 95,
            "type": "integer",
            "description": "Minimum score required to classify a record as 'High Quality'.",
            "default": 80
          },
          "needsReviewThreshold": {
            "title": "Needs Review Score Threshold (Score >=)",
            "minimum": 20,
            "maximum": 75,
            "type": "integer",
            "description": "Minimum score required for 'Needs Review' tier before falling to 'Low Quality'.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Max Network Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of concurrent network requests for DNS and HTTP checks.",
            "default": 10
          },
          "batchSize": {
            "title": "Apify Dataset Batch Push Size",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "Number of records pushed per chunk to Apify Dataset.",
            "default": 25
          },
          "maxRecordsToProcess": {
            "title": "Max Records Safety Limit (0 = All)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper processing limit to control execution duration (0 = process all submitted records).",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}