# Latvian Company Register Scraper (`deriverge/latvian-company-check`) Actor

\[$2.00 / 1K] Bulk Latvian company lookup by registration number. Queries the Register of Enterprises, the VAT payer register, the insolvency and liquidation registers, the sanctions list and EU VIES. Returns name, form, status, VAT validity and every risk flag. Unmatched rows are free.

- **URL**: https://apify.com/deriverge/latvian-company-check.md
- **Developed by:** [deriverge s.r.o.](https://apify.com/deriverge) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 company records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Latvian Company Checker

### What does Latvian Company Checker do?

**Latvian Company Checker** verifies Latvian companies in bulk against five official state registers at once. Give it a list of registration numbers and for each one you get back the legal name, address, legal form and status from the Register of Enterprises, the VAT registration with the tax authority's own risk marker, and three things a plain lookup never shows: insolvency proceedings, liquidation, and links to sanctions lists.

The combination is the point. Each register answers a question the others cannot:

| Source | The question only it answers |
|---|---|
| **Register of Enterprises** | Does the company exist, and was it removed from the register? |
| **VAT payer register** | Is it a VAT payer, since when, was it excluded, and does the tax authority flag it as a risk under Section 139(2) of the VAT Act? |
| **Insolvency register** | Is it, or was it, in insolvency proceedings, and how did they end? |
| **Liquidation register** | Is it being wound up right now? |
| **Sanctions register** | Is the company linked to a sanctions listing such as OFAC SDN, directly or through its owners? |
| **EU VIES** | Does the EU confirm the VAT number is valid for cross-border trade? |

A supplier can look perfectly registered while it has been in liquidation for two weeks, or while its beneficial owner sits on a sanctions list. This actor puts all of that on one row.

### Fair billing

You pay only for companies that resolve. Checksum failures are caught locally and never generate a request. Registers that could not be read are not billed as joins. A run that resolves nothing costs nothing.

### Sole traders and farms are people

The register also lists sole traders (IK, IND) and family farms (ZEM) under the names of the people who run them. When the entity is a natural person, **the name and address are withheld by design**. You still learn that the number exists, its status and its VAT registration. The sanctions register contains personal data too; this actor reads from it only the link to the company (which list, which program, since when, in which role) and never the person.

### Typos never reach the register

Modern 11-digit registration numbers carry a checksum digit. Every number is validated locally first; a number that fails is reported as a typo, costs nothing, and never generates a download. Older 9-digit numbers have no checksum and are passed through to the register.

### Input

```json
{
  "companies": [
    "40003100234",
    { "code": "41203017621", "reference": "supplier-42" }
  ],
  "includeVies": true
}
```

Strings and objects can be mixed freely. VAT numbers with the LV prefix work as well. The optional `reference` is returned unchanged so you can join results back to your own system.

### Output

One row per submitted company:

```json
{
  "input": "41203017621",
  "matched": true,
  "entityType": "legal_entity",
  "code": "41203017621",
  "name": "Akciju sabiedrība \"L.V.K.\"",
  "legalForm": "Akciju sabiedrība",
  "companyActive": true,
  "vatNumber": "LV41203017621",
  "vatActive": true,
  "vatRiskFlag139": false,
  "vatValidVies": true,
  "insolvencyProceedings": [],
  "liquidations": [],
  "sanctionsLinks": [
    { "list": "OFAC SDN", "program": "GLOMAG", "since": "2019-12-09", "role": "Beneficial owner" }
  ],
  "riskFlags": [
    "SANCTIONS LINK: listed on OFAC SDN (GLOMAG) since 2019-12-09 through its beneficial owner. Do not pay before a compliance review."
  ]
}
```

Every value carries provenance: which register said it, at which URL, and when. If a register could not be read, the affected fields are `null` and the provenance row says why, never silently guessed.

### Watch a list for changes

Checking a supplier once is useful. Checking the same list every morning and reading only what changed is what keeps you out of trouble. Give the run a watch name (or save it as a task and schedule it) and every later run compares its results with the previous one: a company that turned inactive, a new risk flag, a VAT registration cancelled, a published account that disappeared. The differences are stored in the `CHANGES` record of the run, ready for an integration or an email. The comparison itself is free.

### Pricing

| Event | Price |
|---|---|
| Run fee, a tenth of a cent per run that resolves at least one company | $0.001 |
| Company resolved | $0.004 |
| Each additional source that returned an answer (VAT register, risk registers, VIES) | $0.001 |
| Company not found | **free** |

### Speed

The Register of Enterprises publishes its data only as a 128 MB daily file with no per-company lookup. The actor therefore keeps a daily snapshot of all five registers and checks your list against it in seconds. If the snapshot is older than 36 hours, the run downloads the registers directly, which takes a few minutes; the output says which of the two happened.

### Frequently asked questions

**What does an unmatched row cost?** Nothing. Rows that fail the checksum or are not in the register are returned with an explanation and are never charged.

**What does the Section 139(2) flag mean?** The State Revenue Service marks VAT payers it considers a risk under Section 139(2) of the VAT Act. It is the closest Latvian equivalent to an unreliable payer status, and it is exactly the kind of thing to know before you pay an invoice with VAT.

**How fresh is the data?** The snapshot is rebuilt every day from files the registers publish daily. Each row states the snapshot time.

**Where does the data come from?** The Register of Enterprises (register, liquidations, sanctions), the State Revenue Service (VAT payers) and the national open data portal (insolvency), all published under open licences, plus EU VIES.

This is the Latvian sibling of our [Czech and Slovak](https://apify.com/deriverge/czech-company-check), [Estonian](https://apify.com/deriverge/estonian-company-check) and [Lithuanian](https://apify.com/deriverge/lithuanian-company-check) company checkers. They share the same validation engine and the same billing rule: unmatched rows are free.

# Actor input Schema

## `companies` (type: `array`):

One entry per company: an 11-digit registration number (40003100234), a VAT number (LV40003100234), or an object with code and an optional reference that is returned unchanged. Typos that fail the checksum are reported and never charged.

## `includeVies` (type: `boolean`):

Cross-check every active VAT payer against the EU VIES system as a second, independent source. A disagreement between the registers is reported as a risk flag.

## `refreshCache` (type: `boolean`):

Internal maintenance mode. Downloads all five registers and rebuilds the daily cache instead of checking companies. Runs on a schedule; you do not need to switch it on.

## `watchKey` (type: `string`):

Give the run a name such as "suppliers" and schedule it. Every later run with the same name compares its results with the previous one and stores the differences (status changes, new risk flags, removed accounts) in the CHANGES record. Comparison is free. Runs from a saved task are compared automatically even without a name.

## Actor input object example

```json
{
  "companies": [
    "40003100234",
    {
      "code": "41203017621",
      "reference": "supplier-42"
    }
  ],
  "includeVies": true,
  "refreshCache": false
}
```

# Actor output Schema

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

One row per submitted company, with identity, VAT status, insolvency, liquidation, sanctions links and risk flags.

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

How many entities were resolved, how many were not found and therefore not charged, and how many carry a risk flag.

# 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 = {
    "companies": [
        "40003100234",
        {
            "code": "41203017621",
            "reference": "supplier-42"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("deriverge/latvian-company-check").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 = { "companies": [
        "40003100234",
        {
            "code": "41203017621",
            "reference": "supplier-42",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("deriverge/latvian-company-check").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 '{
  "companies": [
    "40003100234",
    {
      "code": "41203017621",
      "reference": "supplier-42"
    }
  ]
}' |
apify call deriverge/latvian-company-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deriverge/latvian-company-check"
        }
    }
}

```

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/GvUZmec5IkeyWBtVI/builds/W0lpyGZVmfVDlSaGm/openapi.json
