{
  "openapi": "3.0.1",
  "info": {
    "title": "Med Spa Lead Discovery - Emails, Scores & Personalization Hooks",
    "description": "Find med spa leads with emails, lead scores, and personalized outreach hooks. Built for agencies and SaaS companies targeting aesthetic clinics.",
    "version": "0.1",
    "x-build-id": "P57bLlHQI8yDvUlgx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/george.the.developer~medspa-lead-discovery-ppe/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-george.the.developer-medspa-lead-discovery-ppe",
        "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/george.the.developer~medspa-lead-discovery-ppe/runs": {
      "post": {
        "operationId": "runs-sync-george.the.developer-medspa-lead-discovery-ppe",
        "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/george.the.developer~medspa-lead-discovery-ppe/run-sync": {
      "post": {
        "operationId": "run-sync-george.the.developer-medspa-lead-discovery-ppe",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search keywords for discovering med spa leads.",
            "default": [
              "med spa",
              "medical aesthetics"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Geographic locations to search in.",
            "default": [
              "Los Angeles, CA"
            ],
            "items": {
              "type": "string"
            }
          },
          "seedUrls": {
            "title": "Seed URLs",
            "type": "array",
            "description": "Configure Seed URLs.",
            "items": {
              "type": "string"
            }
          },
          "seedCsvText": {
            "title": "Seed CSV Text",
            "type": "string",
            "description": "Optional CSV content for seed-domain mode. Supports URL and domain columns."
          },
          "seedCsvHasHeader": {
            "title": "Seed CSV Has Header",
            "type": "boolean",
            "description": "Configure Seed CSV Has Header.",
            "default": true
          },
          "seedCsvUrlColumn": {
            "title": "Seed CSV URL Column",
            "type": "string",
            "description": "Configure Seed CSV URL Column.",
            "default": "url"
          },
          "seedCsvDomainColumn": {
            "title": "Seed CSV Domain Column",
            "type": "string",
            "description": "Configure Seed CSV Domain Column.",
            "default": "domain"
          },
          "includeDomains": {
            "title": "Include Domains",
            "type": "array",
            "description": "Configure Include Domains.",
            "items": {
              "type": "string"
            }
          },
          "excludeDomains": {
            "title": "Exclude Domains",
            "type": "array",
            "description": "Configure Exclude Domains.",
            "items": {
              "type": "string"
            }
          },
          "maxLeads": {
            "title": "Max Leads",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of leads to discover.",
            "default": 5
          },
          "maxPagesPerDomainProbe": {
            "title": "Max Probe Pages Per Domain",
            "minimum": 1,
            "type": "integer",
            "description": "Configure Max Probe Pages Per Domain.",
            "default": 3
          },
          "maxPagesPerDomainDeep": {
            "title": "Max Deep Pages Per Domain",
            "minimum": 1,
            "type": "integer",
            "description": "Configure Max Deep Pages Per Domain.",
            "default": 8
          },
          "maxDepth": {
            "title": "Max Crawl Depth",
            "minimum": 1,
            "type": "integer",
            "description": "Configure Max Crawl Depth.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Configure Max Concurrency.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "type": "integer",
            "description": "Configure Max Retries.",
            "default": 2
          },
          "maxJsRenders": {
            "title": "Max JS Renders",
            "minimum": 0,
            "type": "integer",
            "description": "Configure Max JS Renders.",
            "default": 20
          },
          "maxRuntimeSeconds": {
            "title": "Max Runtime Seconds",
            "minimum": 10,
            "type": "integer",
            "description": "Maximum runtime in seconds before graceful stop.",
            "default": 300
          },
          "qualityThresholdOutreachReady": {
            "title": "Quality Threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Configure Quality Threshold.",
            "default": 65
          },
          "icpThreshold": {
            "title": "ICP Threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Configure ICP Threshold.",
            "default": 60
          },
          "probeScoreThreshold": {
            "title": "Probe Score Threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Configure Probe Score Threshold.",
            "default": 0.35
          },
          "nicheVerifierThreshold": {
            "title": "Niche Verifier Threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Configure Niche Verifier Threshold.",
            "default": 0.22
          },
          "nicheVerifierMinPositiveHits": {
            "title": "Niche Verifier Min Positive Hits",
            "minimum": 0,
            "type": "integer",
            "description": "Configure Niche Verifier Min Positive Hits.",
            "default": 2
          },
          "nicheVerifierMaxNegativeHits": {
            "title": "Niche Verifier Max Negative Hits",
            "minimum": 0,
            "type": "integer",
            "description": "Configure Niche Verifier Max Negative Hits.",
            "default": 2
          },
          "allowJsFallback": {
            "title": "Allow JS Fallback",
            "type": "boolean",
            "description": "Configure Allow JS Fallback.",
            "default": false
          },
          "sourceToggles": {
            "title": "Source Toggles",
            "type": "object",
            "description": "Configure Source Toggles.",
            "properties": {
              "search": {
                "title": "Search Source",
                "type": "boolean",
                "editor": "checkbox",
                "default": true,
                "description": "Configure search."
              },
              "directory": {
                "title": "Directory Source",
                "type": "boolean",
                "editor": "checkbox",
                "default": true,
                "description": "Configure directory."
              },
              "seed": {
                "title": "Seed Source",
                "type": "boolean",
                "editor": "checkbox",
                "default": true,
                "description": "Configure seed."
              }
            }
          },
          "externalActorReferences": {
            "title": "External Actor References (Blocked)",
            "type": "array",
            "description": "Configure External Actor References (Blocked).",
            "items": {
              "type": "string"
            }
          },
          "freshnessHours": {
            "title": "Domain Cache Freshness Hours",
            "minimum": 1,
            "type": "integer",
            "description": "Configure Domain Cache Freshness Hours.",
            "default": 72
          },
          "exportCsv": {
            "title": "Export CSV",
            "type": "boolean",
            "description": "Configure Export CSV.",
            "default": true
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "fast",
              "balanced",
              "high_precision"
            ],
            "type": "string",
            "description": "Configure Mode.",
            "default": "balanced"
          },
          "billing": {
            "title": "Billing Controls",
            "type": "object",
            "description": "Optional pay-per-event billing controls. Use only with PAY_PER_EVENT pricing model.",
            "properties": {
              "enablePaidEvents": {
                "title": "Enable Paid Events",
                "type": "boolean",
                "default": false,
                "description": "When true, the run attempts value-gated event charging."
              },
              "outreachLeadEventName": {
                "title": "Base Lead Event Name",
                "type": "string",
                "default": "outreach_ready_lead",
                "description": "Charged once per qualified outreach-ready lead."
              },
              "decisionMakerEventName": {
                "title": "Decision-Maker Event Name",
                "type": "string",
                "default": "decision_maker_direct_contact",
                "description": "Optional bonus event for decision-maker direct contacts."
              },
              "minIcpScore": {
                "title": "Billing Min ICP Score",
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "default": 70,
                "description": "Minimum ICP score required before charging."
              },
              "minQualityScore": {
                "title": "Billing Min Quality Score",
                "type": "integer",
                "minimum": 0,
                "maximum": 100,
                "default": 75,
                "description": "Minimum quality score required before charging."
              },
              "requirePersonalizationHook": {
                "title": "Require Personalization Hook",
                "type": "boolean",
                "default": true,
                "description": "Charge only if at least one personalization hook exists."
              },
              "requireDirectContact": {
                "title": "Require Direct Contact",
                "type": "boolean",
                "default": true,
                "description": "Charge only if direct business phone or email exists."
              },
              "maxBillableLeads": {
                "title": "Max Billable Leads",
                "type": "integer",
                "minimum": 1,
                "default": 100,
                "description": "Hard cap on base-event charges in a single run."
              },
              "enableDecisionMakerBonusCharge": {
                "title": "Enable Decision-Maker Bonus",
                "type": "boolean",
                "default": true,
                "description": "When true, bonus events are charged for decision-maker direct contacts."
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}