{
  "openapi": "3.0.1",
  "info": {
    "title": "Email Pattern Finder - Discover Company Email Formats",
    "description": "Detect the email naming convention any company uses (first.last, flast, first_last, etc.) from public sources — website, GitHub, WHOIS, and Hunter.io. Generate verified email addresses for any person. Bulk domain processing. $0.10/domain.",
    "version": "1.0",
    "x-build-id": "XwVFxgIhsHNVkz4rH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~email-pattern-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-email-pattern-finder",
        "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~email-pattern-finder/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-email-pattern-finder",
        "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~email-pattern-finder/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-email-pattern-finder",
        "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": [
          "domains"
        ],
        "properties": {
          "domains": {
            "title": "Company Domains",
            "maxItems": 500,
            "type": "array",
            "description": "List of company domains to analyze (e.g., stripe.com, buffer.com). One result per domain.",
            "items": {
              "type": "string"
            },
            "default": [
              "apify.com"
            ]
          },
          "knownEmails": {
            "title": "Known Emails (optional)",
            "type": "array",
            "description": "Pre-discovered emails to help with pattern detection. Format: [{\"email\": \"jane.doe@company.com\", \"name\": \"Jane Doe\"}]",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "title": "Email address",
                  "description": "A known email from this domain"
                },
                "name": {
                  "type": "string",
                  "title": "Person name",
                  "description": "Full name of the person (optional, improves accuracy)"
                }
              },
              "required": [
                "email"
              ]
            }
          },
          "names": {
            "title": "Names to Generate Emails For (optional)",
            "type": "array",
            "description": "Names to generate email candidates for using the detected pattern. Format: [{\"name\": \"John Smith\", \"domain\": \"stripe.com\"}]",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "title": "Person name",
                  "description": "Full name to generate an email for"
                },
                "domain": {
                  "type": "string",
                  "title": "Company domain",
                  "description": "Domain to generate the email at"
                }
              },
              "required": [
                "name",
                "domain"
              ]
            }
          },
          "goal": {
            "title": "Goal",
            "enum": [
              "quick-outreach",
              "high-deliverability",
              "max-coverage"
            ],
            "type": "string",
            "description": "Sets sensible defaults. quick-outreach = fast, no verification, fewer sources. high-deliverability = thorough, verifies every candidate, raises send-decision threshold. max-coverage = all sources + verification.",
            "default": "high-deliverability"
          },
          "autoFilter": {
            "title": "Auto-filter results",
            "enum": [
              "send-now-only",
              "safe-only",
              "max-coverage",
              "none"
            ],
            "type": "string",
            "description": "Drop records that don't pass the filter before they hit the dataset (and before PPE charging). send-now-only = SEND_NOW only. safe-only = SEND_NOW + VERIFY_FIRST. max-coverage = everything except SKIP. none = passthrough.",
            "default": "none"
          },
          "compareToPrevRun": {
            "title": "Compare to previous run",
            "type": "boolean",
            "description": "Persist a per-domain snapshot in a key-value store and emit changeSinceLastRun on each record (PATTERN_CHANGED, NEW_EMAILS_FOUND, CATCH_ALL_FLIPPED_ON, etc.). Lets you schedule daily and only act on changes.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitor state key (optional)",
            "type": "string",
            "description": "Key-value store name for cross-run snapshots. Auto-derived from your domain list if omitted. Override only if you want to share state across runs with different domain lists."
          },
          "searchWebsite": {
            "title": "Search company website",
            "type": "boolean",
            "description": "Scrape the company website for publicly listed emails to improve pattern detection."
          },
          "searchGitHub": {
            "title": "Search GitHub",
            "type": "boolean",
            "description": "Search public GitHub commits for employee emails from the domain."
          },
          "searchWhois": {
            "title": "Search WHOIS/RDAP",
            "type": "boolean",
            "description": "Look up domain registration data for registrant email addresses. Works best for smaller companies where the owner's email is in the WHOIS record."
          },
          "verifyEmails": {
            "title": "Verify generated emails",
            "type": "boolean",
            "description": "Verify generated email candidates using MX record checks and deliverability testing. Adds verified status, confidence, and catch-all detection."
          },
          "hunterApiKey": {
            "title": "Hunter.io API Key (optional)",
            "type": "string",
            "description": "Your Hunter.io API key for additional email discovery. Free tier gives 25 searches/month. Get a key at https://hunter.io/api-keys"
          },
          "enableProFallback": {
            "title": "Auto-retry JavaScript / blocked sites with Pro",
            "type": "boolean",
            "description": "Off by default. Enable when you're running pattern detection on JavaScript SPAs, Cloudflare-protected sites, or DataDome-protected sites and the website source returns nothing.",
            "default": false
          },
          "crmWebhookUrl": {
            "title": "CRM webhook URL (HubSpot / Salesforce / Make / Zapier)",
            "type": "string",
            "description": "HTTPS endpoint to receive lead payloads. Each generated email triggers one POST (or one POST per domain when no generated emails). Failures retry 2× with backoff; 5 consecutive failures disable pushing for the rest of the run."
          },
          "crmFormat": {
            "title": "CRM payload format",
            "enum": [
              "generic-json",
              "hubspot",
              "salesforce"
            ],
            "type": "string",
            "description": "Pick a payload shape that matches your CRM. Generic JSON sends the full pattern record (use this for Make.com / Zapier / n8n).",
            "default": "generic-json"
          },
          "crmOnlyTierA": {
            "title": "Only push Tier-A leads to CRM",
            "type": "boolean",
            "description": "When enabled, only push records with sendDecision.action='SEND_NOW', bounceRiskBucket='low', and valid MX records. Recommended for outbound sales — keeps your CRM clean of low-quality patterns."
          },
          "exportFormats": {
            "title": "Outreach-tool CSV exports",
            "uniqueItems": true,
            "type": "array",
            "description": "Pick one or more outreach-tool CSV formats to generate. Leave empty to skip CSV generation.",
            "items": {
              "type": "string",
              "enum": [
                "instantly",
                "smartlead",
                "apollo"
              ],
              "enumTitles": [
                "Instantly.ai CSV",
                "Smartlead CSV",
                "Apollo CSV"
              ]
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to use for website scraping."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}