# Romania Supplier Financial Health (ANAF Risk Flags) (`nocturntools/ro-supplier-financial-health`) Actor

Romanian company financial health by CUI: risk flags from ANAF balance sheets (negative equity, losses, revenue drop, missing statement). Monthly monitoring with alerts.

- **URL**: https://apify.com/nocturntools/ro-supplier-financial-health.md
- **Developed by:** [Nocturn Tools](https://apify.com/nocturntools) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Romania Supplier Financial Health (ANAF Risk Flags)

Check the financial health of Romanian companies by CUI (fiscal code). The actor reads the balance sheets ANAF publishes for each company and returns clear risk flags: negative equity, net loss, loss streak, revenue drop, no employees, missing latest statement.

Built for **supplier risk checks**: accountants who review their clients' suppliers, procurement and finance teams onboarding or re-checking vendors, and anyone with a list of supplier CUIs who wants warning signs instead of raw numbers.

**Unofficial tool. Data from ANAF public web services. Not affiliated with ANAF. Not credit or financial advice.**

### What you get

- **One row per company**, in your input order: name, legal form and ANAF registration status, then the key figures for each year (revenue, net profit, equity, debts, cash, employees), a few ratios, and the **flags**.
- **Risk flags, not a score.** Each flag is a plain fact computed from the published figures, with the ANAF URLs it came from. No rating, no recommendation.
- **Monitor mode.** Schedule a run (for example monthly) and get only the companies where something changed: a new year was published, a flag appeared or disappeared.

### Quick start

1. Paste your suppliers' CUIs into **Company fiscal codes** (with or without `RO`).
2. Keep **Years of statements** at 3 and click **Start**.
3. Open the **Overview** view of the dataset: one row per CUI, flags in the **Flags** column.

#### Input example

```json
{
  "cuis": ["RO14399840", "1475261", "49999996"],
  "years": 3,
  "revenueDropPct": 30
}
```

#### Output example (shortened, real data from 2026-11-09)

```json
{
  "input": "RO14399840",
  "cui": "14399840",
  "status": "OK",
  "error": null,
  "name": "DANTE INTERNATIONAL SA",
  "legalForm": "SOCIETATE COMERCIALĂ PE ACŢIUNI",
  "anafStatus": "INREGISTRAT din data 29.08.2006",
  "redacted": false,
  "latestPublishedYear": 2025,
  "latestYear": 2025,
  "years": [
    { "year": 2025, "revenue": 8706154345, "netProfit": -370680444, "equity": 2041323091, "debts": 2512599434, "cash": 344191865, "employees": 2889, "subscribedCapital": 1566421 },
    { "year": 2024, "revenue": 8992961799, "netProfit": -191463916, "equity": 2390301600, "debts": 2316131718, "cash": 291756487, "employees": 3191, "subscribedCapital": 1566421 },
    { "year": 2023, "revenue": 7719798207, "netProfit": 119060358, "equity": 2232984116, "debts": 2669465023, "cash": 547319942, "employees": 3231, "subscribedCapital": 1526047 }
  ],
  "ratios": { "netMarginPct": -4.26, "revenueChangePct": -3.19, "equityToDebts": 0.81 },
  "flags": ["NET_LOSS", "LOSS_STREAK"],
  "notes": [],
  "sources": [
    { "url": "https://webservicesp.anaf.ro/api/PlatitorTvaRest/v9/tva", "fetchedAt": "2026-11-09T20:10:56.390Z" },
    { "url": "https://webservicesp.anaf.ro/bilant?an=2025&cui=14399840", "fetchedAt": "2026-11-09T20:10:57.453Z" },
    { "url": "https://webservicesp.anaf.ro/bilant?an=2024&cui=14399840", "fetchedAt": "2026-11-09T20:10:58.548Z" },
    { "url": "https://webservicesp.anaf.ro/bilant?an=2023&cui=14399840", "fetchedAt": "2026-11-09T20:10:59.636Z" }
  ],
  "checkedAt": "2026-11-09T20:10:57.454Z"
}
```

Amounts are in RON, as published. `netProfit` is **negative for a loss** (ANAF publishes profit and loss as two separate positive values; the actor combines them).

### The flags

All flags look at the **newest year with a statement** (`latestYear`) and, where needed, the year before it.

| Flag | Raised when |
|---|---|
| `NEGATIVE_EQUITY` | Total equity (capitaluri - total) is below zero. |
| `EQUITY_BELOW_HALF_CAPITAL` | Equity is below half of the paid-in subscribed capital (capital subscris vărsat). |
| `NET_LOSS` | The year closed with a net loss. |
| `LOSS_STREAK` | Net loss in the latest year **and** the year before. |
| `REVENUE_DROP` | Net turnover fell by at least `revenueDropPct`% (default 30%) compared with the year before. |
| `NO_EMPLOYEES` | The average number of employees is 0. |
| `NO_RECENT_STATEMENT` | The company has statements for older years in the window, but none for the latest year ANAF has published. |

Ratios (latest year, 2 decimals, `null` when the denominator is 0 or missing): `netMarginPct` = net profit / revenue × 100, `revenueChangePct` = change vs. the year before, `equityToDebts` = equity / debts.

`LOSS_STREAK` and `REVENUE_DROP` need at least 2 years (`years` ≥ 2).

#### Statuses

| Status | Meaning | Charged |
|---|---|---|
| `OK` | Analyzed: figures, ratios and flags. | yes |
| `NO_STATEMENTS` | Known to ANAF, but no balance sheet in the analyzed years (new, dormant or late-filing companies). | no |
| `UNSUPPORTED_FILER_TYPE` | Banks, insurers and other filers whose statements use a different layout. Name and status are shown, no figures. | no |
| `NOT_FOUND` | ANAF's taxpayer registry doesn't know the CUI. | no |
| `SKIPPED_NATURAL_PERSON` | PFA, II, IF and similar: not analyzed, no data at all (see Privacy). | no |
| `INVALID_INPUT` | Not a valid CUI (wrong length or control digit); never sent to ANAF. | no |
| `ERROR` | ANAF didn't answer after retries. Run it again later. | no |

#### Notes

`notes` flags data-quality issues in what ANAF returned. The only one seen so far is `net_loss_inferred_from_duplicate_label`: for some filers (for example Oltchim SA and OMV Petrom SA in 2023–2025), ANAF labels both the gross and the net loss "Pierdere brută". The actor then takes the indicator with the higher code (the net loss line in every standard statement checked), and the year counts as a loss if net profit is 0 and either loss value is above 0.

### Which year is "latest"?

ANAF publishes balance sheets some months after the year ends. At the start of each run the actor checks the previous calendar year on a sample of up to 10 companies from your list. If most of them have it, that year is the latest published year (`latestPublishedYear`); otherwise it uses the year before. Companies that haven't filed the latest year yet get `NO_RECENT_STATEMENT`.

### Monitor mode

Turn on **Monitor mode** and schedule the actor (Apify Console → Schedules), for example **monthly**.

- The first run is the baseline: every company is written, with a `FIRST_SEEN` change.
- Later runs write **only companies with changes** (`changes[]`): `NEW_STATEMENT` (a newer year was published), `FLAG_ADDED`, `FLAG_REMOVED`, `STATUS_CHANGED`. Errors and invalid entries are always written. Unchanged companies are not written and **not charged**.
- **Faster and lighter:** years already seen are kept in your key-value store `ro-supplier-financial-health-state`, so later runs ask ANAF for about 1–2 years per company instead of 3.
- **An ANAF error is never reported as a change.** Failed companies keep their saved state.
- **Saved as it goes.** The state is saved during the run (every 10 companies and every minute) and at the end, and it only ever holds successful checks. If a run stops early (timeout, maximum cost, abort, platform restart), the companies already analyzed stay saved: the next run with the same list continues from there and doesn't report or charge their changes again.
- **20% guard.** If more than 20% of the companies analyzed so far fail (judged once at least 10 were analyzed), the state is not updated from that point on and the status message starts with `WARNING: monitor state NOT saved`. What was saved before stays, so nothing found in the bad part of the run is lost: it shows up again next run.
- Use a different **Monitor name** (`monitorId`) for each list. Don't run the same monitor twice at the same time.

Get alerts by connecting the run to email, Slack or a webhook with Apify integrations.

### Run time and limits

- **ANAF's limit is 1 request per second**, and the balance-sheet service answers one company and one year per request. The actor respects that limit (one request a little over every second, across all ANAF services), so run time grows with companies × years:

| Companies | Years | Approx. run time |
|---|---|---|
| 10 | 3 | ~30 seconds |
| 100 | 3 | ~6 minutes |
| 1,000 | 3 | **~1 hour** |

In monitor mode, runs after the first one are roughly 2–3 times faster.

- **For large lists, schedule monthly runs.** Balance sheets change at most once a year (plus corrections), so a monthly monitor is enough.
- **Up to 1,000 CUIs per run.** For more, split the list (in monitor mode, each list with its own `monitorId`).
- **Only what ANAF publishes.** The service has a short set of indicators (about 20 for standard filers). There is no cash-flow statement, no notes, no auditor's opinion, and no insolvency data.
- **Statements can be corrected** after filing, and publication can be late. A company with no statement isn't necessarily inactive. In monitor mode, older years are not re-fetched; the latest year is.
- **Banks, insurers and similar** use different layouts and get `UNSUPPORTED_FILER_TYPE`.

### Pricing

**Free during launch.** Right now there are no per-event charges: you pay only the usual Apify platform usage (compute, storage) of your runs, from your own Apify account. The table below is the **planned** pay-per-event pricing. When it starts, Apify notifies users at least 14 days in advance, and from then on platform usage is no longer billed to you separately.

Planned pricing (pay per event):

| Event | Price |
|---|---|
| Company analyzed | **$0.005** per company ($5.00 per 1,000) |
| Run start | Apify's standard start event, $0.00005 per run |

- **Company analyzed:** once per company with status `OK` that is written to your dataset, **however many years** are analyzed.
- **Free:** `NOT_FOUND`, `NO_STATEMENTS`, `SKIPPED_NATURAL_PERSON`, `UNSUPPORTED_FILER_TYPE`, `INVALID_INPUT`, `ERROR`, duplicates in your list, and unchanged companies in monitor mode. Retries are never charged.
- **Maximum cost per run.** If you set one, the actor never analyzes more companies than it can still charge. At the limit it stops cleanly: rows already written stay, the rest get no rows, and the status message starts with `STOPPED` and says how many were not analyzed. In monitor mode the companies already analyzed stay saved, so the next run doesn't report or charge them again.

Examples (planned pricing): 100 companies once = $0.50; 1,000 companies once = $5.00. A monthly monitor of 1,000 companies costs $5.00 for the baseline, then $0.005 for each company with a change.

### Part of a supplier-check suite

Financial statements are yearly. For **today's** tax status (VAT registration, inactive taxpayer, deregistration), use [Romania Supplier Monitor (ANAF VAT & Inactive Taxpayers)](https://apify.com/nocturntools/ro-supplier-monitor) with the same CUI list. Buying from an inactive taxpayer can cost you the right to deduct the expense and the VAT; that actor tells you when it happens.

For **court cases** (insolvency as debtor, active cases as defendant, tax and labor disputes), use [Romania Supplier Litigation Monitor (portal.just.ro)](https://apify.com/nocturntools/ro-supplier-litigation) with the same list.

### Privacy and data source

- **Sources:** ANAF's public web services: the balance-sheet service (`webservicesp.anaf.ro/bilant`) and the taxpayer registry (PlatitorTvaRest v9) for name, legal form, status and to tell unknown CUIs apart. No login, no captcha, no scraping.
- **Legal entities only.** Natural-person entities (PFA, II, IF and similar) are detected from the registry and skipped: the row holds only the CUI and `SKIPPED_NATURAL_PERSON`, with no name and no figures, and they are free.
- No names of administrators or shareholders (the sources don't contain them).
- Your CUIs are sent only to ANAF. Results stay in your Apify account. In monitor mode, a compact snapshot per company (status, flags, figures of years seen) is kept in your own key-value store. Personal data is not logged.
- **Data is as published by ANAF.** The actor doesn't correct or guarantee it.

**Unofficial tool. Data from ANAF public web services. Not affiliated with ANAF. Not credit or financial advice.**

### FAQ

**What makes this different?**

- **Risk flags instead of raw numbers.** You get `NEGATIVE_EQUITY`, `LOSS_STREAK`, `REVENUE_DROP`... per company, with the figures and the ANAF source URLs behind them.
- **Priced per company, not per company-year.** 3 or 5 years of statements cost the same $0.005.
- **Monitor charges only for changes.** A scheduled monitor pays for companies where something changed, not for re-reading the whole list.
- **Honest about gaps.** Missing statements, unsupported filers and ANAF errors are separate, free statuses, and an ANAF error is never reported as a change.

**Is this a credit score?**
No. There is no score, rating or recommendation, only factual signals from the published balance sheets. Use them as a starting point for your own review.

**Why is a large company `UNSUPPORTED_FILER_TYPE`?**
Banks, insurers and some other financial institutions file statements with a different structure, which ANAF publishes with different indicators. The actor doesn't guess their mapping.

**Why do I see `NO_RECENT_STATEMENT` for a healthy company?**
It hasn't filed (or ANAF hasn't published) the latest year yet. Flags are then computed on its newest available year.

**Why are the numbers different from the company's annual report?**
ANAF publishes the short-form indicators from the statement filed with the Ministry of Finance, possibly before corrections. Groups also publish consolidated reports that ANAF doesn't cover.

### Pe scurt, în română

Semnale de risc pentru firme românești, după CUI, din bilanțurile publicate de ANAF: capitaluri proprii negative, capitaluri sub jumătate din capitalul social, pierdere, pierderi consecutive, scăderea cifrei de afaceri, zero salariați, bilanț lipsă pentru ultimul an. Fără scor și fără rating, doar fapte cu sursa ANAF.

- Un rând per firmă: cifre pe ultimii 1–5 ani, rapoarte și semnale.
- Modul monitor: rulări programate (de exemplu lunar) care raportează doar firmele cu schimbări. Starea se salvează pe parcurs: dacă rularea se oprește mai devreme (timeout, cost maxim, oprire manuală), firmele deja analizate rămân salvate, iar rularea următoare continuă de acolo, fără să le raporteze sau să le taxeze din nou.
- PFA / II / IF: nu sunt analizate și nu apar date despre ele (GDPR).
- Maximum 1.000 de CUI-uri pe rulare (aproximativ o oră pentru 3 ani, din cauza limitei ANAF de 1 cerere pe secundă).
- Preț: gratuit la lansare (plătești doar consumul de platformă Apify); prețul planificat, anunțat de Apify cu cel puțin 14 zile înainte: 0,005 $ per firmă analizată, indiferent de numărul de ani; restul statusurilor sunt gratuite.
- Pentru statusul TVA / inactiv folosește și [Romania Supplier Monitor (ANAF VAT & Inactive Taxpayers)](https://apify.com/nocturntools/ro-supplier-monitor).
- Pentru dosarele din instanțe folosește [Romania Supplier Litigation Monitor (portal.just.ro)](https://apify.com/nocturntools/ro-supplier-litigation).

Instrument neoficial. Date din serviciile web publice ANAF. Nu este afiliat cu ANAF. Nu reprezintă consultanță financiară sau de credit.

# Actor input Schema

## `cuis` (type: `array`):

Romanian fiscal codes, one per line. Accepts "RO14399840", "RO 14399840" or "14399840"; 2 to 9 digits with a valid control digit. Invalid entries get INVALID_INPUT and are never sent to ANAF. Duplicates are analyzed once. Maximum 1,000 per run (about 1 hour with 3 years).

## `years` (type: `integer`):

How many years to analyze, counting back from the latest year ANAF has published (that year included). Each year is one ANAF request per company. 2 or more years are needed for LOSS_STREAK and REVENUE_DROP.

## `revenueDropPct` (type: `integer`):

REVENUE_DROP is raised when net turnover fell by at least this percentage compared with the previous year.

## `monitorMode` (type: `boolean`):

Compare with the previous monitor run and output only companies with changes: a new year published, a flag that appeared or disappeared, or a status change. The first run outputs everything (baseline). Years already seen are read from your key-value store, so later runs need about 1–2 ANAF requests per company.

## `monitorId` (type: `string`):

Monitor mode only. Name of the saved state, so you can monitor several lists. Letters, digits and dashes, max. 40 characters. Stored in your key-value store "ro-supplier-financial-health-state".

## `includeRawIndicators` (type: `boolean`):

Add the full indicator list ANAF returned for each year fetched in this run (field "raw"). In monitor mode, years read from the saved state have no raw list.

## Actor input object example

```json
{
  "cuis": [
    "RO14399840",
    "1475261",
    "49999996"
  ],
  "years": 3,
  "revenueDropPct": 30,
  "monitorMode": false,
  "monitorId": "default",
  "includeRawIndicators": false
}
```

# 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 = {
    "cuis": [
        "RO14399840",
        "1475261",
        "49999996"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nocturntools/ro-supplier-financial-health").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 = { "cuis": [
        "RO14399840",
        "1475261",
        "49999996",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("nocturntools/ro-supplier-financial-health").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 '{
  "cuis": [
    "RO14399840",
    "1475261",
    "49999996"
  ]
}' |
apify call nocturntools/ro-supplier-financial-health --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nocturntools/ro-supplier-financial-health"
        }
    }
}
```

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/lCmuyFWcLKBeClnz2/builds/qAHk0qe9nIQXTbXQo/openapi.json
