{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland MSiG Scraper: Bankruptcy & Insolvency Gazette Monitor",
    "description": "Scrape Poland's official Monitor Sądowy i Gospodarczy (MSiG) court and business gazette. Watch companies by KRS, NIP or name for only new bankruptcy, restructuring and liquidation notices, parsed into KRS, NIP, court, type and case signature. Pairs with our KRS scraper. No login or key.",
    "version": "0.1",
    "x-build-id": "ItUL15QdBdhqJibIf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~poland-msig-gazette-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-poland-msig-gazette-scraper",
        "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/getascraper~poland-msig-gazette-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-poland-msig-gazette-scraper",
        "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/getascraper~poland-msig-gazette-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-poland-msig-gazette-scraper",
        "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": {
          "lastDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "How many days back from today to read, when no exact dates are set below. 7 covers roughly the last week of gazette issues. Ignored if Date from or Date to is set.",
            "default": 7
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First publication date to include, as YYYY-MM-DD. Overrides Last N days. Leave empty to use Last N days."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last publication date to include, as YYYY-MM-DD. Overrides Last N days. Leave empty to use today."
          },
          "signatureType": {
            "title": "Gazette part (signature type)",
            "enum": [
              "A",
              "B",
              "both"
            ],
            "type": "string",
            "description": "Type A is the announcements part (bankruptcy, restructuring, liquidation, creditor calls and more). Type B is the KRS registry-entry part. Pick Both to read the whole issue in one run, which neither aging MSiG scraper on the Store does by default.",
            "default": "A"
          },
          "krsWatch": {
            "title": "KRS numbers to watch",
            "type": "array",
            "description": "Watch specific companies by KRS number (up to 10 digits each, one per line). Each is matched on the gazette's own server, so you get only that company's notices, not a whole date range. Turns the gazette into a KYB bankruptcy and insolvency alert for your portfolio. Pairs with the Poland KRS Company Registry scraper.",
            "items": {
              "type": "string"
            }
          },
          "nipWatch": {
            "title": "NIP numbers to watch",
            "type": "array",
            "description": "Watch specific entities by NIP tax number (10 digits each, one per line). Matched on the gazette server and enriched from each notice's full record.",
            "items": {
              "type": "string"
            }
          },
          "nameTerms": {
            "title": "Company name terms",
            "type": "array",
            "description": "Watch by entity name, one term per line, for example a company or a person. Matched against the entity name on the gazette server.",
            "items": {
              "type": "string"
            }
          },
          "bodyKeywords": {
            "title": "Full-text body keywords",
            "type": "array",
            "description": "Search the full text of each notice body on the gazette's own search, one keyword per line (Polish diacritics as written), for example a creditor name, a trustee or a term like układ. The PDF-based MSiG scraper on the Store cannot search the body text at all.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Keep only these notice types",
            "type": "array",
            "description": "Keep only notices classified as these types. Leave empty to keep every type. Classification needs each notice's detail, so choosing any type turns on detail fetching automatically.",
            "items": {
              "type": "string",
              "enum": [
                "bankruptcy",
                "restructuring",
                "creditor_call",
                "dissolution",
                "liquidation",
                "deletion",
                "registration",
                "change"
              ],
              "enumTitles": [
                "Bankruptcy (upadłość)",
                "Restructuring (restrukturyzacja)",
                "Creditor call (wezwanie wierzycieli)",
                "Dissolution without liquidation (art. 25a)",
                "Liquidation (likwidacja)",
                "Deletion / strike-off (wykreślenie)",
                "Registration (wpis)",
                "Change (zmiana)"
              ]
            },
            "default": []
          },
          "fetchDetails": {
            "title": "Fetch full notice details",
            "type": "boolean",
            "description": "Fetch each notice's full record and parse it into structured fields: KRS, NIP, issuing court, notice type, case signature and any monetary amounts, read from the official JSON, not a reconstructed PDF crop. Off by default so the daily run stays fast; turned on automatically by a KRS/NIP watch, a notice-type filter, grouping or full text.",
            "default": false
          },
          "includeFullText": {
            "title": "Include full notice text",
            "type": "boolean",
            "description": "Also include the complete notice body text. It can name individual people such as liquidators or creditors, so leave it off unless you have a lawful basis to process that. Requires full notice details.",
            "default": false
          },
          "groupByEntity": {
            "title": "Group notices by company",
            "type": "boolean",
            "description": "Output one record per company (by KRS) with all its notices nested inside, so a KYB user sees a company's whole gazette history in a single row. Requires full notice details. Neither MSiG scraper on the Store groups by entity.",
            "default": false
          },
          "maxNotices": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most notices (or companies, when grouping) to save in one run. Keep it small for scheduled monitoring; raise it for a one-off archive pull.",
            "default": 20
          },
          "onlyNew": {
            "title": "Only new notices since last run",
            "type": "boolean",
            "description": "On a schedule, return only notices this monitor has not reported before. The ids already seen are kept in a named store that survives between runs, so a daily run is a true change feed, not a repeat of yesterday.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "A short label (a-z, 0-9 and dashes) for this monitor's memory, so you can run several independent monitors, for example one per client watchlist. Left blank it is called default."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The official gazette is an open site that works over cheap Apify datacenter proxy, which is the default. No login, key or captcha is ever needed.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}