{
  "openapi": "3.0.1",
  "info": {
    "title": "Distressed Companies for Sale — Bankruptcy, Dissolved, UCC Lien",
    "description": "Find distressed US businesses (dissolved, revoked, tax-liened, or bankrupt) — fused per company, scored for distress, and skip-traced to the owner's direct phone & email. Free public records (Socrata SOS + RECAP/CourtListener, never paid PACER). B2B prospecting only, not FCRA.",
    "version": "0.0",
    "x-build-id": "1i6KgvKyATW7qtHCk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dominvo~distressed-business-ai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dominvo-distressed-business-ai-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/dominvo~distressed-business-ai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dominvo-distressed-business-ai-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/dominvo~distressed-business-ai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dominvo-distressed-business-ai-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "dissolution_status",
              "bankruptcy_filings",
              "tax_lien",
              "ucc_lien",
              "sec_bankruptcy",
              "principal_lookup",
              "distress_match",
              "enriched_lead",
              "check_for_changes",
              "reset_baseline"
            ],
            "type": "string",
            "description": "Which mode to run. Each mode reads a subset of the fields below — see each field's note.",
            "default": "check_for_changes"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "US state abbreviations to scan (e.g. CO, NY, CT). Used by every signal mode, distress_match, enriched_lead, and the monitor modes. For dissolution_status, leave empty to pull all verified states (Colorado, New York, Connecticut). For bankruptcy_filings, a state expands to that state's bankruptcy court codes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "court": {
            "title": "Court code (bankruptcy_filings)",
            "type": "string",
            "description": "Explicit CourtListener bankruptcy court code (e.g. nysb, casb, txsb). Overrides `states` for bankruptcy_filings. Used by bankruptcy_filings."
          },
          "chapter": {
            "title": "Bankruptcy chapter (bankruptcy_filings)",
            "enum": [
              "7",
              "11",
              "12",
              "13"
            ],
            "type": "string",
            "description": "Optional bankruptcy chapter filter: 7, 11, 12, or 13. Used by bankruptcy_filings."
          },
          "signals": {
            "title": "Signals to fuse / monitor",
            "type": "array",
            "description": "Subset of Tier 1 signal modes to fuse (distress_match) or monitor (check_for_changes / reset_baseline). Omit to use the defaults. Used by distress_match and the monitor modes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "signal_types": {
            "title": "Signal types (enriched_lead)",
            "type": "array",
            "description": "Subset of Tier 1 signal modes to fuse before enrichment. Omit to fuse all available signals. Used by enriched_lead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "min_signals": {
            "title": "Min stacked signals (distress_match / enriched_lead)",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum distinct signals on one company to qualify as a distress match. Used by distress_match and enriched_lead.",
            "default": 2
          },
          "fuzz_threshold": {
            "title": "Fuzzy name threshold (distress_match / enriched_lead)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "rapidfuzz token-sort-ratio (0–100) at/above which two business names fuse as the same company. 90 is a safe default; 100 disables fuzzy merging (exact normalized names only). Used by distress_match and enriched_lead.",
            "default": 90
          },
          "entity_name": {
            "title": "Business name filter (principal_lookup)",
            "type": "string",
            "description": "Optional business-name substring for a targeted officer / registered-agent lookup. Used by principal_lookup."
          },
          "tickers": {
            "title": "Tickers (sec_bankruptcy)",
            "type": "array",
            "description": "Optional ticker / company filters for SEC EDGAR 8-K bankruptcy disclosures. Used by sec_bankruptcy (scaffold).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "date_from": {
            "title": "From date",
            "type": "string",
            "description": "Earliest signal date (YYYY-MM-DD). Optional incremental floor. Used by all signal modes, distress_match, enriched_lead, and the monitor modes."
          },
          "max_results": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on rows pulled per source. Default 100. Used by every signal mode and the monitor modes.",
            "default": 100
          },
          "max_signals_per_source": {
            "title": "Max signals per source (distress_match / enriched_lead)",
            "minimum": 1,
            "type": "integer",
            "description": "Caps raw signals scanned per Tier 1 source before fusion, bounding cost and compute. Each child signal mode fetches at most this many rows. Used by distress_match and enriched_lead.",
            "default": 2000
          },
          "courtlistener_token": {
            "title": "CourtListener API token",
            "type": "string",
            "description": "Optional free CourtListener API token (register at courtlistener.com) — raises the bankruptcy throttle ceiling. Used by bankruptcy_filings, distress_match, enriched_lead, and the monitor modes."
          },
          "socrata_app_token": {
            "title": "Socrata app token",
            "type": "string",
            "description": "Optional Socrata app token (raises the SODA throttle ceiling). If omitted, the actor reads APIFY_SOCRATA_APP_TOKEN from env. Used by dissolution_status."
          },
          "skiptrace_actor_id": {
            "title": "Skip-trace Actor ID (enriched_lead)",
            "type": "string",
            "description": "Apify Actor ID to chain for skip-trace enrichment. Paid (~$0.007/result); billed to the actor publisher via DOMIN_APIFY_TOKEN resale token, NOT to the buyer. No match = 0 items = $0. Override with any Actor accepting street_citystatezip input. Used by enriched_lead.",
            "default": "one-api/skip-trace"
          },
          "skiptrace_api_key": {
            "title": "Skip-trace API key (enriched_lead)",
            "type": "string",
            "description": "Optional paid skip-trace API key. Alternative to chaining an Apify Actor. Used by enriched_lead."
          },
          "output_format": {
            "title": "Output format",
            "enum": [
              "json",
              "ndjson",
              "csv",
              "xlsx"
            ],
            "type": "string",
            "description": "json streams to the default dataset. ndjson/csv/xlsx flush to the key-value store at end of run.",
            "default": "json"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Defaults to Apify Proxy (US) — several open-data portals and CourtListener block non-US or datacenter egress IPs, so US routing keeps runs reliable. Switch country or add residential groups if a source still blocks you.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}