# KRS & CEIDG Company Scraper | Polish Leads by PKD (`trev0n/krs-ceidg-company-scraper`) Actor

Scrape Polish companies from the KRS and CEIDG registers by PKD code, voivodeship, city and status. Get NIP, REGON, KRS, address, share capital, website, LinkedIn, e-mails and phones scraped from company websites.

- **URL**: https://apify.com/trev0n/krs-ceidg-company-scraper.md
- **Developed by:** [Paweł](https://apify.com/trev0n) (community)
- **Categories:** Lead generation, Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 companies

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## KRS & CEIDG Company Scraper | Polish Leads by PKD

Scrape Polish companies from the public KRS and CEIDG registers. Filter by industry code (PKD), voivodeship, city and status, and get NIP, REGON, KRS, address, share capital, website, LinkedIn, e-mails and phones in one table.

### What does it do

- Covers companies registered in KRS as well as sole traders and civil partnerships from CEIDG.
- Matches PKD codes across both PKD 2007 and PKD 2025, so `62.01.Z` also finds companies registered under the new code.
- Scrapes contact data from each company's own website. A website counts only when the page shows the company's NIP or KRS number.

### Input examples

IT companies in Małopolska that have a website:

```json
{ "pkdCodes": ["62.01.Z"], "voivodeships": ["MAŁOPOLSKIE"], "requireWebsite": true, "maxResults": 500 }
```

Software and IT consulting in Kraków and Gdańsk, main activity only:

```json
{ "pkdCodes": ["62.01", "62.02"], "cities": ["Kraków", "Gdańsk"], "mainPkdOnly": true, "maxResults": 2000 }
```

One company by NIP, any status:

```json
{ "query": "5260250995", "status": "ALL" }
```

### Output

| Field | Example |
|---|---|
| `name` | 123 SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ |
| `nip`, `regon`, `krs` | 6762429377, 121298419, 0000366947 |
| `status` | AKTYWNY |
| `mainPkd` | 74.30.Z |
| `registrationDate` | 2010-10-01 |
| `shareCapitalPln` | 5000 |
| `address` | street, postal code, city, commune, county, voivodeship |
| `website`, `websiteVerifiedBy` | https://123tlumacz.com, nip |
| `linkedinUrl` | LinkedIn page linked from the website |
| `emails`, `phones` | from the website first, then from the register |

### Notes

- Several PKD codes, voivodeships and cities are combined: every PKD × voivodeship × city pair is one search, and duplicates are removed.
- Personal data of company officers is not included.

# Actor input Schema

## `pkdCodes` (type: `array`):

Industry codes (PKD 2007 or 2025). A prefix matches everything below it: 62 = whole division, 62.01 = class, 62.01.Z = subclass. Codes are matched across both PKD versions.

## `mainPkdOnly` (type: `boolean`):

Match only the company's main activity, not any of its registered codes.

## `voivodeships` (type: `array`):

Leave empty for the whole of Poland.

## `cities` (type: `array`):

Exact city names, e.g. Warszawa, Kraków. Case-insensitive.

## `query` (type: `string`):

Part of the company name, or an exact NIP (10 digits), REGON (9/14) or KRS number.

## `status` (type: `string`):

Registry status. Active is what most lead lists need.

## `requireWebsite` (type: `boolean`):

Only companies whose website was found (from the registry or verified by NIP/KRS on the site itself).

## `requireLinkedin` (type: `boolean`):

Only companies with a LinkedIn page linked from their own website.

## `requireContact` (type: `boolean`):

Only companies whose website lists an e-mail address or phone number.

## `maxResults` (type: `integer`):

You pay per company returned.

## Actor input object example

```json
{
  "pkdCodes": [
    "62.01.Z"
  ],
  "mainPkdOnly": false,
  "voivodeships": [
    "MAZOWIECKIE"
  ],
  "status": "ACTIVE",
  "requireWebsite": false,
  "requireLinkedin": false,
  "requireContact": false,
  "maxResults": 100
}
```

# Actor output Schema

## `companies` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pkdCodes": [
        "62.01.Z"
    ],
    "voivodeships": [
        "MAZOWIECKIE"
    ],
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("trev0n/krs-ceidg-company-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "pkdCodes": ["62.01.Z"],
    "voivodeships": ["MAZOWIECKIE"],
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("trev0n/krs-ceidg-company-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "pkdCodes": [
    "62.01.Z"
  ],
  "voivodeships": [
    "MAZOWIECKIE"
  ],
  "maxResults": 100
}' |
apify call trev0n/krs-ceidg-company-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,trev0n/krs-ceidg-company-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KCHyZIfxmXAw9oAAC/builds/cnuPUCFQLehAlja2K/openapi.json
