{
  "openapi": "3.0.1",
  "info": {
    "title": "US Clinical Lab Leads Scraper (CLIA Registry)",
    "description": "Scrape every US clinical lab from the official CMS CLIA registry: name, phone, fax, address, certificate & facility type, accreditation, annual test volume, new-lab & ownership signals + lead score. Filter by state, lab type & size. B2B lab leads + monitoring.",
    "version": "0.1",
    "x-build-id": "zKLCPd039fWCaVWGa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~clinical-lab-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-clinical-lab-leads-scraper",
        "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/scrapesage~clinical-lab-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-clinical-lab-leads-scraper",
        "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/scrapesage~clinical-lab-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-clinical-lab-leads-scraper",
        "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": {
          "states": {
            "title": "States",
            "uniqueItems": true,
            "type": "array",
            "description": "Two-letter state codes to scrape (e.g. [\"CA\",\"TX\"]). Leave empty to scrape all 50 states + DC. Territories also supported: PR, GU, VI, AS, MP.",
            "items": {
              "type": "string"
            }
          },
          "facilityTypes": {
            "title": "Facility types",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs of these facility types. Allowed values: independentLab, hospital, physicianOffice, skilledNursing, communityClinic, ruralHealthClinic, fqhc, dialysis, bloodBank, ambulatorySurgery, homeHealth, hospice, assistedLiving, pharmacy, publicHealth, school, prison, mobileLab, ancillaryTestSite, comprehensiveRehab, hmo, insurance, industrial, intermediateCare, otherPractitioner, ambulance, healthFair, tissueBank, other. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "independentLab",
                "hospital",
                "physicianOffice",
                "skilledNursing",
                "communityClinic",
                "ruralHealthClinic",
                "fqhc",
                "dialysis",
                "bloodBank",
                "ambulatorySurgery",
                "homeHealth",
                "hospice",
                "assistedLiving",
                "ambulance",
                "ancillaryTestSite",
                "comprehensiveRehab",
                "healthFair",
                "hmo",
                "industrial",
                "insurance",
                "intermediateCare",
                "mobileLab",
                "pharmacy",
                "otherPractitioner",
                "prison",
                "publicHealth",
                "school",
                "tissueBank",
                "other"
              ],
              "enumTitles": [
                "Independent Laboratory (independentLab)",
                "Hospital (hospital)",
                "Physician Office (physicianOffice)",
                "Skilled Nursing / Nursing Facility (skilledNursing)",
                "Community Clinic (communityClinic)",
                "Rural Health Clinic (ruralHealthClinic)",
                "Federally Qualified Health Center (fqhc)",
                "ESRD Dialysis (dialysis)",
                "Blood Bank (bloodBank)",
                "Ambulatory Surgery Center (ambulatorySurgery)",
                "Home Health Agency (homeHealth)",
                "Hospice (hospice)",
                "Assisted Living Facility (assistedLiving)",
                "Ambulance (ambulance)",
                "Ancillary Test Site (ancillaryTestSite)",
                "Comprehensive Outpatient Rehab (comprehensiveRehab)",
                "Health Fair (healthFair)",
                "Health Maintenance Organization (hmo)",
                "Industrial (industrial)",
                "Insurance (insurance)",
                "Intermediate Care Facility (intermediateCare)",
                "Mobile Laboratory (mobileLab)",
                "Pharmacy (pharmacy)",
                "Other Practitioner (otherPractitioner)",
                "Prison (prison)",
                "Public Health Laboratory (publicHealth)",
                "School / Student Health (school)",
                "Tissue Bank / Repository (tissueBank)",
                "Other (other)"
              ]
            }
          },
          "certificateTypes": {
            "title": "Certificate types",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs with these CLIA certificate types. Allowed values: compliance, accreditation, ppm (provider-performed microscopy), waiver, registration. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "compliance",
                "accreditation",
                "ppm",
                "waiver",
                "registration"
              ],
              "enumTitles": [
                "Certificate of Compliance (compliance)",
                "Certificate of Accreditation (accreditation)",
                "Provider-Performed Microscopy (ppm)",
                "Certificate of Waiver (waiver)",
                "Registration Certificate (registration)"
              ]
            }
          },
          "ownershipTypes": {
            "title": "Ownership types",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs with these ownership types. Allowed values: proprietary, private, nonprofit, government. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "proprietary",
                "private",
                "nonprofit",
                "government"
              ],
              "enumTitles": [
                "Proprietary (for-profit) (proprietary)",
                "Private (non-profit) (private)",
                "Religious-affiliated non-profit (nonprofit)",
                "Government (government)"
              ]
            }
          },
          "accreditedBy": {
            "title": "Accredited by",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs accredited by any of these bodies. Allowed values: cap (College of American Pathologists), cola, jointCommission, a2la, aabb, aoa, ashi. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "cap",
                "cola",
                "jointCommission",
                "a2la",
                "aabb",
                "aoa",
                "ashi"
              ],
              "enumTitles": [
                "College of American Pathologists (cap)",
                "COLA (cola)",
                "The Joint Commission (jointCommission)",
                "A2LA (a2la)",
                "AABB (blood banks) (aabb)",
                "American Osteopathic Association (aoa)",
                "ASHI (histocompatibility) (ashi)"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs in these cities (case-insensitive, exact match on the lab's city). Optional.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs in these counties (case-insensitive, matches the resolved county name, e.g. \"Los Angeles\"). Optional.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs whose ZIP starts with any of these values (full ZIP or prefix, e.g. \"900\" or \"90210\"). Optional.",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Lab name contains",
            "type": "string",
            "description": "Keep only labs whose name contains this text (case-insensitive). Optional."
          },
          "cliaNumbers": {
            "title": "CLIA numbers (lookup)",
            "uniqueItems": true,
            "type": "array",
            "description": "Look up specific labs by CLIA number (CMS Certification Number, e.g. \"05D0642245\"). When set, the state filter is ignored and only these labs are returned.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active labs only",
            "type": "boolean",
            "description": "Keep only labs with an active (non-terminated) CLIA certificate.",
            "default": true
          },
          "withPhoneOnly": {
            "title": "With phone only",
            "type": "boolean",
            "description": "Keep only labs that have a phone number.",
            "default": false
          },
          "minTestVolume": {
            "title": "Minimum annual test volume",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only labs whose estimated annual test volume is at least this value (a proxy for lab size). Leave empty for no minimum."
          },
          "labSizeTiers": {
            "title": "Lab size tiers",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only labs in these size tiers. Allowed values: micro, small, medium, large, veryLarge. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "micro",
                "small",
                "medium",
                "large",
                "veryLarge"
              ],
              "enumTitles": [
                "Micro (≤2k tests/yr) (micro)",
                "Small (≤10k) (small)",
                "Medium (≤100k) (medium)",
                "Large (≤1M) (large)",
                "Very large (>1M) (veryLarge)"
              ]
            }
          },
          "newLabWithinDays": {
            "title": "New labs within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only labs first certified (original participation / certificate effective date) within the last N days — brand-new labs that need equipment, software and supplies. Leave empty to disable."
          },
          "ownershipChangedWithinDays": {
            "title": "Ownership changed within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only labs whose most recent change of ownership was within the last N days — an M&A / new-decision-maker signal. Leave empty to disable."
          },
          "certificateExpiringWithinDays": {
            "title": "Certificate expiring within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only labs whose CLIA certificate expires within the next N days — a renewal-timing / re-engagement signal. Leave empty to disable."
          },
          "notInComplianceOnly": {
            "title": "Not-in-compliance only",
            "type": "boolean",
            "description": "Keep only labs flagged as not in compliance at their last certification survey — buyers of compliance, consulting and corrective-action services.",
            "default": false
          },
          "multiSiteOnly": {
            "title": "Multi-site labs only",
            "type": "boolean",
            "description": "Keep only labs operating under a multi-site CLIA certificate (chains / health systems).",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only labs with a lead score at or above this value (0-100)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "leadScore",
              "testVolumeHigh",
              "newest",
              "expiringSoon",
              "name",
              "source"
            ],
            "type": "string",
            "description": "Order of the output.",
            "default": "leadScore"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of lab records to return across all states.",
            "default": 1000
          },
          "maxResultsPerState": {
            "title": "Max results per state",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on the number of labs returned from each state (useful for balanced multi-state pulls). Leave empty for no per-state cap."
          },
          "deduplicateResults": {
            "title": "Deduplicate by CLIA number",
            "type": "boolean",
            "description": "Drop duplicate labs that share the same CLIA number.",
            "default": true
          },
          "includeRawFields": {
            "title": "Include raw source fields",
            "type": "boolean",
            "description": "Attach the raw CMS POS source row (all 100+ original columns) under sourceFields on each record.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode (only new / changed)",
            "type": "boolean",
            "description": "Only return labs that are new or whose certificate, status or ownership changed since the last run with the same monitor key. Ideal on a Schedule to capture newly-certified labs each quarter.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Namespace for monitoring mode so independent monitors don't collide. Use a distinct key per saved configuration.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The CMS data API needs no proxy, so leave this off for the fastest queries.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}