# SRI Ecuador RUC Lookup (`itsadry/sri-ruc-ecuador`) Actor

Look up Ecuadorian taxpayers by RUC in the SRI public registry: legal name, status, economic activity, tax regime, legal representatives and establishments.

- **URL**: https://apify.com/itsadry/sri-ruc-ecuador.md
- **Developed by:** [EC Data](https://apify.com/itsadry) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

## SRI Ecuador RUC Lookup

Look up Ecuadorian taxpayers (RUC) in the public catalog of the **SRI** (Servicio de Rentas Internas): legal name, status, main economic activity, tax regime, legal representatives and establishments. It calls the SRI's JSON endpoints directly (no browser), so it is fast and cheap to run.

### Input

```json
{
  "rucs": ["1790016919001", "1768153530001"],
  "incluirEstablecimientos": true,
  "concurrencia": 5,
  "reintentos": 3
}
```

| Field | Description | Default |
|---|---|---|
| `rucs` | List of 13-digit RUC numbers (duplicates are ignored) | required |
| `incluirEstablecimientos` | Add the establishments list (one extra request per RUC) | `true` |
| `concurrencia` | Max parallel lookups | `5` |
| `reintentos` | Retries with exponential backoff on network/server errors | `3` |

### Output

One dataset item per RUC found. A failed or unknown RUC does not stop the run: it is saved with `error` filled in in a separate dataset called `errores` (Storage tab of the run) and **you are not charged for it**.

```json
{
  "ruc": "1790016919001",
  "existe": true,
  "error": null,
  "razonSocial": "CORPORACION FAVORITA C.A.",
  "estado": "ACTIVO",
  "actividadEconomicaPrincipal": "VENTA AL POR MAYOR DE OTROS PRODUCTOS DIVERSOS PARA EL CONSUMIDOR.",
  "tipoContribuyente": "SOCIEDAD",
  "regimen": "GENERAL",
  "obligadoLlevarContabilidad": "SI",
  "agenteRetencion": "SI",
  "contribuyenteEspecial": "SI",
  "contribuyenteFantasma": "NO",
  "transaccionesInexistentes": "NO",
  "fechaInicioActividades": "1957-11-30",
  "representantesLegales": [{ "identificacion": "1701529958", "nombre": "WRIGHT DURAN BALLEN RONALD OWEN" }],
  "establecimientos": [{ "numero": "001", "tipo": "MAT", "estado": "ABIERTO", "matriz": true, "direccion": "PICHINCHA / RUMIÑAHUI / ..." }]
}
```

Fields: `ruc`, `existe`, `error`, `razonSocial`, `estado`, `actividadEconomicaPrincipal`, `tipoContribuyente`, `regimen`, `categoria`, `obligadoLlevarContabilidad`, `agenteRetencion`, `contribuyenteEspecial`, `contribuyenteFantasma`, `transaccionesInexistentes`, `fechaInicioActividades`, `fechaCese`, `fechaReinicioActividades`, `fechaActualizacion`, `motivoCancelacionSuspension`, `representantesLegales`, `establecimientos`.

### Use cases

- **KYC / onboarding**: confirm that a counterparty exists and is `ACTIVO`.
- **AML / due diligence**: flag `contribuyenteFantasma` / `transaccionesInexistentes`, ceased or suspended taxpayers.
- **Data enrichment**: complete CRM or supplier databases with legal name, activity and establishments.

### Limitations

- Lookup by RUC only (no search by name).
- Data is whatever the SRI publishes at query time; the Actor does not certify it.
- The SRI may throttle or block heavy traffic or some datacenter IPs; keep `concurrencia` low and use a proxy if needed.

### Responsible use of personal data

Results can include personal data (names and ID numbers of legal representatives, and RUCs of natural persons). Under Ecuador's **Ley Orgánica de Protección de Datos Personales (LOPDP)** you must have a legitimate purpose and legal basis, process only what is needed and respect data subjects' rights. You are responsible for your use of the data. This Actor is not affiliated with the SRI.

***

## Español

Consulta contribuyentes (RUC) en el catálogo público del **SRI**: razón social, estado, actividad económica principal, régimen, representantes legales y establecimientos. Usa directamente los servicios JSON del SRI (sin navegador), por lo que es rápido y barato.

**Entrada:** lista `rucs` de 13 dígitos; opciones `incluirEstablecimientos`, `concurrencia` y `reintentos` (ver tabla arriba).

**Salida:** un registro por RUC encontrado. Si un RUC es inválido, no existe o falla la consulta, se guarda con el campo `error` en un dataset aparte llamado `errores` (pestaña Storage de la ejecución), **no se cobra**, y la ejecución continúa con el siguiente.

**Casos de uso:** KYC, AML y debida diligencia (verificar existencia y estado, detectar contribuyentes fantasma o con transacciones inexistentes), y enriquecimiento de bases de datos de clientes y proveedores.

**Limitaciones:** solo consulta por RUC; la información es la que el SRI publica en el momento; el SRI puede limitar el tráfico intensivo.

**Uso responsable (LOPDP):** los resultados pueden contener datos personales. Trátalos con una finalidad legítima y base legal, solo lo necesario, y respetando los derechos de los titulares conforme a la Ley Orgánica de Protección de Datos Personales. Este Actor no está afiliado al SRI.

# Actor input Schema

## `rucs` (type: `array`):

RUC de 13 dígitos a consultar. Los duplicados se ignoran.

## `incluirEstablecimientos` (type: `boolean`):

Agrega la lista de establecimientos (una petición extra por RUC).

## `concurrencia` (type: `integer`):

Máximo de RUC consultados a la vez. Un valor bajo evita sobrecargar el SRI.

## `reintentos` (type: `integer`):

Reintentos con espera exponencial ante errores de red o del servidor.

## Actor input object example

```json
{
  "rucs": [
    "1790016919001",
    "1768153530001"
  ],
  "incluirEstablecimientos": true,
  "concurrencia": 5,
  "reintentos": 3
}
```

# 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 = {
    "rucs": [
        "1790016919001",
        "1768153530001"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("itsadry/sri-ruc-ecuador").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 = { "rucs": [
        "1790016919001",
        "1768153530001",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("itsadry/sri-ruc-ecuador").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 '{
  "rucs": [
    "1790016919001",
    "1768153530001"
  ]
}' |
apify call itsadry/sri-ruc-ecuador --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,itsadry/sri-ruc-ecuador"
        }
    }
}
```

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/gE5pjwEh7taREcQ5A/builds/zrMEpR5n3fGFLA9gD/openapi.json
