{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland Company Lookup API – REGON, NIP, KRS",
    "description": "Look up a Polish company by NIP, REGON or KRS in the official GUS registry (Poland REGON, company lookup Poland): name, address, PKD, dates, optional VAT status. No phone or email. Replace the sample tax ids or the run charges those samples. onlyChanged charges only on status changes.",
    "version": "0.1",
    "x-build-id": "2TtSds8GIJ9RGtohZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/enterprising_hamster~polish-company-lookup-regon/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-enterprising_hamster-polish-company-lookup-regon",
        "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-lookup-regon/runs": {
      "post": {
        "operationId": "runs-sync-enterprising_hamster-polish-company-lookup-regon",
        "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-lookup-regon/run-sync": {
      "post": {
        "operationId": "run-sync-enterprising_hamster-polish-company-lookup-regon",
        "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": {
          "nips": {
            "title": "NIP numbers",
            "type": "array",
            "description": "Tax identifiers (NIP). If this field is omitted, the run looks up and charges 7740001454, 6920000013, 5250007738 and 5260250274. Send your own list, or an empty list when you are not looking up a NIP. Omitting this field does not clear the default REGON. Spaces, hyphens and a leading PL are ignored. An invalid checksum is returned with found set to false and is not charged.",
            "default": [
              "7740001454",
              "6920000013",
              "5250007738",
              "5260250274"
            ],
            "items": {
              "type": "string"
            }
          },
          "regons": {
            "title": "REGON numbers",
            "type": "array",
            "description": "9-digit subjects or 14-digit local units. If this field is omitted, the run looks up and charges 000331501. Send your own list, or an empty list when you are not looking up a REGON. Checksums are validated. An invalid checksum is returned with found set to false and is not charged.",
            "default": [
              "000331501"
            ],
            "items": {
              "type": "string"
            }
          },
          "krsNumbers": {
            "title": "KRS numbers",
            "type": "array",
            "description": "Court numbers. The default is an empty list, so omitting this field adds no lookup. Shorter values are zero-padded to 10 digits. Each number is looked up on its own. A value with no digits, or more than 10 digits, is returned with found set to false and is not charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "identifiers": {
            "title": "Mixed identifiers",
            "type": "array",
            "description": "Mixed identifiers. The default is an empty list, so omitting this field adds no lookup. Optional prefixes are NIP:, REGON: and KRS:. Without a prefix, 9 or 14 digits are a REGON and 10 digits with a valid NIP checksum are a NIP. Anything else is returned with found set to false, error \"ambiguous, use prefix\", and is not charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "gusApiKey": {
            "title": "GUS API key",
            "type": "string",
            "description": "Optional. Your own production BIR1 user key from GUS. Leave this empty on Apify and the Actor uses its own production key. If neither key is set, the run fails unless useTestEnvironment is true."
          },
          "useTestEnvironment": {
            "title": "Use GUS test environment",
            "type": "boolean",
            "description": "When no production key is set, call the public GUS test service. Data is anonymized and frozen around 8 November 2014. Ignored when a key is set.",
            "default": false
          },
          "includeLocalUnits": {
            "title": "Include local units",
            "type": "boolean",
            "description": "Nest up to 50 local units (14-digit REGON) on each company. No extra charge. A 14-digit REGON in the input is its own row.",
            "default": false
          },
          "includeSoleTraders": {
            "title": "Include sole traders",
            "type": "boolean",
            "description": "When false, a sole trader (JDG) is returned with found=true and skipped=sole_trader and is not charged.",
            "default": true
          },
          "soleTraderFullAddress": {
            "title": "Full address for sole traders",
            "type": "boolean",
            "description": "Include street, building and apartment for a sole trader. Those three lines stay empty when this is false. City, postal code, municipality, county, voivodeship and TERYT are still filled. Default is false.",
            "default": false
          },
          "checkVatStatus": {
            "title": "Check VAT status",
            "type": "boolean",
            "description": "Ask the Ministry of Finance WL2 status method. Adds vatStatus, vatCheckedAt and vatRequestId. On failure the company is still returned with vatError. No bank accounts and no people.",
            "default": false
          },
          "onlyChanged": {
            "title": "Only status changes",
            "type": "boolean",
            "description": "Compare suspension date, resumption date, end date, deletion date, derived status and VAT status with the previous run. VAT status is compared only when checkVatStatus is on. The first successful monitor run stores a baseline, saves no company rows and charges nothing. A later run charges the normal company price only when one of those values changes. Not-found and invalid rows are not saved. Default is false.",
            "default": false
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many charged companies. Empty means no cap. Not-found rows and skipped sole traders do not count."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}