{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Insolvency Notices – Gazette Winding-Up & Liquidation Alerts",
    "description": "Corporate insolvency notices from The Gazette (official, OGL): winding-up petitions & orders, administrations, CVL/MVL liquidations. Company number, notice type, court, address. Watchlist, keywords, only-new alerts. $2 per 1,000.",
    "version": "0.1",
    "x-build-id": "e01BX4Jo6YWWICgs2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~uk-gazette-insolvency-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-uk-gazette-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/gazidev~uk-gazette-insolvency-alerts/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-uk-gazette-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/gazidev~uk-gazette-insolvency-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-uk-gazette-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": {
          "noticeGroups": {
            "title": "Notice types",
            "type": "array",
            "description": "Which corporate insolvency notices to return. Empty = all corporate insolvency notices. Personal insolvency (bankruptcy) and deceased-estates notices are never returned.",
            "items": {
              "type": "string",
              "enum": [
                "petitions",
                "windingUpOrders",
                "compulsoryLiquidation",
                "administration",
                "receivership",
                "membersVoluntary",
                "creditorsVoluntary",
                "other"
              ],
              "enumTitles": [
                "Petitions to wind up (companies)",
                "Winding-up orders",
                "Compulsory liquidation - liquidator appointments & meetings",
                "Administration (appointment of administrators...)",
                "Receivership",
                "Members' voluntary liquidation (MVL, solvent)",
                "Creditors' voluntary liquidation (CVL)",
                "Other (dividends, moratoria, prohibited names, notices to creditors...)"
              ]
            }
          },
          "daysBack": {
            "title": "Last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Publication date window: today minus N days to today (about 200-300 corporate notices per weekday). Ignored when *From date* is set.",
            "default": 1
          },
          "dateFrom": {
            "title": "From date (publication)",
            "type": "string",
            "description": "YYYY-MM-DD. Overrides *Last N days*."
          },
          "dateTo": {
            "title": "To date (publication)",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "companyNumbers": {
            "title": "Company number watchlist",
            "type": "array",
            "description": "Only notices about these Companies House numbers, e.g. `12227388`, `SC123456` (leading zeros optional). Matched against the number printed in the notice summary. Combine with *Only new notices* and a daily schedule for alerts.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (any of)",
            "type": "array",
            "description": "Case-insensitive match on company name and notice summary, e.g. `construction`, `restaurant`, `High Court`, `Manchester`.",
            "items": {
              "type": "string"
            }
          },
          "searchText": {
            "title": "Gazette full-text search",
            "type": "string",
            "description": "Optional query sent to The Gazette's own search (matches the full notice text, e.g. an insolvency practitioner firm or a town). Narrows the feed before the other filters."
          },
          "noticeCodes": {
            "title": "Notice codes (advanced)",
            "type": "array",
            "description": "Exact Gazette notice codes (24xx), e.g. `2450` petitions, `2452` winding-up orders, `2410` appointment of administrators, `2441` CVL resolutions.",
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new notices (monitoring)",
            "type": "boolean",
            "description": "Skip notices returned by earlier runs with the same *State key* (stored in the named key-value store `uk-gazette-insolvency-state`). Schedule daily for an alert feed.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separate 'already seen' lists for different monitors.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max notices",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many notices, newest first (0 = all matching). You pay per notice saved.",
            "default": 100
          },
          "maxPages": {
            "title": "Max feed pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap on feed pages read (100 notices each). The Gazette asks for 10 seconds between requests, so each page adds ~10 s.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}