{
  "openapi": "3.0.1",
  "info": {
    "title": "Lead Enrichment Pipeline — Email, Firmographics & ICP",
    "description": "Takes raw lead lists from any source and returns deduplicated, enriched, scored records. The value-add layer that sits on top of your scrapers.",
    "version": "1.0",
    "x-build-id": "LRgLLfsj1ZH9KseKZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prooflio~lead-enrichment-pipeline/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prooflio-lead-enrichment-pipeline",
        "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/prooflio~lead-enrichment-pipeline/runs": {
      "post": {
        "operationId": "runs-sync-prooflio-lead-enrichment-pipeline",
        "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/prooflio~lead-enrichment-pipeline/run-sync": {
      "post": {
        "operationId": "run-sync-prooflio-lead-enrichment-pipeline",
        "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": {
          "records": {
            "title": "Inline lead records",
            "type": "array",
            "description": "Raw lead objects to process. Field names are auto-mapped (e.g. company / organization / companyName all map to companyName). Combine with 'inputDatasetId' to merge sources."
          },
          "inputDatasetId": {
            "title": "Input dataset ID",
            "type": "string",
            "description": "ID of an existing dataset (e.g. the output of a scraper Actor) whose items are loaded as leads and merged with any inline records. This is the 'chain on top of your scrapers' input."
          },
          "fieldMap": {
            "title": "Custom field mapping",
            "type": "object",
            "description": "Override or extend the default field aliasing. Keys are source field names, values are one of: fullName, firstName, lastName, jobTitle, email, phone, linkedinUrl, companyName, website, country, city, source."
          },
          "dedupEnabled": {
            "title": "Deduplicate / resolve entities",
            "type": "boolean",
            "description": "Merge duplicate leads (same email globally, or same company + fuzzy-matched name). Field values are merged with provenance tracking.",
            "default": true
          },
          "fuzzyThreshold": {
            "title": "Fuzzy name match threshold",
            "minimum": 0.5,
            "maximum": 1,
            "type": "number",
            "description": "Jaro-Winkler similarity (0-1) above which two names within the same company are treated as the same person. Higher = stricter.",
            "default": 0.92
          },
          "findMissingEmails": {
            "title": "Guess missing emails",
            "type": "boolean",
            "description": "When a lead has a name + company domain but no email, generate ranked candidate addresses from common patterns (first.last@, flast@, etc.). Guessed emails are flagged isGuessed=true and never claimed as verified.",
            "default": true
          },
          "verifyEmails": {
            "title": "Verify emails",
            "type": "boolean",
            "description": "Validate syntax, check the domain's MX records (real DNS lookup), and flag disposable / role-based addresses. Mailbox-level (SMTP) verification requires a provider — see emailVerifierApiKey.",
            "default": true
          },
          "emailVerifierApiKey": {
            "title": "Email verifier API key (optional)",
            "type": "string",
            "description": "Optional. If set, enables mailbox-level verification via your provider hook in src/email.ts (e.g. ZeroBounce, NeverBounce). Leave empty to use free MX + heuristic verification only."
          },
          "enrichFirmographics": {
            "title": "Enrich firmographics",
            "type": "boolean",
            "description": "Resolve company-level attributes from the domain: industry classification, detected tech stack, and MX presence. Results are cached per domain so overlapping lists don't re-pay.",
            "default": true
          },
          "fetchHomepage": {
            "title": "Fetch company homepage",
            "type": "boolean",
            "description": "Allow firmographics to fetch the company homepage to infer industry and detect tech signals. Disable for a faster, network-free run that uses only DNS-level signals.",
            "default": true
          },
          "firmographicsApiKey": {
            "title": "Firmographics provider API key (optional)",
            "type": "string",
            "description": "Optional. If set, enables your paid firmographics provider hook in src/firmographics.ts (e.g. People Data Labs, Clearbit) for headcount, revenue, etc. Leave empty to use free inference only."
          },
          "icp": {
            "title": "Ideal Customer Profile (scoring config)",
            "type": "object",
            "description": "Defines how each enriched lead is scored 0-100. Omit to skip scoring."
          },
          "suppressionList": {
            "title": "Suppression list",
            "type": "array",
            "description": "Emails or domains to drop entirely (compliance / opt-outs / competitors). Matching leads are excluded from the output.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxRecords": {
            "title": "Max records to process",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on input records after loading (0 = no limit). Useful for test runs.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel enrichment workers. Keep modest when fetching homepages to be polite.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used when fetching company homepages. Recommended on the platform to avoid blocks.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}