# Kompass Company Directory Scraper (`khadinakbar/kompass-scraper`) Actor

Extract Kompass company profiles and directory listings into structured company records with public contacts, locations, firmographics and source URLs. Export supplier shortlists as JSON, CSV or Excel.

- **URL**: https://apify.com/khadinakbar/kompass-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 company delivereds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### Kompass Company Directory Scraper

Build a company or supplier shortlist from Kompass company profiles and directory pages. Supply company URLs or a directory URL; the Actor follows listing links, extracts public profile fields and delivers one structured dataset row per company.

#### Best fit and focused standalone workflow

Use this Actor for bounded supplier research, procurement shortlists and company enrichment from known Kompass URLs. A procurement analyst can start with a pumps directory, collect a small verified shortlist, inspect company websites and locations, then export the records to an internal sourcing spreadsheet. This Actor is designed as a focused standalone workflow; every result carries its source URL and collection time for review.

#### Input

```json
{
  "startUrls": [{ "url": "https://us.kompass.com/a/pumps-by-use/32330/" }],
  "maxItems": 10,
  "maxPages": 2,
  "maxRequests": 20,
  "maxRunSeconds": 300,
  "useProviderFallback": true,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

Provide 1–100 company (`/c/`) or directory (`/a/`, `/s/`) HTTPS URLs ending in a slash. Country subdomains must contain two letters; `www` is also accepted. Numeric `page`/`p` query parameters and numbered `page-N/` directory links are supported. Keyword search is outside this version's input contract.

For best results, begin with one profile or a small directory cap. `maxPages` applies across inputs; all profile and directory fetches count toward `maxRequests`. Company identifiers are deduplicated across tracking, country-domain and profile-slug aliases. The crawl is sequential. The direct HTTP route spaces starts by at least one second; each logical page has a maximum 300-second deadline, up to three same-country direct redirects and a 3 MB response bound. Managed fallback allows at most three supplier requests per logical page: one initial request and two retries only after an acknowledged transient content or server response. Authentication, eligibility, quota and uncertain network failures are not replayed. Temporary server responses use a bounded delay and respect Retry-After within the page deadline. It stops when its cost allowance or the spending cap is exhausted, preserving useful partial output. The Actor reserves the final 15 seconds of the platform timeout to save its result records. Interactive logins and private fields are outside the workflow.

#### Output fields

| Field | Meaning |
|---|---|
| `companyId`, `name` | Kompass identifier and company name |
| `url`, `scrapedAt` | Source profile and collection timestamp |
| `description`, `activities` | Public company description and activity labels |
| `website`, `phone`, `email` | Contact information published on the profile |
| `address` | Street, city, region, postal code and country |
| `employees`, `yearEstablished` | Published employee range and founding date |
| `legalForm`, `registrationNumber`, `vatNumber` | Published legal identifiers |

Unavailable optional fields are `null`, and activities may be empty. No contact details are inferred or unlocked. Country templates and profile completeness vary. Export the default dataset using Apify's JSON, CSV, Excel or other standard formats.

Synthetic example of one complete row:

```json
{
  "companyId": "USFIXTURE",
  "name": "Example Pumps",
  "url": "https://us.kompass.com/c/example-pumps/usfixture/",
  "description": "Industrial pump supplier",
  "website": null,
  "phone": null,
  "email": null,
  "address": { "street": null, "city": "Seattle", "region": "WA", "postalCode": null, "country": "US" },
  "employees": "10-19 Employees",
  "yearEstablished": null,
  "legalForm": null,
  "registrationNumber": null,
  "vatNumber": null,
  "activities": ["Pumps, by use"],
  "scrapedAt": "2026-11-02T00:00:00.000Z"
}
```

#### Pricing and spending caps

Pay per event: **$0.03 per initialization unit** (one per allocated GB, minimum one) plus **$0.025 per accepted company record** ($25 per 1,000). Platform usage is paid separately by the caller. The live Pricing tab is the source of truth for effective prices.

Initialization is charged when a run starts, including empty, invalid-input and failed runs. Rejected rows and empty pages produce no company events. A valid one-company job at 256–1024 MB has a modeled event total of $0.055 before platform usage. Actual totals depend on delivered records and allocated memory. Configure a positive Apify spending cap above the initialization fee and at least one company fee to allow useful output.

Managed source access has a conservative allowance derived from accepted event revenue. A job may finish `PARTIAL` when this allowance, the caller's spending cap, request/page/item limit or deadline stops further work. No extra supplier subscription or API key is required from you. The live event prices and each job's selected limits determine the delivered volume.

#### API example

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('khadinakbar/kompass-scraper').call(
  {
    startUrls: [{ url: 'https://us.kompass.com/c/daves-pump-service-inc/usc3896826/' }],
    maxItems: 1,
    maxRequests: 1,
    maxRunSeconds: 300
  },
  { memory: 256, timeout: 360, maxTotalChargeUsd: 0.06 }
);
const output = await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('OUTPUT');
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(output.value, items);
```

#### AI agent workflow and outcomes

> AI agent request: Collect up to ten companies from this Kompass directory. Keep source URLs, limit page and request counts, set a spending cap, inspect OUTPUT and RUN_SUMMARY, then export the complete dataset and flag partial coverage.

`OUTPUT` is the compact result contract. `RUN_SUMMARY` adds page/request counts, source-route counts and stop reasons. `COMPLETE` means the selected work finished; `PARTIAL` preserves delivered company records when a documented cap stops further work. A cap that delivers no companies produces `CONFIG_ERROR` and a failed run; increase the request or time allowance. `VALID_EMPTY` requires an explicit source marker. If all required sources fail with no useful records, the run fails with `UPSTREAM_FAILED`. Uncertain billing or supplier effects require reconciliation before replay.

#### Builder's note

I found that real profile markup can contain the literal string `null` for a missing founding date. This Actor normalizes that value to JSON null rather than treating it as a date. Numbered pagination is read from the actual successor page link, rather than guessed from a query parameter.

Apply appropriate access and retention controls to your dataset and storage records. The Actor preserves certificate verification and keeps owner credentials out of input, datasets, outputs and logs.

Kompass is a trademark of its owner. This independent Actor is not affiliated with, associated with, or endorsed by Kompass.

# Actor input Schema

## `useProviderFallback` (type: `boolean`):

Use the managed HTTPS route when direct public-page access is blocked. This remains subject to the run's spending and source-request limits. No API key is required from you.

## `startUrls` (type: `array`):

Provide 1–100 Kompass country-domain company (/c/) or directory (/a/, /s/) URLs. URLs must use HTTPS and end with a slash. Only numeric page and p query parameters are accepted.

## `maxItems` (type: `integer`):

Stop after this many companies are delivered.

## `maxPages` (type: `integer`):

Total directory-page limit shared by all start URLs. Profile pages use the separate request limit.

## `maxRequests` (type: `integer`):

Maximum logical page fetches, including failed attempts. Direct requests follow at most three same-country redirects. Managed access permits at most two bounded retries after an acknowledged transient content or server response.

## `maxRunSeconds` (type: `integer`):

Maximum crawl time budget per process. Each logical page has a deadline of at most 300 seconds, including its direct attempt and managed fallback. Configure the Apify run timeout separately.

## `proxyConfiguration` (type: `object`):

Optional proxy routing for access. Proxy usage adds platform costs. Access challenges are reported as failures.

## Actor input object example

```json
{
  "useProviderFallback": true,
  "startUrls": [
    {
      "url": "https://us.kompass.com/c/daves-pump-service-inc/usc3896826/"
    }
  ],
  "maxItems": 1,
  "maxPages": 5,
  "maxRequests": 1,
  "maxRunSeconds": 300,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `output` (type: `string`):

No description

## `runSummary` (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 = {
    "startUrls": [
        {
            "url": "https://us.kompass.com/c/daves-pump-service-inc/usc3896826/"
        }
    ],
    "maxItems": 1,
    "maxRequests": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/kompass-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 = {
    "startUrls": [{ "url": "https://us.kompass.com/c/daves-pump-service-inc/usc3896826/" }],
    "maxItems": 1,
    "maxRequests": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/kompass-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 '{
  "startUrls": [
    {
      "url": "https://us.kompass.com/c/daves-pump-service-inc/usc3896826/"
    }
  ],
  "maxItems": 1,
  "maxRequests": 1
}' |
apify call khadinakbar/kompass-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/kompass-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/p7BAtZDfRb1nWG2Bu/builds/tQi2JwgAzubvk8giu/openapi.json
