# Romania ANAF VAT & Taxpayer Status Check by CUI (`thatmike1/ro-anaf-vat-status`) Actor

Check Romanian CUI numbers against the official ANAF register as of a chosen date. One row per CUI: VAT periods, VAT on cash, inactive, split VAT, e-Invoice registry.

- **URL**: https://apify.com/thatmike1/ro-anaf-vat-status.md
- **Developed by:** [Michal Pšenčík](https://apify.com/thatmike1) (community)
- **Categories:** Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

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

## Romania ANAF VAT & Taxpayer Status Check by CUI

Check Romanian CUI (fiscal code) numbers against ANAF's official public register as of a date you choose. You get one
flat row per CUI that ANAF found: VAT registration and its full period history, VAT on cash, inactive taxpayer status,
split VAT and the RO e-Factura registry, plus the name, fiscal address and registration details as ANAF publishes
them.

Useful for keeping a receipt of what ANAF said about a supplier list on an invoice date, or a monthly sweep of
Romanian counterparties.

### Input

| Field                  | What it does                                                             |
| ---------------------- | ------------------------------------------------------------------------ |
| CUI numbers            | 1 to 300 CUIs, as text or numbers. `RO` prefixes and spaces are removed. |
| As-of date             | `YYYY-MM-DD` from 2015-01-01 to today. Empty means today in Romania.     |
| Maximum rows           | The most rows to store (default 300).                                    |
| Pause between requests | Advanced; at least 1.2 s, because ANAF allows one request per second.    |

```json
{ "cuis": ["14399840", "RO 1590082", 2816464], "asOfDate": "2026-10-22" }
```

Each CUI is checked locally first: it must be 2 to 10 digits without a leading zero and pass the CUI check digit.
Values that fail are reported in the run summary and never sent. Duplicates are checked once. ANAF accepts any date
silently (a wrong format becomes another year), so the date is validated before anything is sent.

### Output

One row per found CUI, in the order you listed them. Example (Dante International, as of 22 Oct 2026):

```json
{
    "id": "ro-anaf-vat-status:v1:14399840:2026-10-22",
    "cui": "14399840",
    "asOfDate": "2026-10-22",
    "name": "DANTE INTERNATIONAL SA",
    "registrationState": "INREGISTRAT din data 29.08.2006",
    "registrationDate": "2002-01-23",
    "vatRegisteredAsOf": true,
    "vatPeriods": [
        { "startDate": "2002-02-01", "endDate": null, "cancellationRecordedDate": null, "cancellationBasis": null }
    ],
    "vatOnCashAsOf": false,
    "inactiveTaxpayerAsOf": false,
    "splitVatAsOf": false,
    "eInvoiceRegistryAsOf": false,
    "eInvoiceRegistryDate": null
}
```

Rows also carry `fiscalAddress`, `tradeRegisterNo`, `caenCode`, `legalForm`, the detail objects `vatOnCash`, `inactive`
and `splitVat`, and provenance: `sourceUrl`, `sourceResponseSha256` (of ANAF's whole answer), `sourceResponseDateHeader`,
`fetchedAt` and an `observationHash` of the data fields. Empty ANAF fields are `null`.

The `...AsOf` flags are ANAF's flags for the requested date. The other dates are exported exactly as that answer sent
them; for example the e-Invoice registry date can be empty for a past date and filled for today. Phone, fax, postal
codes, bank accounts and ownership fields are never exported. The actor reports what the register says and draws no
legal conclusion from it.

#### Run summary

The key-value store record `SUMMARY` (free) lists every input position with its outcome: `delivered`, `not_found`,
`invalid_cui`, `invalid_cui_checksum`, or a failure such as `error`, `source_schema_changed`,
`not_attempted_source_stop`, `not_attempted_deadline`, `not_delivered_max_items`, `not_stored_budget`, `not_stored`
or `delivery_uncertain`. `complete` is true only when every CUI got a definitive answer and every found row was stored.
It also carries `asOfDate`, counts, requests made and any errors.

### Pricing

Pay per event: **$0.002 per stored row** (a CUI that ANAF found) and **$0.00005 per run start**. Each row is billed
once, when it is stored; rows already stored stay billed even if the run later fails or stops. Errors, rows not
stored, not-found, invalid or filtered inputs and the SUMMARY carry no item fee. The start event applies to every
run, including failed and empty ones. Checking the same CUIs again bills again: the actor keeps no state between runs.

Example: 3 found CUIs cost $0.00605, 300 found cost $0.60005.

### Limits

- Source: ANAF's public web service `PlatitorTvaRest/v9/tva`, no key. At most 100 CUIs per request, at least 1.2 s
  between requests, one request at a time, a 240 s run deadline.
- If ANAF refuses (403, 429, an HTML rejection page) the run stops at once and reports it; there is no proxy or
  retry around a block. Server errors and timeouts are retried twice.
- The CUI check digit rule is empirical; a real CUI it rejected would show as `invalid_cui_checksum` in the summary.
- Dates before 2015 and positive split-VAT records were not verified.

# Actor input Schema

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

1 to 300 Romanian CUI (fiscal code) numbers, as text or whole numbers. An optional RO prefix and spaces are removed. Values that are not 2-10 digits or fail the CUI check digit are reported in SUMMARY and never sent to ANAF.

## `asOfDate` (type: `string`):

The date ANAF answers for, YYYY-MM-DD, from 2015-01-01 to today. Empty means today in Europe/Bucharest at run start.

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

The most rows to store (each stored row is billed). A run that stops here with more found CUIs is reported as capped.

## `requestIntervalMs` (type: `integer`):

Idle time after every ANAF response. ANAF allows at most one request per second.

## Actor input object example

```json
{
  "cuis": [
    "14399840",
    "RO 1590082",
    "2816464"
  ],
  "maxItems": 300,
  "requestIntervalMs": 1200
}
```

# Actor output Schema

## `rows` (type: `string`):

No description

## `summary` (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": [
        "14399840",
        "RO 1590082",
        "2816464"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("thatmike1/ro-anaf-vat-status").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": [
        "14399840",
        "RO 1590082",
        "2816464",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("thatmike1/ro-anaf-vat-status").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": [
    "14399840",
    "RO 1590082",
    "2816464"
  ]
}' |
apify call thatmike1/ro-anaf-vat-status --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thatmike1/ro-anaf-vat-status"
        }
    }
}
```

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/KhLciZXPjbChhmhFu/builds/XBNsoZP2h8HtR0Qhb/openapi.json
