{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland Court & Business Gazette API – MSiG Announcements",
    "description": "Daily Monitor Sądowy i Gospodarczy (Polish Court and Business Gazette) notices about companies and other legal entities: bankruptcy, restructuring, liquidation, mergers, transformations, creditor calls, with KRS and court. Natural persons excluded. JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "TpbXJX3dNu0kzPVhz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/enterprising_hamster~polish-company-announcements-msig/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-enterprising_hamster-polish-company-announcements-msig",
        "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/enterprising_hamster~polish-company-announcements-msig/runs": {
      "post": {
        "operationId": "runs-sync-enterprising_hamster-polish-company-announcements-msig",
        "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/enterprising_hamster~polish-company-announcements-msig/run-sync": {
      "post": {
        "operationId": "run-sync-enterprising_hamster-polish-company-announcements-msig",
        "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 calendar days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Keep issues whose cover date is on or after today minus N-1 days. Ignored when dateFrom or dateTo is set. Default 1 is today's issue only.",
            "default": 1
          },
          "dateFrom": {
            "title": "Issue date from",
            "type": "string",
            "description": "Inclusive ISO date (YYYY-MM-DD). When set, lastDays is ignored."
          },
          "dateTo": {
            "title": "Issue date to",
            "type": "string",
            "description": "Inclusive ISO date (YYYY-MM-DD). When set, lastDays is ignored."
          },
          "announcementKinds": {
            "title": "Announcement kinds",
            "type": "array",
            "description": "Optional. Keep only these kinds. Empty means every legal-entity notice.",
            "items": {
              "type": "string",
              "enum": [
                "bankruptcy",
                "restructuring",
                "liquidation",
                "merger",
                "demerger",
                "transformation",
                "dissolution",
                "creditor_call",
                "other"
              ]
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Matched against the entity name, the legal form, the chapter line, the subsection line, the kind, and KRS. The notice body is not searched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "krsNumbers": {
            "title": "KRS numbers",
            "type": "array",
            "description": "Optional. Keep notices whose header KRS matches (6-10 digits, padded to 10).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "fullText": {
            "title": "Include full notice text",
            "type": "boolean",
            "description": "Off by default. When on, fullText is the notice body and can name liquidators, shareholders, and other people. Turn it on only when you have a legal basis to store that text. Notices about natural persons are never returned.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum announcements to save",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop pushing once this many legal-entity rows are saved.",
            "default": 50
          },
          "maxRequestsPerSecond": {
            "title": "Maximum requests per second",
            "minimum": 0.2,
            "maximum": 5,
            "type": "number",
            "description": "Minimum spacing between GetFiles and PDF download requests to the Ministry site.",
            "default": 1
          },
          "onlyNew": {
            "title": "Only announcements not seen before",
            "type": "boolean",
            "description": "Skip ids stored under stateKey in the polish-msig-seen key-value store (50,000 ids per key).",
            "default": false
          },
          "stateKey": {
            "title": "State key for only-new runs",
            "type": "string",
            "description": "Key in the seen store when onlyNew is true. Use a unique name per alert task."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}