{
  "openapi": "3.0.1",
  "info": {
    "title": "Childcare Provider Leads — Daycare Contact Lists + Compliance",
    "description": "Licensed childcare provider lead lists from official state licensing data in 9 states: TX, NY, CA, PA, MA, CT, WA, DE, VT. Phone, email and named contacts where published; filter by county, type, capacity, ages. Violation history where the state publishes it. Delta mode flags new programs.",
    "version": "1.2",
    "x-build-id": "Wp1xOibkvp3hhHXff"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~childcare-provider-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-childcare-provider-leads",
        "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/malonestar~childcare-provider-leads/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-childcare-provider-leads",
        "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/malonestar~childcare-provider-leads/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-childcare-provider-leads",
        "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",
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "title": "State",
            "enum": [
              "TX",
              "NY",
              "CA",
              "PA",
              "MA",
              "CT",
              "WA",
              "DE",
              "VT"
            ],
            "type": "string",
            "description": "REQUIRED. US state to pull licensed childcare providers from: TX, NY, CA, PA, MA, CT, WA, DE or VT. Name the state explicitly rather than relying on a default. To pull several states in one run, also fill \"Additional states\"."
          },
          "states": {
            "title": "Additional states (optional)",
            "type": "array",
            "description": "Optional extra states to include in the same run, in addition to \"State\". maxResults is shared fairly across all requested states (a state that runs out of matches hands its unused share to the others). A state that cannot answer - source down, failed live check, or a filter it cannot apply - is skipped and disclosed on every row (run_states_failed / run_states_failed_reason); the run fails only if no requested state can answer.",
            "items": {
              "type": "string",
              "enum": [
                "TX",
                "NY",
                "CA",
                "PA",
                "MA",
                "CT",
                "WA",
                "DE",
                "VT"
              ],
              "enumTitles": [
                "Texas (HHSC CCL — phone + email + violations)",
                "New York (OCFS + NYC DOHMH — phone)",
                "California (CDSS CCLD centers — phone + citations)",
                "Pennsylvania (OCDEL — phone + email + STARS)",
                "Massachusetts (EEC — phone)",
                "Connecticut (OEC — phone + inspections + violations)",
                "Washington (DCYF centers — email + contact)",
                "Delaware (OCCL — phone + citations)",
                "Vermont (CDD — phone + email + STARS + vacancies)"
              ]
            }
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Filter to one county (case-insensitive, e.g. \"Harris\", \"Kings\" or \"Brooklyn\", \"Los Angeles\", \"Chester\"). Leave empty for statewide. Connecticut and Massachusetts publish NO county field, so a county filter makes those states fail loudly rather than return an unfiltered statewide list. A county that does not exist returns 0 rows, which is a valid answer."
          },
          "operationType": {
            "title": "Operation type",
            "type": "string",
            "description": "Exact operation type as the state names it (case-insensitive). Examples - TX: \"Licensed Center\", \"Licensed Child-Care Home\"; NY: \"Day Care Center\", \"Group Family Day Care\", \"Family Day Care\", \"School Age Child Care\" (or DCC/GFDC/FDC/SACC); PA: \"Child Care Center\", \"Family Child Care Home\", \"Group Child Care Home\"; CT: \"Child Care Center\", \"Family Child Care Home\"; DE: \"Licensed Child Care Center\"; VT: \"CBCCPP\", \"Registered FCCH\", \"Licensed Provider\"; WA: \"CHILD CARE CENTER\", \"SCHOOL-AGE PROGRAM\"; MA: \"Center-based Care\", \"Family Child Care\"; CA: \"DAY CARE CENTER\", \"INFANT CENTER\", \"SCHOOL-AGE DC CENTER\". Leave empty for all types."
          },
          "agesServed": {
            "title": "Ages served (substring)",
            "type": "string",
            "description": "Ages-served filter, e.g. \"Infant\", \"Toddler\", \"Pre-Kindergarten\", \"School\". TX and DE match the published ages text; NY and VT match programs with licensed capacity in that age group (Infant, Toddler, Preschool, School). PA, CT, WA, MA and CA publish no usable ages field, so this filter makes those states fail loudly rather than return unfiltered rows. Leave empty for any."
          },
          "minCapacity": {
            "title": "Minimum licensed capacity",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Only include operations whose published total licensed capacity is at or above this number (e.g. 50 targets larger centers). 0 = no minimum. Operations for which the state publishes NO capacity are KEPT and marked capacity_filter_applied=\"kept_unknown_capacity\" rather than silently deleted - e.g. 141 of the 236 Texas Child Placing Agencies have no published capacity.",
            "default": 0
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of provider lead records to return (each record = one billed Result).",
            "default": 100
          },
          "includeCompliance": {
            "title": "Include compliance scoring",
            "type": "boolean",
            "description": "Also attach each state's published compliance record. TX: 2-year non-compliance join (deficiency_count_2y, high_risk_flag ...) - the lifetime counts HHSC publishes on the roster row are emitted either way. CT: inspection + violation history. DE: non-compliance findings (last ~5 years). CA: CCLD facility page (status, contact, licensee, inspections, Type A/B citations, complaints). NY, PA, VT, WA and MA publish no compliance dataset: those rows read violations_status=\"not_published\" with NULL counts, never 0.",
            "default": true
          },
          "highRiskThreshold": {
            "title": "High-risk threshold (weighted score)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Editorial heuristic: an operation is flagged high risk when its risk-weighted deficiency score (High 5, Medium High 3, Medium 2, Medium Low 1, Low 0.5) meets or exceeds this value. Applied to both the 2-year score (high_risk_flag) and the HHSC lifetime score (high_risk_flag_lifetime).",
            "default": 10
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "roster",
              "new_operations"
            ],
            "type": "string",
            "description": "\"roster\" (default) returns the current filtered provider list. \"new_operations\" keeps a baseline of seen operation IDs in the NAMED key-value store \"childcare-provider-leads-state\", scoped to your state and filter combination (one baseline per state), and after the first seeding run emits only newly licensed operations. Every row carries delta_baseline_status so a seeding run is distinguishable from an incremental one.",
            "default": "roster"
          },
          "activeOnly": {
            "title": "Active operations only",
            "type": "boolean",
            "description": "Only include currently operating programs (TX operation_status = Y; NY not Suspended; CT ACTIVE; WA Active; MA not Expired). PA, DE, VT and CA publish current rosters only. Disable to include all statuses where the state publishes them.",
            "default": true
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}