{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Gazette Insolvency Scraper: Winding Up & Liquidations",
    "description": "UK Gazette insolvency notices: winding up petitions and orders, administrations and liquidations with company number and postcode. Honest notice: The Gazette currently refuses Apify cloud access (HTTP 403), so runs stop cleanly with no charge. By RawTrader | UK Industry & Bills",
    "version": "0.1",
    "x-build-id": "FfLa7wpdkw7FDhcRb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seaf999ield~uk-gazette-insolvency-notices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seaf999ield-uk-gazette-insolvency-notices",
        "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-gazette-insolvency-notices/runs": {
      "post": {
        "operationId": "runs-sync-seaf999ield-uk-gazette-insolvency-notices",
        "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-gazette-insolvency-notices/run-sync": {
      "post": {
        "operationId": "run-sync-seaf999ield-uk-gazette-insolvency-notices",
        "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": [
              "search",
              "new_notices"
            ],
            "type": "string",
            "description": "new_notices keeps seen notice IDs in a named key-value store per monitor; the first run saves a baseline.",
            "default": "search"
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Corporate insolvency notice groups (Gazette notice codes in brackets). Strike-off notices are not available: The Gazette publishes them only as bulk supplement lists, not as data notices.",
            "items": {
              "type": "string",
              "enum": [
                "winding_up_petitions",
                "winding_up_orders",
                "administrations",
                "liquidations_cvl",
                "liquidations_mvl",
                "receiverships",
                "petition_dismissals"
              ],
              "enumTitles": [
                "Winding-up petitions (2450, 2451)",
                "Winding-up orders (2452, 2454)",
                "Administrations (2410, 2411)",
                "Creditors' voluntary liquidations (2441-2447)",
                "Members' voluntary liquidations (2431-2433)",
                "Receiverships (2421, 2423)",
                "Winding-up petitions dismissed (2461)"
              ]
            },
            "default": [
              "winding_up_petitions",
              "winding_up_orders",
              "administrations",
              "liquidations_cvl"
            ]
          },
          "includeBankruptcies": {
            "title": "Include personal bankruptcy orders (personal data)",
            "type": "boolean",
            "description": "Off by default. Bankruptcy notices concern private individuals; when on, only the name, date and notice URL are output (no address, birth details or excerpt). Use only with a lawful basis under UK GDPR.",
            "default": false
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Used when From date is empty.",
            "default": 7
          },
          "fromDate": {
            "title": "From date (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "First publication date."
          },
          "toDate": {
            "title": "To date (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Last publication date (default today)."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Full-text search done by The Gazette, e.g. 'construction' or a company name."
          },
          "companyNames": {
            "title": "Company name contains",
            "type": "array",
            "description": "Client-side text match on the company name / notice excerpt.",
            "items": {
              "type": "string"
            }
          },
          "postcodeAreas": {
            "title": "Postcode areas / districts",
            "type": "array",
            "description": "e.g. 'M', 'LS', 'EC1V'. Postcodes come from the notice location (reverse-geocoded with postcodes.io) or the registered office in the full notice.",
            "items": {
              "type": "string"
            }
          },
          "fetchFullNotice": {
            "title": "Fetch full notice text",
            "type": "boolean",
            "description": "Reads each notice page to add the insolvency practitioner name(s), registered office postcode, hearing date and a company number missing from the excerpt. Slow: The Gazette asks for 10 s between requests.",
            "default": false
          },
          "maxFullNotices": {
            "title": "Max full notices",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on full-notice fetches per run (10 s each).",
            "default": 30
          },
          "fetchMissingCompanyNumbers": {
            "title": "Look up missing company numbers",
            "type": "boolean",
            "description": "When the feed excerpt has no company number (or it is cut off), read the notice page to get it. Only used when 'Fetch full notice text' is off. Adds 10 s per lookup (The Gazette crawl delay).",
            "default": true
          },
          "maxNumberLookups": {
            "title": "Max company-number lookups",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on notice pages read for missing company numbers per run (10 s each). 0 disables lookups.",
            "default": 20
          },
          "addPostcodes": {
            "title": "Add postcodes from notice location",
            "type": "boolean",
            "description": "Reverse-geocode the notice's map point with postcodes.io.",
            "default": true
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "new_notices: separate saved state per name.",
            "default": "default"
          },
          "maxPages": {
            "title": "Max feed pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "100 notices per page, 10 s per page.",
            "default": 30
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum notices per run. 0 = no limit.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}