{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Cold Outreach Personalization",
    "description": "Transform cold outreach with AI-powered personalization. This Actor scrapes lead data from websites and generates highly personalized cold emails, LinkedIn DMs, and WhatsApp messages at scale. Stop sending generic messages—let AI research each lead and craft personalized outreach for you.",
    "version": "0.0",
    "x-build-id": "DCoDQnjXv6MtkebTQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/happitap~ai-cold-outreach-personalization/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-happitap-ai-cold-outreach-personalization",
        "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/happitap~ai-cold-outreach-personalization/runs": {
      "post": {
        "operationId": "runs-sync-happitap-ai-cold-outreach-personalization",
        "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/happitap~ai-cold-outreach-personalization/run-sync": {
      "post": {
        "operationId": "run-sync-happitap-ai-cold-outreach-personalization",
        "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": [
          "leads",
          "business",
          "openaiApiKey"
        ],
        "properties": {
          "leads": {
            "title": "Leads",
            "type": "array",
            "description": "Array of leads to process. Each lead should have at minimum a website URL or company name."
          },
          "collect": {
            "title": "Data Collection Settings",
            "type": "object",
            "description": "Configure how data is collected from lead sources",
            "default": {
              "sources": {
                "website": true,
                "linkedin": false,
                "googleMaps": false
              },
              "maxPagesPerSite": 5,
              "includePaths": [
                "/",
                "/pricing",
                "/features",
                "/about",
                "/contact",
                "/solutions"
              ],
              "excludePatterns": [
                "privacy",
                "terms",
                "cookie",
                "login"
              ],
              "timeoutMs": 45000,
              "render": "playwright"
            }
          },
          "extract": {
            "title": "Fact Extraction Settings",
            "type": "object",
            "description": "Configure what facts to extract from collected data",
            "default": {
              "mode": "facts",
              "fields": [
                "whatTheyDo",
                "whoTheyServe",
                "pricingSignals",
                "techStackSignals",
                "trustSignals",
                "painPointsHints",
                "recentUpdatesHints",
                "callToActionFound"
              ]
            }
          },
          "generation": {
            "title": "Message Generation Settings",
            "type": "object",
            "description": "Configure how personalized messages are generated",
            "default": {
              "language": "en",
              "tone": "professional",
              "personalizationLevel": "high",
              "templates": {
                "coldEmail": true,
                "linkedinDm": true,
                "whatsapp": true
              },
              "variants": 3,
              "maxWords": {
                "coldEmail": 140,
                "linkedinDm": 70,
                "whatsapp": 45
              },
              "include": {
                "subjectLines": 5,
                "openingLines": 5,
                "ctaOptions": 3
              },
              "compliance": {
                "noMedicalClaims": true,
                "noGuarantees": true,
                "noSpammyWords": true
              }
            }
          },
          "business": {
            "title": "Your Business Information",
            "type": "object",
            "description": "Information about your company and offer to personalize messages",
            "default": {
              "yourCompanyName": "Your Company",
              "yourOffer": "What you're selling and how it helps",
              "proof": [
                "Social proof point 1",
                "Social proof point 2"
              ],
              "cta": "Open to a quick call this week?"
            }
          },
          "delivery": {
            "title": "Delivery Settings",
            "type": "object",
            "description": "Configure how results are delivered",
            "default": {
              "webhookUrl": "",
              "onlySendIfScoreGte": 0.55
            }
          },
          "openaiApiKey": {
            "title": "OpenAI API Key",
            "type": "string",
            "description": "Your OpenAI API key for AI-powered message generation. Get one at https://platform.openai.com/api-keys"
          },
          "openaiModel": {
            "title": "OpenAI Model",
            "enum": [
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4-turbo",
              "gpt-3.5-turbo"
            ],
            "type": "string",
            "description": "OpenAI model to use for generation",
            "default": "gpt-4o-mini"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}