# Latvia Company Financials — Annual Reports (`cee-data/latvia-company-financials-scraper`) Actor

Latvian company revenue, assets, equity, liabilities and profit from official Register of Enterprises open data.

- **URL**: https://apify.com/cee-data/latvia-company-financials-scraper.md
- **Developed by:** [CEE Data](https://apify.com/cee-data) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 financial statements

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

### What does Latvia Company Financials do?

Get **annual-report financial indicators for Latvian companies** by their 11-digit legal entity registration number. The Actor queries the official Latvian open-data CKAN DataStore and joins report metadata, balance sheets and income statements into clean JSON.

- Retrieve the latest annual report or up to **3 years of history** per company.
- Get the currency, rounding unit, reporting period and employee count.
- Read assets, liabilities, equity, turnover, expenses and net income.
- Use calculated profit margin, equity ratio and current ratio in due-diligence workflows.

### Why use it?

Use this Actor for **supplier research, credit analysis, company monitoring and financial data enrichment** without downloading and joining large CSV archives.

Typical workflows:

- enrich a Latvian supplier or customer record with recent financials;
- compare turnover, profitability and balance-sheet strength over three years;
- feed company financials into a spreadsheet, database or AI agent;
- schedule recurring checks through Apify, Make, Zapier or n8n.

The Actor requires no account, API key, browser or proxy.

### What data can you get?

Each row represents one company-year and includes:

- legal entity registration number, statement ID and file ID;
- reporting schema, year, period, employees, currency and rounding unit;
- cash, securities, receivables, inventories and current assets;
- investments, fixed and intangible assets and total non-current assets;
- current and non-current liabilities, provisions and equity;
- turnover, cost of goods sold, gross profit, selling and administrative expenses;
- profit before and after tax, net income;
- calculated net profit margin, equity ratio and current ratio;
- official source creation and update timestamps.

Missing source values remain `null`; they are never converted to zero. Negative values are preserved as reported.

### Example output

```json
{
    "found": true,
    "companyCode": "40103504912",
    "statementId": 927852,
    "reportYear": 2018,
    "periodStart": "2018-01-01",
    "periodEnd": "2018-12-31",
    "employees": 1,
    "currency": "EUR",
    "roundedToNearest": "ONES",
    "assets": 99624,
    "currentLiabilities": 158919,
    "equity": -59295,
    "netTurnover": 4836,
    "netProfit": -44352,
    "netProfitMargin": -9.171216,
    "equityRatio": -0.595188,
    "currentRatio": 0.585153,
    "sourceUpdatedAt": "2026-10-28T21:25:15.733185"
}
```

This is public company data validated during development. The dataset contains all 47 fields, including cash, inventories and detailed expenses.

### How much does it cost?

**$5.00 per 1,000 financial statements** (`financial-statement`), or **$0.005 per statement**.

There is no Actor-start fee. Unknown companies and rows without an official financial statement are not charged. Cached results still count as delivered financial statements.

### Free n8n workflow

[Download the ready-to-import Latvia financial lookup workflow](https://api.apify.com/v2/key-value-stores/2adhfhT2wfW54leSK/records/latvia-company-financials-lookup.json). Enter an 11-digit registry code and receive normalized company-year fields ready for Google Sheets, Airtable, a database or an AI agent. The JSON contains no credentials; use n8n Header Auth credentials for your Apify token.

### How to use it

1. Add one or more 11-digit Latvian legal entity registration numbers.
2. Choose **1 year** for the latest report or up to **3 years** of history.
3. Keep the small default result limit for the first run.
4. Start the Actor and export JSON, CSV or Excel.

Example input:

```json
{
    "companyCodes": ["40103504912"],
    "historyYears": 3,
    "maxItems": 3
}
```

### Official source and freshness

The Actor uses the official [Gada pārskatu finanšu dati dataset](https://data.gov.lv/dati/dataset/gada-parskatu-finansu-dati) from **LR Uzņēmumu reģistrs**, published under **CC0 1.0**. It contains annual-report metadata, balance sheets, income statements and cash-flow reports from the Latvian State Revenue Service.

The dataset is updated **daily**. Each result includes the metadata resource's last modification timestamp and the official CKAN query URL.

Results are cached for **24 hours** by default. Set `forceRefresh` to bypass the cache and query the current source.

### Limits and safeguards

- 1–100 registration numbers per run.
- 1–3 annual reports per company.
- 300 maximum output rows per run.
- Network errors, HTTP 429 and HTTP 5xx use bounded retries; other 4xx responses do not retry.
- Invalid JSON, unexpected CKAN structures, join mismatches and invalid numbers count as parsing failures and fail the run.
- No login, browser, CAPTCHA bypass, proxy or paid external API.

### Privacy and scope

This Actor processes legal-entity registration and annual-report financial data only. It does not collect owners, directors, beneficial owners, personal contacts or personal identification numbers.

### Development and validation

```bash
npm install
npm run build
npm test
npm run lint
apify validate-schema
apify run
```

The bundled smoke input uses public registry code `40103504912`. Unit tests use saved official CKAN records and cover metadata joins, ratios, negative amounts, missing data, invalid structures, source freshness and retries.

For bugs or feature requests, use the Issues tab.

### Store metadata

- **Categories:** Business Data, Financial Data, Government and Public Data, Compliance, KYC
- **Keywords:** Latvia company financials, Latvian annual reports, company registry, revenue, balance sheet, profit, KYB, due diligence, CKAN, open data

# Actor input Schema

## `companyCodes` (type: `array`):

One to 100 Latvian legal entity registration numbers, each containing exactly 11 digits. Public example: 40103504912.

## `historyYears` (type: `integer`):

Return the latest one to three annual reports per company, newest first.

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

Maximum number of dataset items and billable financial statements per run.

## `cacheMaxAgeHours` (type: `integer`):

Reuse company reports downloaded within this period. Official data is updated daily.

## `forceRefresh` (type: `boolean`):

Ignore cached company results and query the official CKAN DataStore again.

## `maxRequestRetries` (type: `integer`):

Retries for network errors, HTTP 429 and HTTP 5xx. Other HTTP 4xx responses are not retried.

## `requestTimeoutSecs` (type: `integer`):

Timeout for one official CKAN API request.

## Actor input object example

```json
{
  "companyCodes": [
    "40103504912"
  ],
  "historyYears": 1,
  "maxItems": 10,
  "cacheMaxAgeHours": 24,
  "forceRefresh": false,
  "maxRequestRetries": 4,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `results` (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 = {
    "companyCodes": [
        "40103504912"
    ],
    "historyYears": 1,
    "maxItems": 10,
    "cacheMaxAgeHours": 24,
    "forceRefresh": false,
    "maxRequestRetries": 4,
    "requestTimeoutSecs": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("cee-data/latvia-company-financials-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 = {
    "companyCodes": ["40103504912"],
    "historyYears": 1,
    "maxItems": 10,
    "cacheMaxAgeHours": 24,
    "forceRefresh": False,
    "maxRequestRetries": 4,
    "requestTimeoutSecs": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("cee-data/latvia-company-financials-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 '{
  "companyCodes": [
    "40103504912"
  ],
  "historyYears": 1,
  "maxItems": 10,
  "cacheMaxAgeHours": 24,
  "forceRefresh": false,
  "maxRequestRetries": 4,
  "requestTimeoutSecs": 30
}' |
apify call cee-data/latvia-company-financials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cee-data/latvia-company-financials-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/iVmg6Wupak1K1dm6X/builds/9c5mXpfQgQlyW4uXG/openapi.json
