{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV Lead Processor — Clean, Dedupe & Normalize Lead Lists",
    "description": "Cleans and enriches Apollo, LinkedIn, and ZoomInfo CSV exports. Maps columns to a standard format, finds missing emails via website scraping and pattern detection, verifies deliverability, and exports a CRM-ready CSV. $0.05/lead.",
    "version": "1.0",
    "x-build-id": "U1MZmrJzfl2bsjUlX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~csv-lead-processor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-csv-lead-processor",
        "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/ryanclinton~csv-lead-processor/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-csv-lead-processor",
        "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/ryanclinton~csv-lead-processor/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-csv-lead-processor",
        "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",
        "required": [
          "columnMapping"
        ],
        "properties": {
          "csvUrl": {
            "title": "CSV file URL",
            "type": "string",
            "description": "Public URL to download a CSV file. Either this or csvBase64 is required. Supports http and https. Large files are streamed — no memory limit on file size."
          },
          "csvBase64": {
            "title": "CSV file (base64 encoded)",
            "type": "string",
            "description": "Base64-encoded CSV content. Use this when you cannot provide a public URL (e.g. uploading from a script). Either this or csvUrl is required.",
            "default": "Q29tcGFueSxXZWJzaXRlLEZpcnN0IE5hbWUsTGFzdCBOYW1lLEVtYWlsLFBob25lLEpvYiBUaXRsZSxJbmR1c3RyeSxFbXBsb3llZXMsQ291bnRyeQpBY21lIENvcnAsYWNtZWNvcnAuY29tLFNhcmFoLENoZW4sc2FyYWhAYWNtZWNvcnAuY29tLDU1NS0wMTAwLENUTyxUZWNobm9sb2d5LDUwLFVTCkJldGEgSW5kdXN0cmllcyxiZXRhaW5kdXN0cmllcy5jb20sSmFtZXMsV2lsc29uLGphbWVzQGJldGFpbmR1c3RyaWVzLmNvbSw1NTUtMDIwMCxWUCBTYWxlcyxNYW51ZmFjdHVyaW5nLDIwMCxVSw=="
          },
          "columnMapping": {
            "title": "Column mapping",
            "type": "object",
            "description": "Map your CSV header names to canonical field names. Keys are your CSV headers (exact or case-insensitive match). Values must be one of: companyName, website, domain, firstName, lastName, fullName, email, phone, title, linkedinUrl, industry, employeeCount, city, state, country, description, tags.",
            "default": {
              "Company": "companyName",
              "Website": "website",
              "First Name": "firstName",
              "Last Name": "lastName",
              "Email": "email",
              "Phone": "phone",
              "Job Title": "title",
              "Industry": "industry",
              "Employees": "employeeCount",
              "Country": "country"
            }
          },
          "enrichEmails": {
            "title": "Enrich missing emails",
            "type": "boolean",
            "description": "When enabled, rows with no email address will be enriched by calling website-contact-scraper (extracts emails from the company website) and email-pattern-finder (detects the email format pattern for the domain). All domains without emails are sent in a single batch call — not one call per row.",
            "default": false
          },
          "verifyEmails": {
            "title": "Verify email deliverability",
            "type": "boolean",
            "description": "When enabled, all email addresses (from CSV and enrichment) are verified via bulk-email-verifier using DNS MX checks and SMTP probing. Results include emailVerified, emailStatus, and emailConfidence fields.",
            "default": false
          },
          "deduplicateByDomain": {
            "title": "Deduplicate by domain",
            "type": "boolean",
            "description": "When enabled (default), only the first row per company domain is kept. Subsequent rows with the same domain are skipped. Requires the website or domain column to be mapped.",
            "default": true
          },
          "outputCsv": {
            "title": "Generate downloadable CSV",
            "type": "boolean",
            "description": "When enabled (default), the enriched leads are written as a UTF-8 CSV file (with BOM for Excel compatibility) to the actor's Key-Value Store. The download URL appears in the summary record.",
            "default": true
          },
          "outputColumns": {
            "title": "Output CSV columns",
            "type": "array",
            "description": "Canonical field names to include in the output CSV, in order. Leave blank to include all columns. Enrichment columns (enrichedEmails, emailStatus, etc.) are always appended.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "csvDelimiter": {
            "title": "CSV delimiter",
            "enum": [
              ",",
              ";",
              "\t"
            ],
            "type": "string",
            "description": "Field delimiter used for both input and output CSV. Use comma for standard CSV, semicolon for European locales, tab for TSV.",
            "default": ","
          },
          "maxRows": {
            "title": "Max rows to process",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of CSV rows to process. Set to 0 for unlimited. Useful for testing with a large CSV before a full run.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}