{
  "openapi": "3.0.1",
  "info": {
    "title": "US Senior Care & Assisted Living Facility Leads Scraper",
    "description": "Scrape US senior-care & assisted-living facility leads from official state licensing registries: operator, administrator, phone, bed capacity, care type, memory-care flag, ownership, license dates & lead score. 6 states, monitor mode.",
    "version": "0.1",
    "x-build-id": "OectO3J3DjidbuCB9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~senior-care-facility-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-senior-care-facility-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~senior-care-facility-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-senior-care-facility-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~senior-care-facility-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-senior-care-facility-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",
            "type": "array",
            "description": "Two-letter state codes to include. Available official-registry states: <code>MO</code>, <code>NY</code>, <code>PA</code>, <code>MD</code>, <code>CT</code>, <code>IL</code>. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "careCategories": {
            "title": "Care categories",
            "type": "array",
            "description": "Filter by broad category: <code>Residential Senior Care</code> (assisted living, personal/residential/adult care, memory care), <code>Skilled Nursing</code> (SNF/ICF/nursing homes), <code>Home & Community Care</code> (home care/health/nursing, AL service agencies), <code>Hospice</code>. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "careTypes": {
            "title": "Care types (specific)",
            "type": "array",
            "description": "Optional exact care-type filter, e.g. <code>Assisted Living</code>, <code>Personal Care Home</code>, <code>Adult Care Home</code>, <code>Memory Care</code>, <code>Skilled Nursing Facility</code>, <code>Home Care Agency</code>, <code>Hospice Agency</code>.",
            "items": {
              "type": "string"
            }
          },
          "memoryCareOnly": {
            "title": "Memory / dementia care only",
            "type": "boolean",
            "description": "Only include facilities flagged as memory / Alzheimer's / dementia care.",
            "default": false
          },
          "minCapacity": {
            "title": "Minimum bed capacity",
            "minimum": 0,
            "type": "integer",
            "description": "Only include facilities with at least this many licensed beds (facilities without a capacity value are excluded)."
          },
          "maxCapacity": {
            "title": "Maximum bed capacity",
            "minimum": 0,
            "type": "integer",
            "description": "Only include facilities with at most this many licensed beds."
          },
          "ownershipTypes": {
            "title": "Ownership type",
            "type": "array",
            "description": "Filter by ownership where the source provides it: <code>For Profit</code>, <code>Non-profit</code>, <code>Government</code>.",
            "items": {
              "type": "string"
            }
          },
          "hasPhone": {
            "title": "Has phone number",
            "type": "boolean",
            "description": "Only include facilities that have a phone number.",
            "default": false
          },
          "hasNamedContact": {
            "title": "Has named contact / administrator",
            "type": "boolean",
            "description": "Only include facilities with an administrator or contact person name.",
            "default": false
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Only include facilities whose city contains one of these (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Only include facilities whose county contains one of these (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP code prefixes",
            "type": "array",
            "description": "Only include facilities whose ZIP starts with one of these prefixes (e.g. <code>631</code>, <code>10001</code>).",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Name contains",
            "type": "string",
            "description": "Only include facilities whose name, operator or DBA contains this text (case-insensitive). Great for tracking a specific operator/chain."
          },
          "issuedAfter": {
            "title": "Licensed/effective on or after",
            "type": "string",
            "description": "Only include facilities whose license effective date is on or after this date (YYYY-MM-DD). Surfaces newly-licensed facilities (where the source provides dates: MO, CT)."
          },
          "expiringWithinDays": {
            "title": "License expiring within (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Only include facilities whose license expires within this many days — a renewal / decision-window signal (where the source provides expiration dates)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "leadScore",
              "capacityHigh",
              "recency",
              "name"
            ],
            "type": "string",
            "description": "Order of the output records.",
            "default": "leadScore"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of facility lead records to output.",
            "default": 1000
          },
          "includeRawFields": {
            "title": "Include raw source fields",
            "type": "boolean",
            "description": "Attach the full original registry row to each record under <code>sourceFields</code> (richest possible dataset).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new / changed)",
            "type": "boolean",
            "description": "Only output facilities that are NEW or CHANGED since the last run with the same Monitor key. Pairs perfectly with Apify Schedules to build a fresh-leads feed.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the saved monitor state. Use one key per saved search so different schedules don't overwrite each other.",
            "default": "default"
          },
          "deduplicateResults": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Drop duplicate facilities within a run (recommended).",
            "default": true
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional Socrata app token to raise rate limits. Not required — the registries are keyless."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Not needed — these government open-data registries are reachable directly. Leave proxy off for the cheapest, fastest runs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}