{
  "openapi": "3.0.1",
  "info": {
    "title": "Uk Insolvency Notices Gazette",
    "description": "Monitor official UK insolvency notices from The Gazette, the Crown's official journal of public record (London, Edinburgh & Belfast editions). Every corporate insolvency event in the UK is legally required to be published here, and this actor gives you a clean, structured feed of it.",
    "version": "0.3",
    "x-build-id": "vYuG8HfvxzCj9KLbM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devon_gtme~uk-insolvency-notices-gazette/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devon_gtme-uk-insolvency-notices-gazette",
        "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/devon_gtme~uk-insolvency-notices-gazette/runs": {
      "post": {
        "operationId": "runs-sync-devon_gtme-uk-insolvency-notices-gazette",
        "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/devon_gtme~uk-insolvency-notices-gazette/run-sync": {
      "post": {
        "operationId": "run-sync-devon_gtme-uk-insolvency-notices-gazette",
        "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": {
          "noticeTypes": {
            "title": "Notice Type Codes",
            "type": "array",
            "description": "Gazette notice type codes to monitor. DISTRESS SIGNALS (the default): 2450 = Petitions to Wind Up (Companies), 2452 = Winding-Up Orders, 2441 = Resolutions for Winding Up (creditors' voluntary), 2443 = Appointment of Liquidators (creditors' voluntary), 2410 = Appointment of Administrators. ALSO USEFUL: 2442 = Meetings of Creditors, 2446 = Notices to Creditors, 2445 = Final Meetings, 2451 = Petitions to Wind Up (Partnerships), 2453 = Winding-Up Orders (Partnerships), 2421 = Appointment of Administrative Receivers. NOT DISTRESS — solvent members' voluntary liquidations: 2431 = Resolutions for Winding-up (MVL), 2432 = Appointment of Liquidators (MVL); add these only if you want solvent wind-ups too. NON-INSOLVENCY: 2903 = Deceased Estates, 2901 = Changes of Name. Leave empty for ALL notice types.",
            "default": [
              "2450",
              "2452",
              "2441",
              "2443",
              "2410"
            ],
            "items": {
              "type": "string"
            }
          },
          "categoryCodes": {
            "title": "Notice Category Codes (whole categories)",
            "type": "array",
            "description": "Take WHOLE categories instead of picking individual notice codes above. 24 = Corporate Insolvency (every company notice), 25 = Personal Insolvency (bankruptcy orders, sequestrations, trust deeds, statutory demands). Other categories: 26 = Companies Regulation, 29 = Personal Legal (deceased estates), 11 = State. This field also accepts the longer G-codes used by The Gazette's own search form (e.g. G405010202 = Creditors' voluntary liquidation > Appointment of liquidators), so you can mirror a set of checkboxes from the website exactly — tick the boxes on thegazette.co.uk/insolvency/notice, then copy the categorycode values out of the resulting URL. IMPORTANT: The Gazette treats category codes and notice type codes as OR, not AND — setting both WIDENS the result set rather than narrowing it. Use one or the other.",
            "items": {
              "type": "string"
            }
          },
          "editions": {
            "title": "Gazette Edition",
            "type": "array",
            "description": "Limit to one or more editions. London covers England & Wales, Edinburgh covers Scotland, Belfast covers Northern Ireland. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "London",
                "Edinburgh",
                "Belfast"
              ]
            }
          },
          "localAuthorities": {
            "title": "Local Authorities",
            "type": "array",
            "description": "Restrict to named local authorities, spelled as The Gazette does — e.g. \"Manchester\", \"City of London\", \"Birmingham\". Multiple authorities are OR'd together.",
            "items": {
              "type": "string"
            }
          },
          "locationPostcodes": {
            "title": "Locations (postcode or town)",
            "type": "array",
            "description": "Restrict to notices near one or more postcodes or place names — e.g. \"M1 2AB\" or \"Manchester\". Each is matched within the radius set below, and multiple locations are OR'd together. The Gazette allows 10 locations per search in total, counting any local authorities above.",
            "items": {
              "type": "string"
            }
          },
          "locationDistanceMiles": {
            "title": "Location radius (miles)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Search radius around each location above. The Gazette's own search offers 1, 5, 10, 15, 20, 25 and 30 miles; other values are accepted too.",
            "default": 20
          },
          "issues": {
            "title": "Issue Numbers",
            "type": "array",
            "description": "Restrict to specific Gazette issue numbers, e.g. 65432. Searches across editions. Most users leave this empty.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days Back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Fetch notices published in the last N days. Ignored if explicit dates are set below.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published From (YYYY-MM-DD)",
            "type": "string",
            "description": "Explicit start publish date. Overrides Days Back when set."
          },
          "publishedTo": {
            "title": "Published To (YYYY-MM-DD)",
            "type": "string",
            "description": "Explicit end publish date. Defaults to today."
          },
          "searchText": {
            "title": "Search Text",
            "type": "string",
            "description": "Free-text search across notices — company name, town, keyword."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "latest-date",
              "oldest-date"
            ],
            "type": "string",
            "description": "Order the results by publication date.",
            "default": "latest-date"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum notices to return.",
            "default": 500
          },
          "fetchFullNotice": {
            "title": "Fetch full notice text & details",
            "type": "boolean",
            "description": "ON (recommended): fetches each notice's official record to give you the COMPLETE notice text in `noticeText`, plus structured fields parsed from it — company name & number, registered office, court and case number, petitioner, hearing date/time/venue, meeting details, insolvency practitioners with their firm, email and phone. OFF: only the truncated `contentPreview` from the search feed, which is faster and cheaper but cuts off mid-sentence.",
            "default": true
          },
          "includeNoticeHtml": {
            "title": "Also include notice HTML",
            "type": "boolean",
            "description": "Adds `noticeHtml` — the notice body with its original markup, so you can preserve paragraphs and tables. Most users only need `noticeText`.",
            "default": false
          },
          "detailConcurrency": {
            "title": "Full-notice fetch concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many notices to fetch in parallel. Higher is faster; keep it modest to stay polite to The Gazette's free service.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}