{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Company Insolvency Alerts by RawTrader",
    "description": "New UK company insolvency cases from the official Companies House API: liquidations (CVL, MVL, compulsory), administrations, CVAs and receiverships with SIC code, postcode and practitioner firm. By RawTrader | UK Industry & Bills",
    "version": "0.1",
    "x-build-id": "nggblD5p80fztf0af"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seaf999ield~uk-company-insolvency-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seaf999ield-uk-company-insolvency-alerts",
        "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/seaf999ield~uk-company-insolvency-alerts/runs": {
      "post": {
        "operationId": "runs-sync-seaf999ield-uk-company-insolvency-alerts",
        "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/seaf999ield~uk-company-insolvency-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-seaf999ield-uk-company-insolvency-alerts",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "recent",
              "monitor"
            ],
            "type": "string",
            "description": "'recent' returns insolvency cases registered at Companies House in the last N days. 'monitor' remembers its stream position and only returns cases it has not returned before, so you can schedule it daily or hourly.",
            "default": "recent"
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many days of newly registered cases to return. Companies House replays roughly the last 10 to 14 days of the insolvency stream, so values above 14 are capped by what Companies House still holds (the run summary shows the real coverage). In monitor mode this is only used for the first run.",
            "default": 7
          },
          "caseTypes": {
            "title": "Case types",
            "type": "array",
            "description": "Only return these insolvency case types. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "creditors-voluntary-liquidation",
                "members-voluntary-liquidation",
                "compulsory-liquidation",
                "in-administration",
                "administration-order",
                "corporate-voluntary-arrangement",
                "corporate-voluntary-arrangement-moratorium",
                "moratorium",
                "receivership",
                "receiver-manager",
                "administrative-receiver",
                "foreign-insolvency"
              ],
              "enumTitles": [
                "Creditors voluntary liquidation (CVL)",
                "Members voluntary liquidation (MVL)",
                "Compulsory liquidation (court winding up)",
                "Administration",
                "Administration order",
                "Company voluntary arrangement (CVA)",
                "CVA moratorium",
                "Moratorium",
                "Receivership",
                "Receiver manager",
                "Administrative receiver",
                "Foreign insolvency proceedings"
              ]
            }
          },
          "sicCodes": {
            "title": "SIC code prefixes",
            "type": "array",
            "description": "Only companies with a SIC code starting with one of these, e.g. 41 (construction of buildings), 4520 (vehicle repair), 56101 (restaurants). Leave empty for all industries.",
            "items": {
              "type": "string"
            }
          },
          "postcodePrefixes": {
            "title": "Registered office postcode prefixes",
            "type": "array",
            "description": "Only companies whose registered office postcode starts with one of these, e.g. M (Manchester area only, not ME), LS1, B, EH. Leave empty for the whole UK.",
            "items": {
              "type": "string"
            }
          },
          "maxCaseAgeDays": {
            "title": "Max case age (days)",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "Skip cases whose start date (wound up, administration start, CVA start and so on) is more than this many days before Companies House published it. Filters out old cases that were only edited.",
            "default": 90
          },
          "includeClosedCases": {
            "title": "Include closed cases",
            "type": "boolean",
            "description": "Also return cases that already have an end, dissolution or conclusion date.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Monitor mode keeps its position and the cases already sent in a named key value store in your account (the name is shown in the run summary). Use a different monitor name for each filter set.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum insolvency cases to output (and be charged for) per run. 0 means no limit.",
            "default": 200
          },
          "maxRequests": {
            "title": "Max REST requests",
            "minimum": 20,
            "type": "integer",
            "description": "Cap on Companies House REST calls (one per company, to add name, address and SIC codes). Calls are throttled to stay under 600 per 5 minutes.",
            "default": 2000
          },
          "companiesHouseApiKey": {
            "title": "Companies House REST API key (optional)",
            "type": "string",
            "description": "Optional: your own Companies House REST API key. If empty, the actor's built in key is used."
          },
          "companiesHouseStreamKey": {
            "title": "Companies House streaming key (optional)",
            "type": "string",
            "description": "Optional: your own Companies House streaming API key. If empty, the actor's built in key is used."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}