{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Company Distress Watch: Insolvency Alerts",
    "description": "UK administrations, liquidations, winding-up petitions and orders and receiverships from The Gazette, one row per event with a high/medium/low risk signal, court, case number and insolvency practitioners. Watch-list mode adds strike-off proposals for your customers. Optional Companies House data.",
    "version": "1.1",
    "x-build-id": "SSIlqtaND42rVbxCC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/offerastudio~uk-company-distress-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-offerastudio-uk-company-distress-watch",
        "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/offerastudio~uk-company-distress-watch/runs": {
      "post": {
        "operationId": "runs-sync-offerastudio-uk-company-distress-watch",
        "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/offerastudio~uk-company-distress-watch/run-sync": {
      "post": {
        "operationId": "run-sync-offerastudio-uk-company-distress-watch",
        "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": {
          "dateFrom": {
            "title": "Published from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "First Gazette publication date (UK date), e.g. 2026-09-01, or a relative date like \"7 days\" (7 days ago). Empty = the last 7 days. At most 366 days per run."
          },
          "dateTo": {
            "title": "Published to",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Last publication date, inclusive. Empty = today. For a daily alert, schedule the Actor every morning with both dates set to \"1 day\" (yesterday)."
          },
          "categories": {
            "title": "Event types",
            "type": "array",
            "description": "Which events to return. Default: everything except the follow-up notices. Strike-off proposals and CVAs are not published as Gazette data notices; the Actor reads them from Companies House for the companies in your watch list, so they need a watch list and an API key.",
            "items": {
              "type": "string",
              "enum": [
                "administration",
                "creditors-voluntary-liquidation",
                "members-voluntary-liquidation",
                "winding-up-petition",
                "winding-up-order",
                "receivership",
                "moratorium-cva",
                "strike-off-proposal",
                "other-insolvency-notices"
              ],
              "enumTitles": [
                "Administration (administrators appointed, administration orders)",
                "Creditors' voluntary liquidation (insolvent company: resolutions, liquidators, creditor decisions)",
                "Members' voluntary liquidation (solvent company closing)",
                "Winding-up petitions (and dismissed petitions)",
                "Winding-up orders and court-appointed liquidators (compulsory liquidation)",
                "Receivership (administrative receivers, receivers)",
                "Moratorium (Gazette) and company voluntary arrangement (CVA; watch list + API key)",
                "Proposal to strike off, first Gazette (watch list + API key)",
                "Other insolvency notices (meetings, dividends, final meetings, releases)"
              ]
            },
            "default": [
              "administration",
              "creditors-voluntary-liquidation",
              "members-voluntary-liquidation",
              "winding-up-petition",
              "winding-up-order",
              "receivership",
              "moratorium-cva",
              "strike-off-proposal"
            ]
          },
          "companyNumbers": {
            "title": "Watch list: company numbers",
            "type": "array",
            "description": "Return only events for these companies, e.g. your customers or suppliers: Companies House numbers such as 01234567, SC123456 or OC123456 (up to 1,000). Leave empty to get events for all UK companies.",
            "items": {
              "type": "string"
            }
          },
          "companyNameContains": {
            "title": "Company name contains",
            "type": "string",
            "description": "Optional word or phrase the company name must contain, e.g. CONSTRUCTION."
          },
          "sectors": {
            "title": "Sectors",
            "type": "array",
            "description": "Ready-made groups of SIC codes, the same as in UK New Companies Feed. Needs Companies House data (an API key), because notices don't carry SIC codes.",
            "items": {
              "type": "string",
              "enum": [
                "tech",
                "construction",
                "food",
                "hospitality",
                "beauty",
                "ecommerce",
                "retail",
                "real-estate",
                "consulting",
                "accounting-legal",
                "marketing",
                "creative-media",
                "health",
                "fitness",
                "transport-logistics",
                "finance",
                "education",
                "cleaning",
                "automotive",
                "recruitment",
                "care-services"
              ],
              "enumTitles": [
                "Tech: software, IT services, data and web",
                "Construction and building trades",
                "Food and drink: production, food shops, restaurants, takeaways, pubs",
                "Hospitality: hotels, holiday lets, restaurants, bars",
                "Beauty, hair and wellbeing",
                "Online retail (e-commerce)",
                "Shops and retail",
                "Real estate: letting, buying and selling, agents",
                "Management consultancy and PR",
                "Accounting, bookkeeping, tax and legal",
                "Marketing, advertising and market research",
                "Creative and media: design, photography, film, music, arts",
                "Health care",
                "Fitness and sport",
                "Transport, delivery and storage",
                "Finance and insurance",
                "Education and training",
                "Cleaning services",
                "Motor trade and car repair",
                "Recruitment and staffing",
                "Care homes, home care and childcare"
              ]
            }
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "SIC 2007 codes (62012) or prefixes of 2 to 4 digits (62 = every code starting with 62). Needs Companies House data (an API key).",
            "items": {
              "type": "string"
            }
          },
          "postcodePrefixes": {
            "title": "Postcode prefixes",
            "type": "array",
            "description": "Keep only companies whose registered office postcode starts with one of these: an area (M = Manchester area, not ME), a district (M1, SW1A) or a longer start (SW1A 1). Uses the Companies House address when available, otherwise the postcode published in the notice.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum events",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many events (newest first). Each event returned costs $0.003.",
            "default": 100
          },
          "enrichWithCompaniesHouse": {
            "title": "Add Companies House data",
            "type": "boolean",
            "description": "Adds company status, incorporation date, SIC codes with descriptions, registered office and insolvency cases from the Companies House API, and finds the company number by name when a notice doesn't give one. Needs an API key; without one, the Gazette data is still returned and each row says that enrichment was skipped.",
            "default": true
          },
          "apiKey": {
            "title": "Companies House API key",
            "type": "string",
            "description": "Your free REST API key from the Companies House Developer Hub (developer.company-information.service.gov.uk: register, create an application, create an API key). It is stored encrypted. Leave it empty to use the Actor owner's default key if one is set; without any key, Gazette data is returned without Companies House fields."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}