# NIT Colombia RUES API (`pmodinger/nit-colombia`) Actor

Consulta NIT Colombia, razon social o matricula mercantil en datos abiertos RUES y entrega empresas estructuradas para validacion, CRM, BI y automatizacion.

- **URL**: https://apify.com/pmodinger/nit-colombia.md
- **Developed by:** [Latin America Data](https://apify.com/pmodinger) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## NIT Colombia API - Buscar Empresa por NIT o Razon Social

Consulta **NIT Colombia**, razon social o matricula mercantil usando datos abiertos RUES publicados en Datos Abiertos Colombia. Entrega empresas estructuradas en Apify Dataset, JSON, CSV, Excel, XML y API para validacion comercial, CRM, BI, monitoreo y automatizacion.

El Actor usa la API de datos abiertos directamente, no navegador. Esto lo hace rapido, barato y estable para consultas puntuales o lotes. Cada empresa entregada se cobra como evento `result` a **USD 0.003**.

### Para que sirve

| Caso de uso | Como ayuda |
| --- | --- |
| Buscar empresa por NIT | Devuelve razon social, estado, camara, matricula y actividad. |
| Validacion de proveedores | Revisa estado de matricula, renovacion y datos de registro. |
| Limpieza de CRM | Normaliza NIT, digito verificador y razon social. |
| Inteligencia comercial | Extrae empresas por nombre o matricula para analisis y dashboards. |
| Automatizacion via API | Descarga resultados en JSON, CSV, Excel o por Apify API. |

### Fuente y cobertura

La fuente es el dataset publico **Personas Naturales, Personas Juridicas y Entidades Sin Animo de Lucro** de `datos.gov.co`, relacionado con informacion registral RUES. El Actor esta orientado a filas con NIT y empresas; no esta pensado para consulta de cedulas de ciudadania.

La frescura, cobertura y actualizacion dependen de la fuente publica. El dataset usado fue verificado con actualizacion visible en la fuente el 2026-06-01 UTC.

### Input rapido

Buscar por NIT:

```json
{
  "queries": [
    {
      "searchType": "nit",
      "term": "900654922-7"
    }
  ],
  "maxPagesPerQuery": 1,
  "maxResultsPerQuery": 3,
  "pageSize": 3,
  "validateCheckDigit": true
}
````

Buscar por razon social:

```json
{
  "queries": [
    {
      "searchType": "razon_social",
      "term": "PRUEBA"
    }
  ],
  "maxPagesPerQuery": 2,
  "maxResultsPerQuery": 6,
  "pageSize": 3
}
```

Buscar por matricula mercantil:

```json
{
  "queries": [
    {
      "searchType": "matricula",
      "term": "18108052"
    }
  ]
}
```

### Output

Cada fila puede incluir:

| Campo | Descripcion |
| --- | --- |
| `status` | `success`, `no_results`, `blocked` o `failed`. |
| `nit_full` | NIT con digito verificador cuando la fuente lo entrega. |
| `business_name` | Razon social. |
| `registration_status` | Estado de la matricula. |
| `organization_type` | Tipo de organizacion juridica. |
| `company_type` | Tipo de sociedad. |
| `chamber` | Camara de comercio. |
| `registration_number` | Matricula mercantil. |
| `primary_activity_code` | Codigo CIIU principal. |
| `renewal_date` | Fecha de renovacion cuando existe. |
| `source_url` | URL exacta de la consulta a la fuente. |
| `error_message` | Motivo cuando la consulta no termina como resultado exitoso. |

Si una consulta valida no tiene resultados, el Actor guarda una fila con `status: no_results` para que el dataset sea auditable.

### SEO keywords

NIT Colombia API, buscar empresa por NIT Colombia, RUES API, RUES scraper, consulta NIT Colombia, razon social Colombia, matricula mercantil Colombia, Colombia company registry API, Colombia business lookup, bulk NIT lookup Colombia.

# Actor input Schema

## `queries` (type: `array`):

Lista de consultas. Cada item puede buscar por NIT, razon social o matricula mercantil.

## `maxPagesPerQuery` (type: `integer`):

Cantidad maxima de paginas de datos abiertos por consulta.

## `maxResultsPerQuery` (type: `integer`):

Limite de resultados cobrados por consulta.

## `pageSize` (type: `integer`):

Cantidad de registros solicitados por pagina a la API fuente.

## `validateCheckDigit` (type: `boolean`):

Cuando el NIT incluye digito verificador, valida que sea correcto antes de consultar.

## `timeoutSecs` (type: `integer`):

Segundos maximos para esperar cada respuesta.

## `retries` (type: `integer`):

Cantidad de reintentos por pagina ante errores temporales.

## `allowPartialResults` (type: `boolean`):

Si una consulta falla o queda bloqueada, guarda esa fila y continua.

## Actor input object example

```json
{
  "queries": [
    {
      "searchType": "nit",
      "term": "900654922-7"
    }
  ],
  "maxPagesPerQuery": 1,
  "maxResultsPerQuery": 10,
  "pageSize": 10,
  "validateCheckDigit": true,
  "timeoutSecs": 20,
  "retries": 2,
  "allowPartialResults": true
}
```

# Actor output Schema

## `results` (type: `string`):

Filas de empresas y estados de consulta.

## `summary` (type: `string`):

Resumen de consultas, resultados y eventos cobrados.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("pmodinger/nit-colombia").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pmodinger/nit-colombia").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call pmodinger/nit-colombia --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pmodinger/nit-colombia",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NIT Colombia RUES API",
        "description": "Consulta NIT Colombia, razon social o matricula mercantil en datos abiertos RUES y entrega empresas estructuradas para validacion, CRM, BI y automatizacion.",
        "version": "0.1",
        "x-build-id": "Tyh5ZPcYhDcBkvhWi"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pmodinger~nit-colombia/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pmodinger-nit-colombia",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/pmodinger~nit-colombia/runs": {
            "post": {
                "operationId": "runs-sync-pmodinger-nit-colombia",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/pmodinger~nit-colombia/run-sync": {
            "post": {
                "operationId": "run-sync-pmodinger-nit-colombia",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Consultas",
                        "minItems": 1,
                        "type": "array",
                        "description": "Lista de consultas. Cada item puede buscar por NIT, razon social o matricula mercantil.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "searchType": {
                                    "title": "Tipo de busqueda",
                                    "type": "string",
                                    "description": "Selecciona el tipo de dato de entrada.",
                                    "enum": [
                                        "nit",
                                        "razon_social",
                                        "matricula"
                                    ],
                                    "enumTitles": [
                                        "NIT",
                                        "Razon social",
                                        "Matricula mercantil"
                                    ],
                                    "default": "nit"
                                },
                                "term": {
                                    "title": "Termino",
                                    "type": "string",
                                    "description": "NIT, razon social o matricula mercantil a buscar.",
                                    "default": "900654922-7"
                                }
                            },
                            "required": [
                                "searchType",
                                "term"
                            ],
                            "additionalProperties": false
                        },
                        "default": [
                            {
                                "searchType": "nit",
                                "term": "900654922-7"
                            }
                        ]
                    },
                    "maxPagesPerQuery": {
                        "title": "Maximo de paginas por consulta",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Cantidad maxima de paginas de datos abiertos por consulta.",
                        "default": 1
                    },
                    "maxResultsPerQuery": {
                        "title": "Maximo de resultados por consulta",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Limite de resultados cobrados por consulta.",
                        "default": 10
                    },
                    "pageSize": {
                        "title": "Tamano de pagina",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Cantidad de registros solicitados por pagina a la API fuente.",
                        "default": 10
                    },
                    "validateCheckDigit": {
                        "title": "Validar digito verificador",
                        "type": "boolean",
                        "description": "Cuando el NIT incluye digito verificador, valida que sea correcto antes de consultar.",
                        "default": true
                    },
                    "timeoutSecs": {
                        "title": "Timeout por pagina",
                        "minimum": 5,
                        "maximum": 60,
                        "type": "integer",
                        "description": "Segundos maximos para esperar cada respuesta.",
                        "default": 20
                    },
                    "retries": {
                        "title": "Reintentos",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Cantidad de reintentos por pagina ante errores temporales.",
                        "default": 2
                    },
                    "allowPartialResults": {
                        "title": "Permitir resultados parciales",
                        "type": "boolean",
                        "description": "Si una consulta falla o queda bloqueada, guarda esa fila y continua.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
