{
  "openapi": "3.0.1",
  "info": {
    "title": "Email Lead List Quality & Deduplication Audit",
    "description": "Audit email lead lists for syntax, exact duplicates, company-domain alignment, contact coverage, role/free-provider labels, and supplied verification evidence. Read an Apify dataset or inline rows; never scrape, send mail, verify mailboxes, delete records, or output personal names.",
    "version": "0.1",
    "x-build-id": "2hwazqW3oweYpXyf5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/8tp~email-lead-list-quality-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-8tp-email-lead-list-quality-audit",
        "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/8tp~email-lead-list-quality-audit/runs": {
      "post": {
        "operationId": "runs-sync-8tp-email-lead-list-quality-audit",
        "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/8tp~email-lead-list-quality-audit/run-sync": {
      "post": {
        "operationId": "run-sync-8tp-email-lead-list-quality-audit",
        "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": {
          "source_dataset_id": {
            "title": "Source lead dataset",
            "type": "string",
            "description": "Optional Apify dataset containing lead rows. Selecting it grants this limited-permission Actor read access only to that dataset and takes precedence over inline rows."
          },
          "leads": {
            "title": "Email lead rows",
            "minItems": 1,
            "maxItems": 10000,
            "type": "array",
            "description": "Inline rows for a quick audit. Common Compass business-leads, Apollo-style, nested organization, and flat generic fields are recognized automatically.",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "default": [
              {
                "companyId": "company-a",
                "companyName": "North Plumbing",
                "companyWebsite": "https://north-plumbing.example",
                "companyPhoneNumber": "+1 312 555 0100",
                "email": "hello@north-plumbing.example",
                "emailVerification": {
                  "result": "ok",
                  "free": false,
                  "role": true
                }
              },
              {
                "organization": {
                  "name": "North Plumbing",
                  "website_url": "https://north-plumbing.example"
                },
                "work_email": "HELLO@north-plumbing.example",
                "first_name": "Sample",
                "last_name": "Contact",
                "title": "Operations"
              },
              {
                "company_name": "Lake Electric",
                "website": "https://lake-electric.example",
                "email_address": "team@gmail.com",
                "phone": "312-555-0200"
              },
              {
                "company_name": "Roof Supply",
                "email": "not-an-email",
                "country": "US"
              }
            ]
          },
          "source_contract": {
            "title": "Source field contract",
            "enum": [
              "auto",
              "compass_business_leads",
              "apollo_style",
              "generic",
              "custom"
            ],
            "type": "string",
            "description": "Choose a reviewed source family for row labels, or auto for alias detection. This does not authenticate provenance or endorse an upstream provider.",
            "default": "auto"
          },
          "field_map": {
            "title": "Custom field mapping",
            "type": "object",
            "description": "Optional semantic-to-source dotted paths. Use with custom or to override individual aliases. Person-name and job-title values are measured for presence only and never copied to output.",
            "properties": {
              "stable_id": {
                "type": "string",
                "title": "Stable company ID field",
                "description": "Dotted path to a company or account identifier. Only presence is reported; the value is never emitted."
              },
              "emails": {
                "type": "string",
                "title": "Email string or array field",
                "description": "Dotted path to one email string or an array of emails."
              },
              "company_name": {
                "type": "string",
                "title": "Company name field",
                "description": "Dotted path to the company or public business name."
              },
              "website": {
                "type": "string",
                "title": "Company website field",
                "description": "Dotted path to a website URL or hostname."
              },
              "phones": {
                "type": "string",
                "title": "Phone string or array field",
                "description": "Dotted path to one phone or an array of phones."
              },
              "full_name": {
                "type": "string",
                "title": "Full contact-name field",
                "description": "Dotted path measured for presence only; the value is never emitted."
              },
              "first_name": {
                "type": "string",
                "title": "First-name field",
                "description": "Dotted path measured for presence only; the value is never emitted."
              },
              "last_name": {
                "type": "string",
                "title": "Last-name field",
                "description": "Dotted path measured for presence only; the value is never emitted."
              },
              "job_title": {
                "type": "string",
                "title": "Job-title field",
                "description": "Dotted path measured for presence only; the value is never emitted."
              },
              "linkedin": {
                "type": "string",
                "title": "Contact LinkedIn field",
                "description": "Dotted path measured for presence only; the URL or ID is never emitted."
              },
              "city": {
                "type": "string",
                "title": "Company city field",
                "description": "Dotted path used only to mark location coverage."
              },
              "state": {
                "type": "string",
                "title": "Company state/region field",
                "description": "Dotted path used only to mark location coverage."
              },
              "country": {
                "type": "string",
                "title": "Company country field",
                "description": "Dotted path used only to mark location coverage."
              },
              "verification_result": {
                "type": "string",
                "title": "Upstream verification-result field",
                "description": "Dotted path to a caller-supplied result label; allowlisted values are preserved as evidence, not re-verified."
              },
              "verification_free": {
                "type": "string",
                "title": "Upstream free-provider flag field",
                "description": "Dotted path to a caller-supplied boolean flag."
              },
              "verification_role": {
                "type": "string",
                "title": "Upstream role-address flag field",
                "description": "Dotted path to a caller-supplied boolean flag."
              }
            },
            "default": {},
            "additionalProperties": false
          },
          "required_fields": {
            "title": "Structurally ready fields",
            "minItems": 1,
            "maxItems": 8,
            "uniqueItems": true,
            "type": "array",
            "description": "Select the observed fields that define structurally ready for this run. Every percentage is an unweighted count across this exact list.",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "company_name",
                "website",
                "phone",
                "name",
                "job_title",
                "linkedin",
                "location"
              ]
            },
            "default": [
              "email",
              "company_name",
              "website"
            ]
          },
          "max_rows": {
            "title": "Maximum source rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on selected-dataset rows read and analyzed in one run.",
            "default": 25000
          },
          "max_source_bytes": {
            "title": "Maximum retained source bytes",
            "minimum": 1024,
            "maximum": 134217728,
            "type": "integer",
            "description": "Hard cap on compact canonical JSON bytes retained from either source mode before analysis.",
            "default": 33554432
          },
          "max_source_row_bytes": {
            "title": "Maximum bytes per source row",
            "minimum": 256,
            "maximum": 4194304,
            "type": "integer",
            "description": "Stop before retaining a source object whose compact canonical JSON exceeds this size.",
            "default": 1048576
          },
          "max_scorecard_rows": {
            "title": "Maximum lead scorecards",
            "minimum": 0,
            "maximum": 25000,
            "type": "integer",
            "description": "Cap scorecards before publication. Non-invalid rows form the planned paid prefix; effective summaries cover only delivered scorecards.",
            "default": 10000
          },
          "max_duplicate_groups": {
            "title": "Maximum duplicate groups",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap exact normalized-email group records. Zero still computes duplicate row status and summary counts.",
            "default": 5000
          },
          "max_duplicate_group_size": {
            "title": "Maximum row numbers per group",
            "minimum": 2,
            "maximum": 500,
            "type": "integer",
            "description": "Cap row-number details inside each duplicate-email group without changing its total row count.",
            "default": 100
          },
          "include_company_names": {
            "title": "Include company names",
            "type": "boolean",
            "description": "Copy normalized company or public business names into lead scorecards. Human contact names are never copied.",
            "default": true
          },
          "include_contact_values": {
            "title": "Include supplied contact values",
            "type": "boolean",
            "description": "Off by default for data minimization. Enable to copy syntax-valid emails, normalized phones, and website hosts already present in supplied rows.",
            "default": false
          },
          "as_of": {
            "title": "Fixed report timestamp",
            "type": "string",
            "description": "Optional ISO 8601 timestamp for reproducible runs. It affects generated_at only and never changes source facts."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}