{
  "openapi": "3.0.1",
  "info": {
    "title": "Childcare Provider Leads — Daycare Contact Lists + Compliance",
    "description": "Licensed childcare provider lead lists from official state licensing data with direct phone AND email contacts (Texas HHSC). Filter by county, type, capacity, ages served; each lead scored with 2-year deficiency counts + high-risk flag. Delta mode alerts on newly licensed operations.",
    "version": "1.1",
    "x-build-id": "ApfaA4akkYWSNkewc"
  },
  "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"
            ],
            "type": "string",
            "description": "REQUIRED. US state to pull licensed childcare providers from. v1 supports TX (Texas HHSC Child Care Licensing); FL and CA are scaffolded but not enabled. Name the state explicitly rather than relying on a default."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Filter to one county (case-insensitive, e.g. \"Harris\", \"Dallas\", \"Travis\"). Leave empty for statewide. A county that does not exist returns 0 rows, which is a valid answer."
          },
          "operationType": {
            "title": "Operation type",
            "type": "string",
            "description": "Exact operation type (case-insensitive). Common TX values: \"Licensed Center\", \"Licensed Child-Care Home\", \"Registered Child-Care Home\", \"Listed Family Home\". Leave empty for all types."
          },
          "agesServed": {
            "title": "Ages served (substring)",
            "type": "string",
            "description": "Substring match on the licensed-to-serve ages field, e.g. \"Infant\", \"Toddler\", \"Pre-Kindergarten\", \"School\". 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 TX publishes NO capacity are KEPT and marked capacity_filter_applied=\"kept_unknown_capacity\" rather than silently deleted - 141 of the 236 Child Placing Agencies statewide 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 join each provider to the TX non-compliance table for a 2-year window and add deficiency_count_2y, deficiency_weighted_score_2y, recent_deficiency_dates and high_risk_flag. When this is off, those four fields are NULL (not checked) - but deficiency_count_total, deficiency_weighted_score_total and high_risk_flag_lifetime, which come from HHSC counts published on the roster row itself, are emitted either way.",
            "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 filter combination, 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 active operations (operation_status = Y). Disable to include all statuses.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}