# US Med Spa Leads Scraper — Medical Directors, Tech & Mail (`vesper_studio/us-medspa-leads-enricher`) Actor

Enrich US Med Spa websites via fast 100% HTTP (zero browser): extract Medical Directors (MD, DO, NP, PA-C, RN), aesthetic devices & treatments (Botox, Morpheus8, HydraFacial, CO2, Semaglutide), verified business emails, US phones, and booking software (Boulevard, Zenoti, Vagaro, JaneApp).

- **URL**: https://apify.com/vesper_studio/us-medspa-leads-enricher.md
- **Developed by:** [Xavier Richard](https://apify.com/vesper_studio) (community)
- **Categories:** Lead generation, Business, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 med spa clinic enricheds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## US Med Spa Leads Enricher

Turn raw US Medical Spa websites or Google Maps lead lists into **sales-ready clinical, equipment, and contact intelligence** — without slow headless browsers or expensive residential proxies.

Built specifically for **aesthetic laser manufacturers, injectable labs, medical skincare brands, and B2B med spa marketing agencies**, this Actor crawls clinic websites directly using lightweight Chrome TLS-impersonating HTTP (`curl_cffi`) and ultra-fast C-backed HTML parsing (`selectolax`).

***

### What it extracts per Med Spa

- **Medical Director & Clinical Team (`src/extractors/team.py` + `jsonld.py`)**:
  - Identifies the **Medical Director** (`MD`, `DO`) and clinical providers (`NP`, `NP-C`, `FNP-C`, `APRN`, `DNP`, `PA`, `PA-C`, `RN`, `BSN`, `MSN`, `Aesthetician`, `CLT`, `LMA`) via contextual pattern matching and JSON-LD `Person` / `Physician` schemas.
  - Exposes B2B qualification booleans: `has_physician`, `has_midlevel_injector`, `team_count`, `medical_director_name`, `medical_director_credentials`.
  - Automatically strips navigation menus and patient testimonials/reviews to prevent false positives.
- **Treatments & Equipment Taxonomy (`src/extractors/treatments.py`)**:
  - Standardized 14-category taxonomy across injectables, energy devices, and wellness:
    `botox`, `dysport`, `fillers`, `juvederm`, `morpheus8`, `hydrafacial`, `coolsculpting`, `microneedling`, `laser_hair_removal`, `ipl`, `co2_laser`, `semaglutide`, `iv_therapy`, `prp`.
  - Returns both a clean `treatments` array and a `treatment_flags` boolean map for instant CRM/Clay filtering.
- **Verified Contacts & Booking SaaS Signals (`src/extractors/contacts.py`)**:
  - **Emails**: extracts generic business mailboxes (`info@`, `hello@`, `concierge@`, `appointments@`, `office@`, `admin@`) and nominative corporate emails on the clinic's domain, decodes Cloudflare `data-cfemail`, and strictly filters out image `@2x` filenames, Sentry/Wix/Squarespace noise, and `noreply@` addresses.
  - **US Phones**: validates and normalizes US numbers via `phonenumbers` to `(XXX) XXX-XXXX`.
  - **Booking / EMR Software Detection**: detects **Boulevard**, **Zenoti** (including white-label `/webstoreNew/` domains), **JaneApp**, **Vagaro**, **Aesthetic Record**, **Nextech**, **Mangomint**, **Mindbody**, **Meevo**, **Phorest**, **RepeatMD**, **Envision**, **Symplast**, **PatientNow**, **Pabau**, and **Square Appointments** across links, iframes, and widget scripts.
  - **Clinic Location & Socials**: parses JSON-LD `MedicalSpa` / `MedicalBusiness` addresses (`street_address`, `city`, `state`, `postal_code`) plus Instagram & Facebook URLs.

***

### Architecture & Performance

- **100% HTTP TLS-aware (Zero Heavy Browser)**: runs comfortably in **256–512 MB RAM** with zero proxy required by default.
- **Targeted Domain Crawler (`maxPagesPerDomain`, default `6`)**: fetches only the homepage plus up to 5 high-signal internal pages (team/about, treatments/services/lasers, contact/booking), skipping blogs, policies, and static assets to minimize bandwidth and runtime.
- **Pay-Per-Event Ready**: emits `medspa-enriched` per delivered clinic and `email-found` per verified business email with full remaining-budget awareness.

***

### Input Examples

#### Option A: List of domains or URLs

```json
{
  "urls": [
    "beauxmedspa.com",
    "https://www.bettermedspa.com",
    "https://miamibeachlaserandaesthetics.com"
  ],
  "maxPagesPerDomain": 6,
  "concurrency": 8
}
```

#### Option B: Structured objects (e.g. from Google Maps or Clay)

```json
{
  "clinics": [
    {
      "name": "BEAUX MedSpa",
      "website": "https://beauxmedspa.com",
      "city": "Austin",
      "state": "TX",
      "googleMapsUrl": "https://maps.google.com/?cid=123456"
    },
    {
      "name": "Better Med Spa & Wellness",
      "website": "https://www.bettermedspa.com",
      "city": "Chicago",
      "state": "IL"
    }
  ],
  "onlyWithEmail": false,
  "webhookUrl": "https://api.clay.com/v3/sources/webhook/..."
}
```

***

### Sample Output Item

```json
{
  "clinic_name": "Better Med Spa & Wellness",
  "website": "https://www.bettermedspa.com/",
  "domain": "bettermedspa.com",
  "city": "Chicago",
  "state": "IL",
  "street_address": "2117 N Halsted St",
  "postal_code": "60614",
  "status": "enriched",
  "http_status": 200,
  "pages_crawled": 6,
  "primary_email": "hello@bettermedspa.com",
  "emails": ["hello@bettermedspa.com"],
  "generic_emails": ["hello@bettermedspa.com"],
  "personal_corporate_emails": [],
  "primary_phone": "(312) 285-2618",
  "phones": ["(312) 285-2618"],
  "medical_director_name": "Dr. Brett Brechner",
  "medical_director_credentials": "DO",
  "team_count": 4,
  "has_physician": true,
  "has_midlevel_injector": false,
  "treatments": ["botox", "fillers", "hydrafacial", "microneedling", "ipl", "prp"],
  "treatments_count": 6,
  "booking_platform": "Boulevard",
  "booking_url": "https://dashboard.boulevard.io/booking/businesses/..."
}
```

***

### Local Development & Testing

```bash
pip install -r requirements.txt
pytest -v
python -m src
```

# Actor input Schema

## `urls` (type: `array`):

List of Med Spa website URLs or bare domains to enrich (e.g. "beauxmedspa.com", "https://www.bettermedspa.com"). You can combine this with the 'Clinics (structured objects)' field below.

## `clinics` (type: `array`):

Optional JSON array of clinic objects ({ "name": ..., "website": ..., "city": ..., "state": ..., "googleMapsUrl": ... }) or URLs. Metadata is preserved and merged with extracted website intelligence.

## `maxPagesPerDomain` (type: `integer`):

Maximum number of high-signal pages fetched per domain (homepage + up to 5 targeted subpages: team/about, treatments/services/lasers, contact/booking). Keeps bandwidth and runtime minimal.

## `concurrency` (type: `integer`):

Number of clinics enriched in parallel using lightweight TLS-impersonating HTTP sessions.

## `requestTimeoutSeconds` (type: `integer`):

Per-request timeout in seconds.

## `onlyWithEmail` (type: `boolean`):

Skip (and do not charge for) clinics where no valid corporate or clinic business email was found.

## `respectRobotsTxt` (type: `boolean`):

Fetch and honour robots.txt before crawling each clinic domain. Disabled by default so strict marketing WAFs on /robots.txt do not block public clinic pages.

## `proxyConfiguration` (type: `object`):

Zero proxy by default — Chrome TLS impersonation handles WordPress, Squarespace, and Wix sites directly. Enable Apify Proxy only if enriching domains behind strict WAF rules.

## `webhookUrl` (type: `string`):

Optional HTTPS Webhook URL. When provided, all enriched clinic records are POSTed as JSON at the end of the run.

## Actor input object example

```json
{
  "urls": [
    "https://beauxmedspa.com",
    "https://www.bettermedspa.com",
    "https://miamibeachlaserandaesthetics.com"
  ],
  "clinics": [],
  "maxPagesPerDomain": 6,
  "concurrency": 8,
  "requestTimeoutSeconds": 15,
  "onlyWithEmail": false,
  "respectRobotsTxt": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `enrichedClinics` (type: `string`):

Enriched US Med Spa records with Medical Directors, clinical team credentials, treatment/device taxonomy, verified emails, US phones, and booking software signals. Append ?format=csv or ?format=xlsx for spreadsheets.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://beauxmedspa.com",
        "https://www.bettermedspa.com",
        "https://miamibeachlaserandaesthetics.com"
    ],
    "clinics": [],
    "maxPagesPerDomain": 6
};

// Run the Actor and wait for it to finish
const run = await client.actor("vesper_studio/us-medspa-leads-enricher").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": [
        "https://beauxmedspa.com",
        "https://www.bettermedspa.com",
        "https://miamibeachlaserandaesthetics.com",
    ],
    "clinics": [],
    "maxPagesPerDomain": 6,
}

# Run the Actor and wait for it to finish
run = client.actor("vesper_studio/us-medspa-leads-enricher").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://beauxmedspa.com",
    "https://www.bettermedspa.com",
    "https://miamibeachlaserandaesthetics.com"
  ],
  "clinics": [],
  "maxPagesPerDomain": 6
}' |
apify call vesper_studio/us-medspa-leads-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vesper_studio/us-medspa-leads-enricher"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hfmb49brHIE3iWD07/builds/6dfNzyRW0zLZgdEae/openapi.json
