{
  "openapi": "3.0.1",
  "info": {
    "title": "CEIDG sole proprietorships in Poland, jednoosobowa",
    "description": "New sole proprietorships in Poland from the official CEIDG registry, filtered by start date, PKD and voivodeship. Rows have NIP, REGON, status and address; no phone or email. Empty dates mean yesterday. Leave ceidgApiToken empty if the Actor has CEIDG_API_TOKEN; the run fails if both are empty.",
    "version": "0.1",
    "x-build-id": "NNEQ9543plmNqxaSg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/enterprising_hamster~polish-new-sole-proprietorships-ceidg/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-enterprising_hamster-polish-new-sole-proprietorships-ceidg",
        "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-new-sole-proprietorships-ceidg/runs": {
      "post": {
        "operationId": "runs-sync-enterprising_hamster-polish-new-sole-proprietorships-ceidg",
        "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-new-sole-proprietorships-ceidg/run-sync": {
      "post": {
        "operationId": "run-sync-enterprising_hamster-polish-new-sole-proprietorships-ceidg",
        "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": {
          "dateFrom": {
            "title": "From date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "First day (YYYY-MM-DD, Europe/Warsaw). For events started this is the activity start date. For events changed this is the entry-change date. Empty with dateTo empty means yesterday. One day when only dateFrom is set."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Last day, inclusive, YYYY-MM-DD. When dateFrom is empty, this day alone is the range. When dateFrom is later than dateTo, the two days are swapped and the run continues. The inclusive range may be at most 366 days, for example 2024-01-01 through 2024-12-31. Started mode reads that range in consecutive windows of at most 31 days. Changed mode still reads it in windows of 5 days."
          },
          "pkd": {
            "title": "PKD codes",
            "type": "array",
            "description": "PKD codes or prefixes as the CEIDG filter expects them, for example 41 or 4120Z. Dots and spaces are removed. Empty means any activity.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "voivodeships": {
            "title": "Voivodeships",
            "type": "array",
            "description": "Place of business must be in one of these voivodeships. Values match the API, for example mazowieckie. Empty means the whole country.",
            "items": {
              "type": "string",
              "enum": [
                "dolnośląskie",
                "kujawsko-pomorskie",
                "lubelskie",
                "lubuskie",
                "łódzkie",
                "małopolskie",
                "mazowieckie",
                "opolskie",
                "podkarpackie",
                "podlaskie",
                "pomorskie",
                "śląskie",
                "świętokrzyskie",
                "warmińsko-mazurskie",
                "wielkopolskie",
                "zachodniopomorskie"
              ],
              "enumTitles": [
                "dolnośląskie",
                "kujawsko-pomorskie",
                "lubelskie",
                "lubuskie",
                "łódzkie",
                "małopolskie",
                "mazowieckie",
                "opolskie",
                "podkarpackie",
                "podlaskie",
                "pomorskie",
                "śląskie",
                "świętokrzyskie",
                "warmińsko-mazurskie",
                "wielkopolskie",
                "zachodniopomorskie"
              ]
            },
            "default": []
          },
          "maxItems": {
            "title": "Max entries",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many found entries are saved. Omitted means 20.",
            "default": 20
          },
          "events": {
            "title": "Events",
            "type": "array",
            "description": "Default is started only. started filters /firmy by the activity start date. changed reads /zmiana by the entry-change date, then each entry. Both run started first, then changed, and the same id is charged once.",
            "items": {
              "type": "string",
              "enum": [
                "started",
                "changed"
              ],
              "enumTitles": [
                "Activity started",
                "Entry changed"
              ]
            },
            "default": [
              "started"
            ]
          },
          "includePkd": {
            "title": "Include PKD and status dates",
            "type": "boolean",
            "description": "For started, the /firmy list has no PKD. When this is true, each listed entry is read for PKD codes and for suspension, resumption, end, and deletion dates. Changed always reads each entry, whether this is true or false. The same field allow-list applies. Default true.",
            "default": true
          },
          "skipSeen": {
            "title": "Skip businesses already delivered",
            "type": "boolean",
            "description": "Skip a NIP that an earlier run of this Actor already saved. When the list already shows that NIP, the entry is not fetched again and is not charged. The default false does not skip. The memory keeps the 50,000 most recent NIP numbers. maxItems still counts only entries saved in the current run.",
            "default": false
          },
          "includeVatStatus": {
            "title": "Add VAT status",
            "type": "boolean",
            "description": "The row always has statusVat, statusVatCode, and dataSprawdzenia. They stay null when this is false. When this is true, each found entry with a 10-digit NIP is checked on today's date in Europe/Warsaw against the Ministry of Finance whitelist (WL2). Calls are at least 0.25 seconds apart. Bank accounts, PESEL, phone, and email are not requested. Default false.",
            "default": false
          },
          "soleTraderFullAddress": {
            "title": "Include street and building",
            "type": "boolean",
            "description": "Default false. When false, the address has voivodeship, county, municipality, city, postal code and TERC/SIMC/ULIC only. Street, building and apartment are added only when this is true.",
            "default": false
          },
          "ceidgApiToken": {
            "title": "CEIDG API token",
            "type": "string",
            "description": "Leave empty when the Actor has CEIDG_API_TOKEN. Otherwise paste a CEIDG Hurtownia JWT (Authorization Bearer). A non-empty value here is used instead of that environment variable, and surrounding spaces are removed. Blank text counts as empty. If this field and the environment variable are both empty, the run fails before any request and charges nothing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}