{
  "openapi": "3.0.1",
  "info": {
    "title": "Pennsylvania Professional License Search - PALS Leads",
    "description": "Search Pennsylvania's PALS licence register across 31 state boards: nurses, doctors, pharmacists, realtors, engineers, accountants and more. Every record carries the licensee's email and phone, address, licence dates, disciplinary history and their other PA licences.",
    "version": "0.1",
    "x-build-id": "qDyg1FVbY8AvN7thB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~pennsylvania-pals-licenses-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-pennsylvania-pals-licenses-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/scrapers_lat~pennsylvania-pals-licenses-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-pennsylvania-pals-licenses-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/scrapers_lat~pennsylvania-pals-licenses-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-pennsylvania-pals-licenses-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": {
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "name",
              "establishment",
              "licenseNumbers",
              "sweep"
            ],
            "type": "string",
            "description": "By name: look up individual licensees by last/first name. Establishments: licensed firms, pharmacies, salons, funeral homes, dealerships. By licence number: verify licences you already hold. Bulk sweep: walk whole boards and counties past the register's own 500-result ceiling.",
            "default": "name"
          },
          "lastName": {
            "title": "Last name",
            "type": "string",
            "description": "Licensee surname. Matches from the start of the name, so \"SCHW\" returns SCHWAB, SCHWARTZ, SCHWENK. Leave blank in bulk sweep mode."
          },
          "firstName": {
            "title": "First name",
            "type": "string",
            "description": "Optional given name, also matched from the start of the name."
          },
          "facilityName": {
            "title": "Establishment / firm name",
            "type": "string",
            "description": "Licensed business name, matched from the start: \"RITE AID\", \"UPMC\", \"KELLER WILLIAMS\". Used when Search mode is \"By establishment / firm name\"."
          },
          "licenseNumbers": {
            "title": "Licence numbers",
            "type": "array",
            "description": "Exact PA licence numbers, e.g. RN123456L or MD012345. Used when Search mode is \"By licence number(s)\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "boards": {
            "title": "Licensing boards",
            "type": "array",
            "description": "Restrict to specific state boards. Leave empty for all 31. Nursing 43, Medicine 37, Osteopathic Medicine 36, Pharmacy 8, Dentistry 13, Real Estate 27, Real Estate Appraisers 5, Engineers/Surveyors/Geologists 28, Accountancy 3, Architects 1, Landscape Architects 7, Social Work & Counseling 29, Psychology 30, Physical Therapy 42, Occupational Therapy 9, Speech-Language 40, Optometry 26, Podiatry 33, Chiropractic 2, Veterinary 23, Nursing Home Administration 24, Radiology Personnel 39, Massage Therapy 12, Cosmetology 20, Barbers 15, Funeral Directors 17, Auctioneers 31, Crane Operators 41, Vehicle Dealers 38, Navigation Commission 6, Health Division Volunteers 10.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Pennsylvania counties to restrict to, e.g. Philadelphia, Allegheny, Montgomery. Exact county names only. Leave empty for statewide (and out-of-state licensees).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City of the licensee's address of record, matched from the start of the name."
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "Exact 5-digit ZIP of the address of record."
          },
          "licenseStatus": {
            "title": "Licence status",
            "enum": [
              "any",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Active keeps only licences currently in good standing. Inactive keeps expired, suspended, inactive, null-and-void and deceased records - useful for renewal and win-back campaigns.",
            "default": "any"
          },
          "licenseTypeContains": {
            "title": "Licence type contains",
            "type": "string",
            "description": "Keep only licence types containing this text, e.g. \"Registered Nurse\", \"Broker\", \"Practical\", \"Firm\". Boards issue dozens of licence types each."
          },
          "onlyWithEmail": {
            "title": "Only licensees with an email",
            "type": "boolean",
            "description": "Drop records with no email address on file.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only licensees with a phone number",
            "type": "boolean",
            "description": "Drop records with no phone number on file.",
            "default": false
          },
          "onlyWithDisciplinaryAction": {
            "title": "Only licensees with disciplinary action",
            "type": "boolean",
            "description": "Keep only licences that carry at least one board disciplinary action or complaint. Compliance and due-diligence screening.",
            "default": false
          },
          "expiringWithinDays": {
            "title": "Expiring within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only licences that expire within this many days from today. Set 90 for a renewal-season list. Leave empty to ignore expiry."
          },
          "sweepEntities": {
            "title": "Sweep covers",
            "enum": [
              "individuals",
              "establishments",
              "both"
            ],
            "type": "string",
            "description": "What the bulk sweep walks: individual licensees, licensed establishments, or both.",
            "default": "individuals"
          },
          "maxPrefixDepth": {
            "title": "Name split depth",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "The register never returns more than 500 rows for one query. When a query hits that ceiling the actor splits it by name prefix and retries. Depth 4 (default) resolves almost every board; raise it for very large boards such as Nursing, lower it for faster shallow runs.",
            "default": 4
          },
          "includeDetails": {
            "title": "Include full licence detail",
            "type": "boolean",
            "description": "Fetch each licence's detail record: issue, expiry and last-renewal dates, disciplinary actions with complaint numbers, every other Pennsylvania licence the person holds, sponsor relationships and the establishment's street address. Turn off for a faster, thinner run.",
            "default": true
          },
          "maxRecords": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many licence records. Free Apify plans are capped at 10 per run.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests to the register. 6 is a good balance; lower it if you see timeouts.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The register answers datacenter IPs directly, so a proxy is normally unnecessary.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}