{
  "openapi": "3.0.1",
  "info": {
    "title": "Lead Formatter Tool for Cold Email",
    "description": "Clean, format, and enhance lead data using AI for cold email campaigns and lead management. Automatically standardizes names, companies, and job titles using advanced language models. Perfect for sales teams, marketers, and businesses that need properly formatted lead data for professional outreach.",
    "version": "1.0",
    "x-build-id": "KbMzdndsHMFkr8lUs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~lead-formatter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-lead-formatter",
        "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/parseforge~lead-formatter/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-lead-formatter",
        "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/parseforge~lead-formatter/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-lead-formatter",
        "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": [
          "leadsFile"
        ],
        "properties": {
          "leadsFile": {
            "title": "Leads File",
            "type": "string",
            "description": "Upload your leads file containing contact information to format and enrich. Supported formats: JSON (array of objects), XLSX/Excel (first sheet used), CSV. The tool automatically detects column names (case-insensitive) and supports variations like 'First Name', 'first_name', 'firstName', etc. Required fields: email. Optional fields: firstName, lastName, companyName, jobTitle, country, website, personalPhone, homePhone, domain."
          },
          "removeBlanks": {
            "title": "Remove Blank Leads",
            "type": "boolean",
            "description": "Automatically remove leads that have no data in any field. This helps clean your dataset by filtering out completely empty records. Useful when processing large lists with incomplete data. Default: false (keeps all leads).",
            "default": false
          },
          "removeDuplicates": {
            "title": "Remove Duplicates",
            "type": "boolean",
            "description": "Remove duplicate leads based on email address. If multiple leads have the same email, only the first occurrence is kept. This ensures each contact appears only once in your final dataset. Default: false (keeps all leads including duplicates).",
            "default": false
          },
          "formatJobTitle": {
            "title": "Format Job Title",
            "type": "boolean",
            "description": "Format job titles with proper capitalization and professional standards. Examples: 'ceo' → 'CEO', 'vice president of sales' → 'Vice President of Sales', 'cto' → 'CTO'. Keeps abbreviations uppercase and applies title case formatting. Default: true (recommended for professional appearance).",
            "default": true
          },
          "formatCompanyName": {
            "title": "Format Company Name",
            "type": "boolean",
            "description": "Format company names with proper capitalization and remove business suffixes (Inc., LLC, Corp., Ltd.) for cold email personalization. Examples: 'apple inc' → 'Apple', 'microsoft corporation' → 'Microsoft'. This makes company names more personal and natural for email outreach. Default: true (recommended for cold emails).",
            "default": true
          },
          "formatPersonalPhone": {
            "title": "Format Personal Phone",
            "type": "boolean",
            "description": "Standardize personal phone numbers to a consistent format. Converts various formats (e.g., '123-456-7890', '(123) 456-7890', '1234567890') to E.164 international format (e.g., '+11234567890') or local format. Ensures phone numbers are properly formatted for CRM systems and international dialing. Default: true.",
            "default": true
          },
          "formatHomePhone": {
            "title": "Format Home Phone",
            "type": "boolean",
            "description": "Standardize home phone numbers to a consistent format. Converts various formats to E.164 international format or local format. Ensures phone numbers are properly formatted for CRM systems. Default: true.",
            "default": true
          },
          "generateCompanyDescription": {
            "title": "Generate Company Description",
            "type": "boolean",
            "description": "AI-generated brief company description based on available company information (name, website, domain). Useful for enriching your lead database with company context. The description helps you understand what each company does before reaching out. Default: false (enables AI content generation, increases cost slightly).",
            "default": false
          },
          "generatePersonalizedLine": {
            "title": "Generate Personalized Line",
            "type": "boolean",
            "description": "AI-generated personalized opening line for cold emails based on lead information (name, company, job title). These opening lines are tailored to each lead and can significantly improve email reply rates. Example: 'Hi John, I noticed you're the CEO at Apple - I'd love to discuss...' Default: false (enables AI content generation, increases cost slightly).",
            "default": false
          },
          "pullCaseStudy": {
            "title": "Pull Case Study",
            "type": "boolean",
            "description": "AI-generated brief case study or success story relevant to the company's industry. Useful for personalizing outreach with industry-specific examples and social proof. Helps establish credibility in your cold emails. Default: false (enables AI content generation, increases cost slightly).",
            "default": false
          },
          "generateIndustry": {
            "title": "Generate Industry",
            "type": "boolean",
            "description": "Automatically identify and generate the primary industry for each company. Returns 1-3 words (e.g., 'Technology', 'Healthcare', 'Financial Services'). Useful for segmentation, targeting, and personalization. Helps organize leads by industry for targeted campaigns. Default: false (enables industry identification, increases cost slightly).",
            "default": false
          },
          "segmentBy": {
            "title": "Segment By",
            "type": "array",
            "description": "Group leads into segments based on specified fields. Each segment is saved to a separate dataset for easy download and targeted campaigns. Example: ['country', 'jobTitle', 'industry'] creates segments like 'country:USA | jobTitle:CEO | industry:Technology'. Each segment gets its own dataset that you can download separately. Useful for organizing leads by location, role, or industry for targeted outreach.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort By",
            "type": "string",
            "description": "Sort all leads by a specific field before output. Enter the field name (e.g., 'companyName', 'country', 'jobTitle', 'industry', 'email'). Leads will be ordered alphabetically or numerically based on this field. Use with 'Sort Order' to control ascending/descending. Useful for organizing output in a specific order."
          },
          "sortOrder": {
            "title": "Sort Order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Control the sort direction when using 'Sort By'. 'asc' = ascending (A-Z, 0-9), 'desc' = descending (Z-A, 9-0). Default: 'asc' (alphabetical order).",
            "default": "asc"
          },
          "fieldConfigurations": {
            "title": "Field Configurations",
            "type": "object",
            "description": "Advanced: Customize how specific fields are processed and named in output. Each field can have: 'enabled' (boolean - enable/disable field), 'customPrompt' (string - max 100 chars - custom AI instruction), 'outputColumn' (string - custom column name in output). Example: {\"companyDescription\": {\"customPrompt\": \"Based on company information identify industry make it less than 3 word, do not include dashes, do not include parenthesis\", \"outputColumn\": \"Company Description\"}}. Useful for customizing AI behavior and mapping fields to your CRM column names."
          },
          "temperature": {
            "title": "Temperature",
            "type": "string",
            "description": "Control AI creativity and consistency (0-2). Lower values (0.1-0.3) = more consistent, deterministic results. Higher values (0.7-1.0) = more creative, varied results. Recommended: 0.3 for consistent formatting. Use higher values only if you want more creative AI-generated content. Enter as decimal (e.g., 0.3). Default: 0.3."
          },
          "enableWebSearch": {
            "title": "Enable Web Search",
            "type": "boolean",
            "description": "Enable web search to enrich lead data with real-time information from the internet. When enabled, the AI will automatically search the web for company information, industry details, case studies, and other relevant data to enhance your leads. Useful for getting up-to-date company descriptions, industry classifications, and personalized insights. Default: false (enables web search, increases processing time and cost).",
            "default": false
          },
          "millionVerifierApiKey": {
            "title": "Million Verifier API Key",
            "type": "string",
            "description": "Optional: Your Million Verifier API key for email verification. If provided, each email address is verified before output. Verification status is added as 'verifiedEmail' field with values: 'valid' (deliverable), 'invalid' (undeliverable), 'unknown' (cannot verify), 'disposable' (disposable email), 'catch_all' (catch-all domain). Helps improve email deliverability by identifying invalid emails. Get your API key from https://www.millionverifier.com/. Leave empty to skip email verification."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}