{
  "openapi": "3.0.1",
  "info": {
    "title": "Polish Company Data Scraper - KRS, NIP, REGON & Contacts",
    "description": "Turn Polish company domains into registry-grade B2B leads from each site's statutory disclosure (KSH art. 206 / art. 374): firma, KRS number and registry court, checksum-validated NIP and REGON, share capital, registered office, email and phone. $0.007 per disclosure. No login, no browser.",
    "version": "0.1",
    "x-build-id": "2tCDukrZxHgcYZuIN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~pl-dane-spolki-website-contact-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-pl-dane-spolki-website-contact-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/scrapersdelight~pl-dane-spolki-website-contact-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-pl-dane-spolki-website-contact-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/scrapersdelight~pl-dane-spolki-website-contact-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-pl-dane-spolki-website-contact-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": {
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Polish company domains to process. A bare domain, a homepage URL or a direct link to a /kontakt, /regulamin or /polityka-prywatnosci page all work. An email address is accepted too - the domain is taken from it. Leave this empty to run the built-in 10-domain demo batch.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "The same list in Apify's request-list format, so Make, Zapier, Clay or a Google Sheet can hand over a URL list natively.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "domainsFileUrl": {
            "title": "Domain list URL (CSV / TXT / JSON)",
            "type": "string",
            "description": "A public URL holding the domain list. CSV, TSV, one-per-line TXT, JSON array and JSONL are all read; a header row naming domain / website / url is detected automatically."
          },
          "sourceDatasetId": {
            "title": "Source dataset ID",
            "type": "string",
            "description": "Read the domains out of an existing Apify dataset - the output of a Maps, directory or register scraper, for example."
          },
          "domainFieldName": {
            "title": "Domain field name",
            "type": "string",
            "description": "Which field of the source dataset or CSV holds the website. Leave empty to auto-detect domain / website / websiteUrl / url / site / homepage."
          },
          "skipDomains": {
            "title": "Skip these domains",
            "type": "array",
            "description": "Domains to drop before any request is made. They are never fetched and never charged.",
            "items": {
              "type": "string"
            }
          },
          "previousDatasetId": {
            "title": "Previous run dataset ID (suppression)",
            "type": "string",
            "description": "A dataset from an earlier run. Every KRS, NIP and domain it already delivered is suppressed, so a monthly re-run never re-buys a row you already paid for."
          },
          "maxItems": {
            "title": "Max results (billing cap)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many BILLED rows. This is the hard ceiling on what a run can cost you: rows that are not delivered are not charged, so this number times the per-row price is your maximum spend. 0 means no cap.",
            "default": 1000
          },
          "maxDomains": {
            "title": "Max domains to process",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after reading this many domains from the input, whether or not they yielded a disclosure. 0 means all of them.",
            "default": 0
          },
          "maxPagesParsed": {
            "title": "Max pages parsed per domain",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages of one site may be parsed before giving up. A Polish disclosure is usually split across two or three pages (the KRS on /regulamin, the email on /kontakt), which is why the default is 4 rather than 1.",
            "default": 4
          },
          "maxDiscoveryRequestsPerDomain": {
            "title": "Max requests per domain",
            "minimum": 0,
            "maximum": 40,
            "type": "integer",
            "description": "Budget of HTTP requests spent looking for the disclosure on one site, homepage included.",
            "default": 10
          },
          "perDomainTimeoutSecs": {
            "title": "Per-domain timeout",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Hard deadline for one domain. When it expires the domain is abandoned, reported as unreachable and never charged.",
            "default": 60
          },
          "requestConcurrency": {
            "title": "Request concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many domains to process in parallel. Each parallel domain needs roughly 80 MB, so this is automatically lowered to fit the memory the run was given - raise the Actor's memory if you want more parallelism.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for one HTTP request.",
            "default": 25
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "How many times a failed request is retried, each time on a fresh proxy IP.",
            "default": 2
          },
          "discoveryChannels": {
            "title": "Where to look for the disclosure",
            "type": "array",
            "description": "Which channels to use, in order. homepage = the site-wide footer; anchor = the site's own links ranked by text and href (kontakt, regulamin, polityka prywatnosci, o nas, dane spolki); pathGuess = the conventional Polish paths; sitemap = the XML sitemap; wpJson = the WordPress page index.",
            "items": {
              "type": "string",
              "enum": [
                "homepage",
                "anchor",
                "pathGuess",
                "sitemap",
                "wpJson"
              ],
              "enumTitles": [
                "Homepage footer",
                "Ranked page links",
                "Guessed Polish paths",
                "XML sitemap",
                "WordPress page index"
              ]
            },
            "default": [
              "homepage",
              "anchor",
              "pathGuess",
              "sitemap",
              "wpJson"
            ]
          },
          "deepJsDiscovery": {
            "title": "Deep JavaScript discovery",
            "type": "boolean",
            "description": "For sites whose footer only appears after a client-side render: read the page's inline JSON payloads and JavaScript bundles for the legal-page URL. No browser is launched. Slower, off by default.",
            "default": false
          },
          "followWwwAndRootVariants": {
            "title": "Retry with / without www",
            "type": "boolean",
            "description": "If the homepage does not answer, try the other of example.pl and www.example.pl before giving up.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy, or your own. The datacenter pool is the measured-fastest default; a genuine block escalates to residential automatically.",
            "default": {
              "useApifyProxy": true
            }
          },
          "proxyCountry": {
            "title": "Proxy country",
            "enum": [
              "none",
              "PL",
              "DE",
              "GB",
              "US",
              "FR",
              "NL",
              "CZ"
            ],
            "type": "string",
            "description": "Pin the exit node to a country. Apify can only pin RESIDENTIAL proxies to a country, so choosing anything other than None switches the run to residential - slower and dearer. Polish sites do not require a Polish IP.",
            "default": "none"
          },
          "escalateToResidentialOnBlock": {
            "title": "Escalate to residential on a block",
            "type": "boolean",
            "description": "When a site refuses the datacenter IP with a 403 or a challenge page, retry once through a residential IP.",
            "default": true
          },
          "escalateToUnblockerOnBlock": {
            "title": "Escalate to Unblocker on a block",
            "type": "boolean",
            "description": "Second escalation for the anti-bot tail, using Apify Unblocker. Costs more proxy credit; off by default.",
            "default": false
          },
          "customUserAgent": {
            "title": "Custom User-Agent",
            "type": "string",
            "description": "Override the browser User-Agent sent with every request."
          },
          "extraHttpHeaders": {
            "title": "Extra HTTP headers",
            "type": "object",
            "description": "Extra headers merged into every request."
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages the site's robots.txt disallows for this User-Agent. Off by default: a statutory disclosure the company is legally required to publish about itself is not private, and skipped pages are reported and never charged.",
            "default": false
          },
          "validateTaxId": {
            "title": "Validate NIP and REGON checksums",
            "type": "boolean",
            "description": "Run the NIP weighted checksum (weights 6,5,7,2,3,4,5,6,7 mod 11) and the REGON checksum on every number found, and report the result per row. Turning this off leaves nipValid and regonValid null rather than making them up.",
            "default": true
          },
          "extractRegon": {
            "title": "Extract REGON",
            "type": "boolean",
            "description": "Read the REGON statistical number (9-digit entity or 14-digit local unit) and check its own checksum.",
            "default": true
          },
          "extractCourt": {
            "title": "Extract the registry court",
            "type": "boolean",
            "description": "Read the sad rejestrowy and its commercial division - the art. 206 §1 pt 2 element ('Sad Rejonowy dla Wroclawia-Fabrycznej we Wroclawiu, VI Wydzial Gospodarczy').",
            "default": true
          },
          "extractShareCapital": {
            "title": "Extract share capital",
            "type": "boolean",
            "description": "Read the kapital zakladowy as a number plus its currency, and whether it is stated as paid up in full - the art. 206 §1 pt 4 / art. 374 §1 pt 4 element.",
            "default": true
          },
          "extractOfficer": {
            "title": "Extract a named officer",
            "type": "boolean",
            "description": "Read a named prezes zarzadu, wlasciciel, dyrektor or inspektor ochrony danych when the page states one. Fill is low: Polish companies publish the zarzad in the KRS, not usually on the website.",
            "default": true
          },
          "extractSocials": {
            "title": "Extract social profiles",
            "type": "boolean",
            "description": "Collect LinkedIn, Facebook, Instagram, X, YouTube and TikTok profile links.",
            "default": true
          },
          "extractPolicyUrls": {
            "title": "Extract regulamin / privacy URLs",
            "type": "boolean",
            "description": "Record the URLs of the site's regulamin and polityka prywatnosci pages.",
            "default": true
          },
          "emailPolicy": {
            "title": "Which emails to keep",
            "enum": [
              "all",
              "exclude-role",
              "role-only"
            ],
            "type": "string",
            "description": "Agencies disagree on whether biuro@ and kontakt@ count as leads, so it is your call. Role mailboxes are the Polish generic ones: biuro, kontakt, sekretariat, sprzedaz, rekrutacja, rodo and the rest.",
            "default": "all"
          },
          "requireRegistryId": {
            "title": "Only rows with a registry identifier",
            "type": "boolean",
            "description": "Deliver only companies publishing a KRS, NIP or REGON. Rows removed by this filter are never charged.",
            "default": false
          },
          "requireKrs": {
            "title": "Only rows with a KRS number",
            "type": "boolean",
            "description": "Deliver only companies publishing a KRS entry number - in practice, only registered sp. z o.o. and S.A. companies.",
            "default": false
          },
          "requireValidNip": {
            "title": "Only rows with a checksum-valid NIP",
            "type": "boolean",
            "description": "Deliver only rows whose NIP passes the weighted checksum. A published NIP that fails the checksum is a fact about the site, so this is off by default.",
            "default": false
          },
          "requireContact": {
            "title": "Only rows with an email or phone",
            "type": "boolean",
            "description": "Deliver only rows carrying at least one way to reach the company.",
            "default": false
          },
          "legalFormFilter": {
            "title": "Only these legal forms",
            "type": "array",
            "description": "Keep only the listed legal forms. Leave empty for all of them.",
            "items": {
              "type": "string",
              "enum": [
                "sp. z o.o.",
                "S.A.",
                "P.S.A.",
                "S.K.A.",
                "sp. z o.o. sp.k.",
                "sp.k.",
                "sp.j.",
                "sp.p.",
                "s.c.",
                "fundacja",
                "stowarzyszenie",
                "spółdzielnia",
                "jednoosobowa działalność gospodarcza"
              ],
              "enumTitles": [
                "sp. z o.o.",
                "S.A.",
                "P.S.A. (prosta spolka akcyjna)",
                "S.K.A.",
                "sp. z o.o. sp.k.",
                "sp.k. (komandytowa)",
                "sp.j. (jawna)",
                "sp.p. (partnerska)",
                "s.c. (cywilna)",
                "fundacja",
                "stowarzyszenie",
                "spoldzielnia",
                "jednoosobowa dzialalnosc gospodarcza"
              ]
            }
          },
          "minShareCapital": {
            "title": "Minimum share capital (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only companies whose published kapital zakladowy is at least this much. Rows that publish no share capital are removed by any value above 0.",
            "default": 0
          },
          "minFieldsRequired": {
            "title": "Minimum populated fields",
            "minimum": 0,
            "maximum": 22,
            "type": "integer",
            "description": "Keep only rows carrying at least this many of the 22 value fields.",
            "default": 0
          },
          "tldFilterMode": {
            "title": "Domain suffix filter",
            "enum": [
              "none",
              "include",
              "exclude"
            ],
            "type": "string",
            "description": "Off by default on purpose: many real Polish companies, and disproportionately the larger ones, publish on .com or .eu rather than .pl, so filtering to .pl silently discards them.",
            "default": "none"
          },
          "tldFilter": {
            "title": "Domain suffixes",
            "type": "array",
            "description": "The suffixes the filter above applies to, for example pl, com.pl, eu.",
            "items": {
              "type": "string"
            }
          },
          "dedupeBy": {
            "title": "Deduplicate by",
            "enum": [
              "krs-then-domain",
              "krs",
              "nip",
              "domain",
              "none"
            ],
            "type": "string",
            "description": "How repeated companies are collapsed. Deduplication happens BEFORE billing, so a duplicate can never be charged twice.",
            "default": "krs-then-domain"
          },
          "includeMissRows": {
            "title": "Include unbilled miss rows",
            "type": "boolean",
            "description": "Also deliver a row for every domain that produced nothing, with the reason kept apart: unreachable host, refused by the site, publishes no disclosure, removed by your filters, duplicate or suppressed. These rows are NEVER charged - they exist so you can account for your whole input list.",
            "default": false
          },
          "includeFieldSources": {
            "title": "Include the page each field came from",
            "type": "boolean",
            "description": "Add a fieldSources object giving the page path each field was read from, so you can see that the KRS came from /regulamin and the email from /kontakt.",
            "default": false
          },
          "flattenOutput": {
            "title": "Flat output",
            "type": "boolean",
            "description": "One flat row per company, which is what a CSV export and most CRMs want. Turn it off for a nested company / registry / contact / people / policies object.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}