{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Company Insolvency Notices (The Gazette)",
    "description": "Daily alerts for UK company liquidations, administrations and winding-up petitions from The Gazette, with company number, court, case number, insolvency practitioners and address. Filter by notice type, company and location. Built for overnight schedules. Company notices only.",
    "version": "1.0",
    "x-build-id": "6YHJKAy7Gg8NVzHh5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/onibaku~uk-gazette-insolvency/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-onibaku-uk-gazette-insolvency",
        "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/onibaku~uk-gazette-insolvency/runs": {
      "post": {
        "operationId": "runs-sync-onibaku-uk-gazette-insolvency",
        "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/onibaku~uk-gazette-insolvency/run-sync": {
      "post": {
        "operationId": "run-sync-onibaku-uk-gazette-insolvency",
        "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": {
          "publishedWithinDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Counting today (UK time) as day 1, so 2 means today and yesterday. Ignored when \"Published from\" is set. Up to 31.",
            "default": 2
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "A start date (YYYY-MM-DD). Overrides \"Published in the last N days\". One run covers at most 31 days."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "An end date (YYYY-MM-DD). Leave empty for today."
          },
          "noticeGroups": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for every corporate insolvency notice. Grouped from the Gazette's notice types; each row's noticeType has the exact one.",
            "items": {
              "type": "string",
              "enum": [
                "winding-up-petition",
                "winding-up-order",
                "resolution",
                "liquidator-appointment",
                "administration",
                "receivership",
                "final-account",
                "meeting-or-decision",
                "notice-to-creditors",
                "dividend",
                "arrangement-or-moratorium",
                "other"
              ],
              "enumTitles": [
                "Winding-up petitions",
                "Winding-up orders",
                "Resolutions for winding up",
                "Appointment of liquidators",
                "Administration",
                "Receivership",
                "Final accounts and final meetings",
                "Meetings and decision procedures",
                "Notices to creditors (proving debts)",
                "Dividends",
                "Voluntary arrangements, moratoriums and restructuring",
                "Other"
              ]
            }
          },
          "noticeCodes": {
            "title": "Gazette notice codes",
            "type": "array",
            "description": "The Gazette's own 4-digit notice codes, e.g. 2450 (petitions to wind up), 2452 (winding-up orders). Only codes starting 24 (Corporate Insolvency) can match.",
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company name contains (any of)",
            "type": "array",
            "description": "Words or phrases matched against the company name, case-insensitive, at the start of a word: \"construction\", \"holdings\", \"Acme Trading\".",
            "items": {
              "type": "string"
            }
          },
          "companyNumbers": {
            "title": "Company numbers",
            "type": "array",
            "description": "Companies House numbers to watch, e.g. 01234567 or SC123456. Each number is one extra search on the Gazette, so keep the list short (up to about 50).",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Near these places",
            "type": "array",
            "description": "Up to 10 UK postcodes, postcode districts or towns, e.g. \"LS1 4AP\", \"LS1\", \"Bristol\". The Gazette matches notices whose address is within the radius below. Towns and districts are measured from the postcode nearest their centre.",
            "items": {
              "type": "string"
            }
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How far from each place to search, when you give places.",
            "default": 5
          },
          "includeDetails": {
            "title": "Read each full notice",
            "type": "boolean",
            "description": "Adds the company number, court, case number, insolvency practitioners, address and event date. Each notice is one extra request at the Gazette's pace of one every 10 seconds. Turn off for a fast list with company name, notice type and date only.",
            "default": true
          },
          "includeNoticeText": {
            "title": "Include the notice text",
            "type": "boolean",
            "description": "The full notice as plain text, up to 4,000 characters. Needs \"Read each full notice\".",
            "default": false
          },
          "onlyNewNotices": {
            "title": "Only notices not returned before",
            "type": "boolean",
            "description": "Remembers the notices each run of this search returned and skips them next time. Use with a nightly schedule for alerts.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many notices. With full notices, 360 take about an hour.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}