{
  "openapi": "3.0.1",
  "info": {
    "title": "UCC Lien Lapse Leads: Refinance Window + Lender Rollup",
    "description": "UCC lien lapse leads for equipment-finance, MCA and factoring brokers: UCC-1 financing statements lapsing in the next N days (continuations honoured, terminated liens excluded) with debtor, lender and collateral, plus a secured-party filings rollup by quarter. CO, CT, OR open data. Keyless.",
    "version": "1.0",
    "x-build-id": "rJsbaH7EuzaLMKkWw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~ucc-lapse-refinance-window/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-ucc-lapse-refinance-window",
        "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~ucc-lapse-refinance-window/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-ucc-lapse-refinance-window",
        "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~ucc-lapse-refinance-window/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-ucc-lapse-refinance-window",
        "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": [
          "states"
        ],
        "properties": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "REQUIRED. State codes to query. Shipped: CO (full: debtor + secured party + collateral + lapse), CT (full: debtor + secured party + lapse), OR (partial: secured party + lapse, no debtor table published -- rows link to the filing image). NY, PA, DE, TX, WA publish no UCC dataset and are reported as state_coverage=not_available on the run, never as an empty success. Every state is judged independently and its outcome is stamped on every row.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "lapse-window",
              "secured-party-rollup"
            ],
            "type": "string",
            "description": "lapse-window = one row per UCC-1 financing statement whose CURRENT lapse date (after continuations; terminated liens excluded) falls inside the next windowDays -- the refinance / re-solicit trigger. secured-party-rollup = initial UCC-1 filings per secured party x quarter over the trailing windowDays (who is lending, how much, where)."
          },
          "windowDays": {
            "title": "Window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "lapse-window: liens lapsing between the window start (today, or sinceDate) and start + windowDays. secured-party-rollup: initial filings accepted in the trailing windowDays (or since sinceDate). 1-365."
          },
          "sinceDate": {
            "title": "Window start override (ISO)",
            "pattern": "^$|^\\d{4}-\\d{1,2}-\\d{1,2}$",
            "type": "string",
            "description": "Optional. MUST be YYYY-MM-DD (e.g. 2027-01-01); any other format fails the run without billing rather than being spliced unverified into the live query -- slash forms are rejected on purpose because 05/06/2025 is ambiguous. lapse-window: the window starts here instead of today (ask for lapses in a future quarter). secured-party-rollup: count filings accepted on/after this date instead of today - windowDays."
          },
          "securedPartyQuery": {
            "title": "Secured party name contains",
            "type": "string",
            "description": "Optional. Keep only rows whose secured party (lender) name contains this text, case-insensitive (e.g. \"Kubota\", \"Wells Fargo\", \"Small Business Administration\"). Applied after each lien is fully assembled, so a lender named only on an amendment still matches."
          },
          "debtorCity": {
            "title": "Debtor city (lapse-window)",
            "type": "string",
            "description": "Optional. Keep only leads whose primary debtor address city equals this (case-insensitive). CO and CT publish debtor cities; OR publishes no debtor table, so an OR leg with this filter is reported as not applicable rather than silently ignored."
          },
          "county": {
            "title": "County (lapse-window, where published)",
            "type": "string",
            "description": "Optional. None of the shipped portals publishes a county on the filing record; CO carries one only on farm-product collateral records. A state that cannot honour the filter is reported as not applicable on the run, never silently ignored. Prefer debtorCity."
          },
          "maxResults": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on billable rows for the whole run (all states together, soonest lapse first / largest lender first). When more matched, every row carries result_truncated=true. Default 500; prefill 40 so a first free-tier run costs under $1.",
            "default": 500
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional free Socrata app token to raise rate limits on the state portals."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}