# Validador de RNC DGII para facturación electrónica (e-CF) (`opendata-cr/dominican-rnc-validator`) Actor

Valide RNC de empresas en el padrón público de la DGII: dígito verificador, estado, razón social, nombre comercial, actividad y régimen. Confirme el RNC del comprador antes de emitir un e-CF. También exporta empresas por nombre, actividad o estado. No consulta cédulas.

- **URL**: https://apify.com/opendata-cr/dominican-rnc-validator.md
- **Developed by:** [Tornwar](https://apify.com/opendata-cr) (community)
- **Categories:** Business, Lead generation, Automation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 rnc validados

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

## Validador de RNC (DGII) / Dominican RNC Validator

Valida RNC de personas jurídicas y exporta empresas a partir del padrón público de contribuyentes que publica la **Dirección General de Impuestos Internos (DGII)** de la República Dominicana (`DGII_RNC.zip`). El Actor descarga ese archivo oficial; no inicia sesión en la Oficina Virtual ni usa navegador o proxies.

Validates Dominican Republic company tax IDs (RNC) and exports legal entities from the public taxpayer registry published by the **DGII** (Dirección General de Impuestos Internos). English below.

***

### Español

#### Para quién es

La DGII extendió hasta el 15 de noviembre de 2026 el plazo de facturación electrónica (e-CF) para contribuyentes pequeños, micros y no clasificados ([aviso del 6 de mayo de 2026](https://dgii.gov.do/publicacionesOficiales/avisosInformativos/Documents/2026/06-26.pdf)). Antes de emitir un e-CF conviene confirmar que el RNC del comprador existe y está activo.

- Software de facturación y proveedores de e-CF: validar el RNC del comprador antes de emitir (formato, dígito verificador, presencia en el padrón y estado).
- ERP: completar razón social, nombre comercial, actividad económica y régimen (NORMAL o RST) sin consultar la página de la DGII registro por registro.
- Debida diligencia y cumplimiento: exportar empresas por nombre, actividad o estado, con la fecha del archivo usado en cada fila.

#### Qué devuelve

| Modo | Cada ítem es | Uso |
|---|---|---|
| `validate` | Un valor de la lista enviada | Saber si ese RNC se puede usar en un e-CF |
| `search` | Una persona jurídica del padrón | Buscar por nombre, actividad o estado |
| `export` | Igual que `search` | Mismo modo con otro nombre; mismo evento de cobro |

Para aceptar un RNC en facturación, la regla práctica es `code == "active"` y `checkDigitValid == true`: 9 dígitos, dígito verificador correcto, presente en el padrón y con estado `ACTIVO`.

| `code` | Significado | ¿Se cobra? |
|---|---|---|
| `active` | En el padrón, estado ACTIVO | Sí, `rnc-validado` |
| `inactive` | En el padrón, con otro estado | Sí |
| `not_found` | 9 dígitos, no está en el padrón descargado | Sí; la respuesta negativa también es una validación |
| `cedula_not_supported` | 11 dígitos, persona física | No |
| `invalid_format` | Otra cantidad de dígitos | No |

`isActive` es `true` solo cuando el estado es `ACTIVO`. Si el RNC no está en el padrón, `isActive` es `null`, que no es lo mismo que inactivo.

#### Precio (pago por evento)

| Evento | Precio | Se cobra por |
|---|---|---|
| `rnc-validado` | US$0,003 | Cada RNC de 9 dígitos validado, esté o no en el padrón |
| `rnc-exportado` | US$0,0005 | Cada empresa entregada en `search` o `export` |

Las cédulas, los valores con formato inválido y las búsquedas sin resultados no se cobran. Por ejemplo, validar 1.000 RNC cuesta US$3 y exportar 10.000 empresas, US$5.

`maxResults` limita cuántos resultados se cobran por ejecución. El formulario sugiere 10. Si se omite por API, `search` y `export` devuelven hasta 100 filas y `validate` procesa toda la lista (hasta 50.000 valores). Las cédulas y los valores inválidos no cuentan para ese límite.

Si fija un máximo a cobrar por ejecución y se alcanza, la ejecución termina con éxito, conserva los resultados ya entregados e indica en el mensaje de estado cuántos se procesaron. Si el máximo no alcanza ni para un resultado, no se descarga el padrón.

#### Ejemplo: validar RNC

```json
{
  "mode": "validate",
  "rncs": ["1-01-01063-2", "101003723", "4-01-01006-2", "101001577"]
}
```

Son cuatro RNC activos: Banco Popular Dominicano, Cervecería Nacional Dominicana, Banco de Reservas y CODETEL. Se aceptan guiones, espacios y puntos: `1-01-01063-2`, `101 010 632` y `101.010.632` son el mismo RNC. Resultado para Banco Popular:

```json
{
  "mode": "validate",
  "input": "1-01-01063-2",
  "rnc": "101010632",
  "rncFormatted": "1-01-01063-2",
  "kind": "rnc",
  "supported": true,
  "personalRnc": false,
  "formatValid": true,
  "checkDigitValid": true,
  "expectedCheckDigit": "2",
  "found": true,
  "code": "active",
  "message": null,
  "razonSocial": "BANCO POPULAR DOMINICANO S A BANCO MULTIPLE",
  "nombreComercial": "BANCO POPULAR DOMINICANO",
  "actividadEconomica": "BANCOS MULTIPLES",
  "fechaInicio": "1984-08-15",
  "status": "ACTIVO",
  "regimenPagos": "NORMAL",
  "isActive": true,
  "source": "Dirección General de Impuestos Internos (DGII) — Padrón de Contribuyentes, archivo público DGII_RNC.zip",
  "sourceUrl": "https://dgii.gov.do/app/WebApps/Consultas/RNC/DGII_RNC.zip",
  "sourceFileName": "TMP/DGII_RNC.TXT",
  "sourceFileDate": "2026-10-03",
  "padronFecha": "2026-10-03",
  "sourceFileModifiedAt": "2026-10-03T02:22:56-04:00",
  "retrievedAt": "2026-10-04T15:40:00-04:00"
}
```

`rncFormatted` usa el agrupado 1-2-5-1 con que suele imprimirse en las facturas. Un RNC con dígito verificador válido que no aparece en el padrón (por ejemplo `139900005`) devuelve `code: "not_found"`, `found: false` e `isActive: null`, y se cobra.

#### Ejemplo: buscar o exportar

```json
{
  "mode": "search",
  "nameContains": "EDENORTE DOMINICANA",
  "onlyActive": true,
  "maxResults": 10
}
```

Devuelve Edenorte Dominicana, S.A., RNC `101821256`, estado `ACTIVO`, inicio de operaciones `1999-08-13`.

La búsqueda no distingue mayúsculas ni tildes (`compania` encuentra `COMPAÑIA`) y revisa la razón social y el nombre comercial. `actividadContains` busca en la actividad económica, que la DGII publica recortada a 30 caracteres. `status` acepta uno o varios de `ACTIVO`, `SUSPENDIDO`, `DADO DE BAJA`, `CESE TEMPORAL`, `ANULADO` y `RECHAZADO`. `regimen` es `NORMAL` o `RST`. `onlyActive` exige estado `ACTIVO` además de los otros filtros.

Los resultados siguen el orden del archivo de la DGII, no el alfabético. Si hay más coincidencias que el límite de filas, el resumen indica `truncated: true`. Sin filtros, se devuelven las primeras personas jurídicas del padrón.

#### Dígito verificador

Se calcula sobre los primeros 8 dígitos con los pesos `7, 9, 8, 6, 5, 4, 3, 2`. Se toma el residuo de la suma entre 11: si es 0, el dígito es 2; si es 1, el dígito es 1; en los demás casos, es `11 − residuo`. Estar en el padrón y tener el dígito correcto son comprobaciones distintas, y ambas se informan (`found` y `checkDigitValid`).

#### Fuente y actualización

- Datos: [padrón de contribuyentes de la DGII](https://dgii.gov.do/app/WebApps/Consultas/RNC/DGII_RNC.zip), archivo público `DGII_RNC.zip`.
- Este Actor no pertenece a la DGII ni está afiliado a ella. Cada ítem incluye la atribución en el campo `source`.
- La DGII actualiza el archivo con frecuencia, por lo general a diario, sin un horario fijo. Cada resultado indica la fecha del archivo (`sourceFileDate`). `padronFecha` repite esa fecha en formato AAAA-MM-DD. Si la descarga se completó, esa es la publicación vigente de la DGII, aunque la fecha no sea de hoy: el mensaje de estado dice «padrón DGII del AAAA-MM-DD» y `sourceFileStale` queda en `false`. `sourceFileStale` queda en `true` solo cuando no se pudo confirmar que la copia usada sea la que la DGII publica ahora; en ese caso el mensaje de estado indica que el padrón está desactualizado.
- Para una consulta diaria programada, una buena opción es `30 6 * * *` en la zona `America/Santo_Domingo`.
- No hay enlace directo a la Oficina Virtual. Use el número de `rnc` para consultarlo en dgii.gov.do.

#### Privacidad

El Actor trabaja solo con RNC de personas jurídicas (9 dígitos). El padrón de la DGII también incluye cédulas de 11 dígitos de personas físicas: esas filas se descartan al leer el archivo y no se guardan, no se registran en el log ni aparecen en el dataset.

Si la lista enviada incluye una cédula, se rechaza: el resultado indica `cedula_not_supported`, no trae datos del padrón y no se cobra.

Algunos RNC de 9 dígitos que empiezan con 5 corresponden a personas físicas, en su mayoría extranjeras (`personalRnc: true`). La validación de un RNC puntual sí los devuelve, porque quien consulta ya tiene el número. `search` y `export` no los incluyen, salvo que se active `includePrefix5`.

***

### English

#### Who it is for

DGII extended the electronic invoicing (e-CF) deadline for small, micro, and unclassified taxpayers to 15 November 2026 ([notice of 6 May 2026](https://dgii.gov.do/publicacionesOficiales/avisosInformativos/Documents/2026/06-26.pdf)). Before issuing an e-CF, it is worth confirming that the buyer's RNC exists and is active.

- Invoicing software and e-CF providers: check the buyer's RNC before issuing (format, check digit, presence in the registry, and status).
- ERPs: fill in legal name, trade name, economic activity, and tax regime (NORMAL or RST) without looking up each customer on the DGII website.
- Due diligence and compliance: export companies by name, activity, or status, with the source file date on every row.

#### What you get

| Mode | Each item is | Use it for |
|---|---|---|
| `validate` | One submitted value | Decide whether that RNC can go on an e-CF |
| `search` | One legal entity | Filter the registry |
| `export` | Same as `search` | Same mode under another name; same charge event |

Accept a buyer when `code` is `active` and `checkDigitValid` is `true`: 9 digits, correct check digit, present in the registry, status `ACTIVO`.

| `code` | Meaning | Charged? |
|---|---|---|
| `active` | In the registry, status ACTIVO | Yes, `rnc-validado` |
| `inactive` | In the registry, any other status | Yes |
| `not_found` | 9 digits, not in the downloaded registry | Yes; a negative answer is still a validation |
| `cedula_not_supported` | 11 digits, a natural person | No |
| `invalid_format` | Any other length | No |

`isActive` is `true` only for `ACTIVO`. It is `null` when the RNC is not in the registry, which is not the same as inactive.

#### Pricing (pay per event)

| Event | Price | Charged for |
|---|---|---|
| `rnc-validado` | US$0.003 | Each 9-digit RNC validated, whether or not it is in the registry |
| `rnc-exportado` | US$0.0005 | Each company returned by `search` or `export` |

Cédulas, invalid values, and empty searches are not charged. For example, 1,000 validations cost US$3 and 10,000 exported companies cost US$5.

`maxResults` caps how many results are charged per run. The form suggests 10. If you omit it in an API call, `search` and `export` return up to 100 rows and `validate` processes the whole list (up to 50,000 values). Cédulas and invalid values do not count toward the cap.

If you set a maximum charge per run and it is reached, the run ends successfully, keeps the results already delivered, and its status message says how many were processed. If the maximum does not cover a single result, the registry is not downloaded.

#### Example: validate RNCs

```json
{
  "mode": "validate",
  "rncs": ["1-01-01063-2", "101003723", "4-01-01006-2", "101001577"]
}
```

These are four active RNCs: Banco Popular Dominicano, Cervecería Nacional Dominicana, Banco de Reservas, and CODETEL. Dashes, spaces, and dots are ignored. Banco Popular comes back `ACTIVO` with a valid check digit, regime `NORMAL`, and start date `1984-08-15`; the full item is shown in the Spanish section above.

`rncFormatted` uses the 1-2-5-1 grouping usually printed on invoices. An RNC with a valid check digit that is not in the registry (for example `139900005`) returns `code: "not_found"`, `found: false`, and `isActive: null`, and is charged.

#### Example: search or export

```json
{
  "mode": "search",
  "nameContains": "EDENORTE DOMINICANA",
  "onlyActive": true,
  "maxResults": 10
}
```

Returns Edenorte Dominicana, S.A., RNC `101821256`, status `ACTIVO`, start date `1999-08-13`.

Matching ignores case and accents and checks both the legal name and the trade name. `actividadContains` searches the economic activity, which DGII publishes cut to 30 characters. `status` takes one or more of `ACTIVO`, `SUSPENDIDO`, `DADO DE BAJA`, `CESE TEMPORAL`, `ANULADO`, and `RECHAZADO`. `regimen` is `NORMAL` or `RST`. `onlyActive` requires `ACTIVO` on top of the other filters.

Results follow the order of the DGII file, not alphabetical order. When there are more matches than the row cap, the summary shows `truncated: true`. With no filters, the run returns the first legal entities in the registry.

#### Check digit

The check digit is computed from the first 8 digits with weights `7, 9, 8, 6, 5, 4, 3, 2`. Take the remainder of the sum divided by 11: 0 gives check digit 2, 1 gives 1, and any other remainder gives `11 − remainder`. Being in the registry and having a correct check digit are separate checks, and both are reported (`found` and `checkDigitValid`).

#### Source and freshness

- Data: [DGII taxpayer registry](https://dgii.gov.do/app/WebApps/Consultas/RNC/DGII_RNC.zip), public file `DGII_RNC.zip`.
- This Actor is not DGII and is not affiliated with it. Every item carries the attribution in the `source` field.
- DGII updates the file frequently, usually daily, with no fixed time. Every result shows the date of the file used (`sourceFileDate`). `padronFecha` repeats that date as YYYY-MM-DD. A completed download is DGII's current publication even when the date is not today: the status message says «padrón DGII del AAAA-MM-DD» and `sourceFileStale` is `false`. `sourceFileStale` is `true` only when the run could not confirm that the copy it used is the one DGII is publishing now; the status message then says the registry is out of date.
- For a daily scheduled check, `30 6 * * *` in the `America/Santo_Domingo` timezone works well.
- There is no direct link to DGII's Oficina Virtual. Use the `rnc` number to look it up on dgii.gov.do.

#### Privacy

The Actor only works with legal-entity RNCs (9 digits). The DGII registry also contains 11-digit cédulas of natural persons; those rows are dropped while reading the file and are not stored, logged, or written to the dataset.

If your list includes a cédula, it is rejected: the result shows `cedula_not_supported`, carries no registry data, and is not charged.

Some 9-digit RNCs starting with 5 belong to natural persons, mostly foreign nationals (`personalRnc: true`). A direct `validate` lookup still returns them, since the caller already has the number. `search` and `export` leave them out unless `includePrefix5` is turned on.

# Actor input Schema

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

validate: un resultado por cada RNC de la lista. search y export: empresas del padrón que cumplen los filtros (export es el mismo modo con otro nombre y el mismo evento de cobro). validate: one result per submitted RNC. search and export: registry rows that match the filters; export is the same mode under another name, with the same charge event.

## `rncs` (type: `array`):

Uno por ítem. Se aceptan guiones, espacios y puntos: 1-01-01063-2 y 101010632 son el mismo RNC. Una cédula de 11 dígitos se responde como no soportada, sin datos del padrón y sin cobro. One company RNC per item. Dashes, spaces, and dots are ignored. An 11-digit cédula is returned as unsupported, with no registry data and no charge.

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

Máximo de resultados cobrados por ejecución en validate, search y export. Las cédulas y los valores que no son un RNC de 9 dígitos no cuentan ni se cobran. El formulario sugiere 10. Si se omite, search y export devuelven hasta 100 filas y validate procesa toda la lista (hasta 50.000 valores). Por API también se acepta maxItems; si se envían ambos, se usa el menor. Maximum charged results per run for validate, search, and export. Cédulas and other non-RNC values do not count and are not charged. The form suggests 10. If omitted, search and export return up to 100 rows and validate processes the whole list (up to 50,000 values). The API also accepts maxItems; if both are sent, the smaller one applies.

## `nameContains` (type: `string`):

Búsqueda y exportación. Coincide con la razón social o el nombre comercial, sin distinguir mayúsculas ni tildes. Search and export. Matches razón social or trade name. Case and accents are ignored.

## `actividadContains` (type: `string`):

Texto contenido en la actividad económica, sin distinguir mayúsculas ni tildes. La DGII publica ese campo recortado a 30 caracteres. Text contained in the economic activity, ignoring case and accents. DGII cuts this field at 30 characters.

## `status` (type: `array`):

Coincidencia exacta, sin distinguir mayúsculas. Valores posibles: ACTIVO, SUSPENDIDO, DADO DE BAJA, CESE TEMPORAL, ANULADO, RECHAZADO. Si se deja vacío, se incluyen todos. Exact match, case ignored. Empty means any status.

## `regimen` (type: `string`):

NORMAL o RST (Régimen Simplificado de Tributación). Si se deja vacío, se incluyen ambos. NORMAL or RST (simplified tax regime). Empty means both.

## `onlyActive` (type: `boolean`):

En búsqueda y exportación, deja solo las empresas con estado ACTIVO, además de los otros filtros. Search and export only: status must be ACTIVO, in addition to the other filters.

## `includePrefix5` (type: `boolean`):

Cerca de 1.800 RNC de 9 dígitos empiezan con 5 y corresponden a personas físicas, en su mayoría extranjeras. La búsqueda y la exportación no los incluyen salvo que se active esta opción. La validación de un RNC puntual sí los devuelve. About 1,800 nine-digit RNCs start with 5 and belong to natural persons. Search and export leave them out unless this is on. A direct validate lookup still returns them.

## Actor input object example

```json
{
  "mode": "validate",
  "rncs": [
    "1-01-01063-2",
    "101003723",
    "4-01-01006-2",
    "101001577"
  ],
  "maxResults": 10,
  "nameContains": "EDENORTE DOMINICANA",
  "actividadContains": "BANCOS MULTIPLES",
  "status": [],
  "onlyActive": false,
  "includePrefix5": false
}
```

# Actor output Schema

## `results` (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 = {
    "rncs": [
        "1-01-01063-2",
        "101003723",
        "4-01-01006-2",
        "101001577"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("opendata-cr/dominican-rnc-validator").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 = {
    "rncs": [
        "1-01-01063-2",
        "101003723",
        "4-01-01006-2",
        "101001577",
    ],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("opendata-cr/dominican-rnc-validator").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 '{
  "rncs": [
    "1-01-01063-2",
    "101003723",
    "4-01-01006-2",
    "101001577"
  ],
  "maxResults": 10
}' |
apify call opendata-cr/dominican-rnc-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,opendata-cr/dominican-rnc-validator"
        }
    }
}
```

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/Q8X9Wf0tSAuWCz2PQ/builds/h8n8NjxnFJTfxd9fU/openapi.json
