{
  "openapi": "3.0.1",
  "info": {
    "title": "Kompass B2B Company Scraper — Archived Global Directory",
    "description": "Kompass company records rebuilt from PUBLIC WEB ARCHIVES, not a live pull — the live site is behind an anti-bot wall. 828,183 archived company pages measured, 62 countries. Name, address, phone, website, employee band, coordinates, and every row's capture date. Most captures are 2014-2018.",
    "version": "0.1",
    "x-build-id": "xq9HCzYvPDDddgSBg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~kompass-b2b-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-kompass-b2b-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~kompass-b2b-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-kompass-b2b-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~kompass-b2b-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-kompass-b2b-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": {
          "listCountries": {
            "title": "Coverage check — how deep is the archive per country? (FREE, nothing is charged)",
            "type": "boolean",
            "description": "Tick this and the run skips scraping entirely: it returns one row per Kompass country host (62 rows) with the number of index pages the Wayback Machine holds for it, an estimated company count, and — for the 12 hosts that were exhaustively enumerated — the exact measured count. These rows are pushed WITHOUT the billing event, so a coverage run costs $0 in Actor charges. Two honest caveats: it takes a few minutes because archive.org rate-limits its index endpoint, and when archive.org is refusing requests (HTTP 429) the run stops re-counting after 5 refusals and reports the 2026-08-16 enumeration instead — the indexStatus column on every row says whether that row was counted live or comes from the cached enumeration. Then untick it and run for real.",
            "default": false
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Which countries' companies to pull, by ISO 2-letter code. The counts in brackets are archived pages on that country's Kompass host (92-98% of them carry that country's ID prefix; the rest are companies cross-listed from elsewhere). This is matched against the Kompass company ID prefix, which is the company's real country — Kompass country sites cross-serve each other's records, so the site you would have browsed is not a reliable country filter and is not used as one here. Leave the default (Germany) for a first run.",
            "items": {
              "type": "string",
              "enum": [
                "AE",
                "AM",
                "AR",
                "AT",
                "AU",
                "AZ",
                "BE",
                "BG",
                "BR",
                "CA",
                "CH",
                "CN",
                "CO",
                "CZ",
                "DE",
                "DK",
                "DZ",
                "EG",
                "ES",
                "FI",
                "FR",
                "GB",
                "GE",
                "GR",
                "HK",
                "HR",
                "HU",
                "IE",
                "IN",
                "IT",
                "JP",
                "KG",
                "KR",
                "LB",
                "LU",
                "LV",
                "MA",
                "MC",
                "MD",
                "MX",
                "NL",
                "NO",
                "NZ",
                "PE",
                "PL",
                "PT",
                "RO",
                "RS",
                "SA",
                "SE",
                "SG",
                "SI",
                "SK",
                "TH",
                "TN",
                "TR",
                "TW",
                "UA",
                "US",
                "VN",
                "XK",
                "ZA"
              ],
              "enumTitles": [
                "AE — United Arab Emirates",
                "AM — Armenia",
                "AR — Argentina",
                "AT — Austria",
                "AU — Australia",
                "AZ — Azerbaijan",
                "BE — Belgium (48,441 archived)",
                "BG — Bulgaria",
                "BR — Brazil",
                "CA — Canada",
                "CH — Switzerland",
                "CN — China (59,488 archived)",
                "CO — Colombia",
                "CZ — Czechia",
                "DE — Germany (69,947 archived)",
                "DK — Denmark",
                "DZ — Algeria",
                "EG — Egypt",
                "ES — Spain (68,998 archived)",
                "FI — Finland",
                "FR — France (28,476+ archived)",
                "GB — United Kingdom (50,785 archived)",
                "GE — Georgia",
                "GR — Greece",
                "HK — Hong Kong",
                "HR — Croatia",
                "HU — Hungary",
                "IE — Ireland",
                "IN — India (69,632 archived)",
                "IT — Italy (76,046 archived)",
                "JP — Japan",
                "KG — Kyrgyzstan",
                "KR — South Korea",
                "LB — Lebanon",
                "LU — Luxembourg",
                "LV — Latvia",
                "MA — Morocco",
                "MC — Monaco",
                "MD — Moldova",
                "MX — Mexico",
                "NL — Netherlands (32,832 archived)",
                "NO — Norway",
                "NZ — New Zealand",
                "PE — Peru",
                "PL — Poland (69,071 archived)",
                "PT — Portugal",
                "RO — Romania",
                "RS — Serbia",
                "SA — Saudi Arabia",
                "SE — Sweden",
                "SG — Singapore",
                "SI — Slovenia",
                "SK — Slovakia",
                "TH — Thailand",
                "TN — Tunisia",
                "TR — Turkey",
                "TW — Taiwan (17,396 archived)",
                "UA — Ukraine",
                "US — United States (257,490 archived)",
                "VN — Vietnam",
                "XK — Kosovo",
                "ZA — South Africa"
              ]
            },
            "default": [
              "DE"
            ]
          },
          "nameContains": {
            "title": "Company name contains (optional)",
            "type": "array",
            "description": "Keep only companies whose name contains one of these words. Matched against the company-name slug inside the archived URL, so it is fast and costs nothing extra — but it matches the NAME, not the industry. Good: 'gmbh', 'logistik', 'pharma', 'steel', 'transport'. Several words are OR-ed together. Leave empty to walk the country alphabetically.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "companyUrls": {
            "title": "Specific companies (optional) — Kompass URLs or IDs",
            "type": "array",
            "description": "Paste full Kompass company URLs (https://de.kompass.com/c/some-company/de664484/) or bare Kompass IDs (DE664484, NLC0733131). Each one is looked up in the Wayback index and pulled from the archive. Anything you paste is fetched in addition to the country walk above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "source": {
            "title": "Archive to read",
            "enum": [
              "wayback",
              "commoncrawl",
              "both"
            ],
            "type": "string",
            "description": "wayback = volume (recommended, and what the defaults use). commoncrawl = the ~161 freshest records only, mostly 2023-2026 captures. both = Wayback first, topped up from the 6 newest Common Crawl indexes.",
            "default": "wayback"
          },
          "minCaptureYear": {
            "title": "Earliest capture year",
            "enum": [
              "any",
              "2016",
              "2019",
              "2022",
              "2024"
            ],
            "type": "string",
            "description": "This is the freshness dial, and it does two things. Each row is the EARLIEST archived capture of that company's page on or after the year you pick — so on 'any' you get each page's oldest snapshot (mostly 2014-2018), and raising the year pulls a LATER capture of the same companies, at the cost of dropping every company the archive has not re-captured since. Measured 2026-08-17: 2.5-2.9% of archived pages carry a 2024-or-later capture (tw 441/17,396, nl 970/32,832). Rows always carry captureDate so you can filter afterwards too.",
            "default": "any"
          },
          "startPage": {
            "title": "Start at index page",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "The archive index is ordered alphabetically by company name, so a run always starts at the beginning of the alphabet. Raise this to walk deeper into a country without repeating rows you already bought (one index page is roughly 2,000-2,800 companies).",
            "default": 0
          },
          "maxCompanies": {
            "title": "Maximum companies to return",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on billed rows. The prefilled 60 costs $0.12 at $0.002 per company and finishes in roughly 1-2 minutes — it is a deliberately small first click, not a ceiling. Raise it to whatever you need (up to 100,000) and raise the run timeout with it: archived pages are 250-460 KB each and the archives are rate-limited on purpose, so budget roughly 1-2 seconds per company. If a run reaches its timeout budget it stops fetching, delivers everything already collected, and ends successfully — you are never charged for rows you did not get.",
            "default": 60
          },
          "strictCountry": {
            "title": "Strict country match",
            "type": "boolean",
            "description": "ON (recommended): drop any company whose Kompass ID prefix is not one of the countries you picked. Kompass country sites carry each other's records, so leaving this off returns neighbours you did not ask for. Turn it off only if you want everything the archive holds for those hosts.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel archive requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many archived pages to download at once. The Internet Archive soft-blocks under sustained hammering (empty 200s, then HTTP 429), so 4 is the tested setting. Raise it only if you accept slower, retried runs.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}