# Estonia Business Register Scraper — Official RIK Data (`promptica/estonia-business-register`) Actor

Search Estonian companies by name, registry code, legal form, status, EMTAK, location and registration date. Monitor new and changed records from official daily open data.

- **URL**: https://apify.com/promptica/estonia-business-register.md
- **Developed by:** [Lorenzo Talamucci](https://apify.com/promptica) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

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

## Estonia Business Register Scraper — Official RIK Data

Search Estonian companies and other legal entities using the official daily e-Business Register open-data files published by the Centre of Registers and Information Systems (RIK). Export structured records or schedule a monitor that returns only new and changed matching companies.

### What you get

Registry code, company name, legal form and label, official status and label, first registration date, deletion date when supplied, registered address, county, city/municipality, current declared EMTAK activities (code, Estonian label, version and primary flag), VAT number when published, source link and collection timestamp. Export JSON, CSV, Excel or use the Apify dataset API.

Use it for supplier checks, procurement portfolios, CRM imports and tracking changes in a company watchlist. It does not return shareholders, beneficial owners, personal identifiers, email addresses or phone numbers. Sole traders (FIE) are excluded.

### Input examples

Quick test (the prefilled input, usually a few seconds to a minute on a normal connection):

```json
{"maxResults":5}
```

Exact company lookup:

```json
{"registryCode":"11694365","maxResults":1}
```

Location and activity search:

```json
{"county":"Harju","city":"Tallinn","legalForm":"OÜ","status":"R","activityCode":"62","registeredFrom":"2020-01-01","maxResults":100}
```

Schedule a recurring monitor:

```json
{"registryCode":"11694365","mode":"monitor","monitorName":"supplier-11694365","maxResults":1}
```

All filters combine with AND. `name`, `county` and `city` are case-insensitive contains searches. `registryCode`, `legalForm` and `status` are exact official codes. `activityCode` is a 1–5 digit EMTAK prefix and matches current declared activities, not every historical annual-report activity. `registeredFrom` and `registeredTo` are inclusive ISO dates. Maximum results: 1–10,000 (default 100). County and city names and activity labels retain Estonian spelling.

### Monitor behavior

`monitorNome` is accepted as an alias of `monitorName` for the shared cloud battery. Use the same `monitorName` and filters for every scheduled run. The first run emits matching companies as `changeType: "new"`; later runs emit new companies and changes to the exported fields as `"changed"`. Unchanged records are not delivered or charged as results. Increasing `maxResults` is allowed; changing filters requires a new monitor store name. Use separate stores for separate clients or watchlists and avoid overlapping runs against the same store.

The monitor stores a fingerprint per registry code in a named Apify key-value store, with stable hashes that exclude timestamps. State is saved after delivery, so an interruption between delivery and saving can cause a duplicate on retry (at-least-once delivery). A later return to a previous value is still detected as a change. `maxResults` limits delivered records, not scanned records; a broad monitor may need to scan the whole national archive and reach the time budget. Prefer a registry-code watchlist or narrow filters. No missing-company or deletion notifications are inferred from absence.

### Coverage and freshness

RIK updates these files once a day. They contain entities currently entered in the register (registered, in liquidation or in bankruptcy), not a historical archive of deleted companies. `deletedAt` will normally be `null`. The general JSON supplies activities; the basic CSV supplies VAT numbers, joined by registry code. The files can be refreshed separately, so this is not an atomic register transaction. Missing VAT numbers stay `null`; no values are invented.

The actor downloads ZIP files to disk, validates source validators and byte ranges, resumes interrupted transfers and filters the decompressed JSON in streaming mode. General ZIP measured on 28 September 2026: 230,121,937 bytes; basic CSV is smaller. Default memory: **1 GB**. Direct public downloads are tried first; Apify proxy IP rotation is available after transient failures. Partial download files can resume within a run; subsequent cloud runs normally start with fresh local disk. Local cached archives are reused only when their current official validator and length match.

The internal deadline is the platform `timeoutAt` minus 30 seconds. Local runs without `timeoutAt` have no internal time cap. Already delivered records remain available. Invalid input or exhausted source retries finish cleanly with an explanation in the status message and `OUTPUT` key-value record (`error`, `hint`, `partial`, `pushed`, `scanned`, `unchanged`, duration and peak memory). A completed run with zero results may mean no matches; inspect `OUTPUT.error` to distinguish incomplete work. Storage/startup failures at the platform level cannot be guaranteed away.

### Price

| Event | Price |
|---|---:|
| Actor start, with default 1 GB memory | $0.05 |
| Company returned (`company`) | $0.002 |

For example, 100 returned companies cost $0.25 at the default memory. Changed companies use the same result price. Prices are configured by the publisher in Apify; the Store price shown at checkout is authoritative. The actor tolerates an unconfigured result event during prepublication tests.

### Source and license

Source: [RIK e-Business Register open data](https://avaandmed.ariregister.rik.ee/en/downloading-open-data), [terms](https://avaandmed.ariregister.rik.ee/en/terms-service). Reused under [Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/). Attribution: Centre of Registers and Information Systems (RIK), Estonian e-Business Register. Changes: selection, field renaming, date normalization, basic/general join and incremental comparison. This actor is independent and not endorsed by RIK. Preserve attribution when redistributing the data; any subsequent processing must comply with the source conditions and applicable data-protection requirements.

### Local development

Node.js 22 or newer:

```bash
npm ci
npm test
apify run --input '{"maxResults":5}'
```

No cloud deployment or paid cloud test is required for local verification.

# Actor input Schema

## `name` (type: `string`):

Company name contains (case insensitive).

## `registryCode` (type: `string`):

Exact eight digit registry code.

## `legalForm` (type: `string`):

Legal form code, e.g. OÜ, AS, MTÜ.

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

Official status code, e.g. R (registered), L (liquidation).

## `activityCode` (type: `string`):

EMTAK prefix; matches current declared activities.

## `county` (type: `string`):

County contains, e.g. Harju.

## `city` (type: `string`):

City or municipality contains, e.g. Tallinn.

## `registeredFrom` (type: `string`):

Inclusive first registration date YYYY-MM-DD.

## `registeredTo` (type: `string`):

Inclusive first registration date YYYY-MM-DD.

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

Maximum delivered companies per run, from 1 to 10000.

## `mode` (type: `string`):

Monitor emits new and changed matched records. First run emits matching companies; same filters and store must be reused.

## `monitorName` (type: `string`):

Named key-value store for durable per-company monitor fingerprints; use a dedicated store per filter set.

## `monitorNome` (type: `string`):

Alias of monitorName, used by the shared cloud battery. When supplied it takes precedence over monitorName.

## Actor input object example

```json
{
  "name": "",
  "registryCode": "",
  "legalForm": "",
  "status": "",
  "activityCode": "",
  "county": "",
  "city": "",
  "registeredFrom": "",
  "registeredTo": "",
  "maxResults": 5,
  "mode": "search",
  "monitorName": "estonia-business-monitor"
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `diagnostics` (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 = {
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("promptica/estonia-business-register").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 = { "maxResults": 5 }

# Run the Actor and wait for it to finish
run = client.actor("promptica/estonia-business-register").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 '{
  "maxResults": 5
}' |
apify call promptica/estonia-business-register --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,promptica/estonia-business-register"
        }
    }
}
```

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/naghpCaXfMmQKKbHY/builds/jBJhL0tnpBKTA8QXy/openapi.json
