# INVIMA Colombia — Sanitary Registry, Devices & Sanctions (`churches2908/colombia-invima-sanitary-registry`) Actor

Search, bulk-verify, and monitor 877,000+ official Colombia INVIMA sanitary registrations (CUM Medicines, Medical Devices, Food Establishments, BPM/HACCP Factories & Executed Sanctions) with expiry countdowns and automatic supplier sanctions cross-checks.

- **URL**: https://apify.com/churches2908/colombia-invima-sanitary-registry.md
- **Developed by:** [Brayan Iglesias](https://apify.com/churches2908) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 invima regulatory records

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

## INVIMA Colombia — Official Sanitary Registry, Medical Devices, Food & Sanctions API

Search, bulk-verify, and monitor **877,000+ official Colombia INVIMA regulatory records** in real time across **9 live government open datasets (`datos.gov.co`)** — with automatic **expiry countdowns**, **renewal risk classification**, and **supplier sanctions cross-checking**.

Built for **pharmacies, IPS/EPS clinics, medical device importers, food manufacturers, e-commerce compliance teams (MercadoLibre, Rappi, Farmatodo), regulatory law firms, n8n/Make workflows, and AI agents (MCP)**.

***

### Covered Official INVIMA Registries (877,600+ Live Records)

| Registry Key | Official INVIMA Dataset (`datos.gov.co`) | Approx. Records |
| :--- | :--- | ---: |
| `medicamentos_vigentes` | Código Único de Medicamentos (CUM) Vigentes (`i7cb-raxc`) | 156,200+ |
| `medicamentos_tramite` | CUM En Trámite de Renovación (`vgr4-gemg`) | 115+ |
| `medicamentos_vencidos` | CUM Vencidos (`vwwf-4ftk`) | 156,800+ |
| `medicamentos_otros` | CUM Otros Estados: Negado, Suspendido, Cancelado (`spzp-dfuc`) | 114,400+ |
| `dispositivos_medicos` | Dispositivos Médicos y Reactivos de Diagnóstico (`y4qt-w6tk`) | 436,400+ |
| `alimentos_establecimientos` | Establecimientos Vigilados de Alimentos con NIT (`uhs6-qp53`) | 9,400+ |
| `alimentos_bpm` | Fábricas de Alimentos Certificadas en BPM (`jdjx-jx6d`) | 95+ |
| `alimentos_haccp` | Fábricas de Alimentos Certificadas en HACCP (`rbvn-xj2w`) | 125+ |
| `sanciones_invima` | Procesos Sancionatorios Ejecutoriados y Multas (`rq4n-pzga`) | 3,860+ |

***

### 4 Built-In Regulatory Workflows

1. **`search`** — Query any combination of the 8 active product/facility registries by product keyword, company/titular, active pharmaceutical ingredient (`principioActivo`), WHO ATC code, NIT, department/city, medical device risk class (`I`, `IIA`, `IIB`, `III`), or sanitary status.
2. **`bulk_verify`** — Paste up to **500 INVIMA sanitary registration codes** (e.g., `INVIMA 2023M-0013598-R2`, `RIV2019-0000062`) or `expedientes`. Automatically searches across all 5 medicine & medical device tables and outputs a clear verdict (`VALID`, `IN_RENEWAL`, `EXPIRED`, `REVOKED_OR_RESTRICTED`, or `NOT_FOUND`).
3. **`expiring_monitor`** — Schedule daily or weekly alerts for active medical device registrations and HACCP food certifications expiring within the next `N` days (`CRITICAL_30D`, `WARNING_90D`, `UPCOMING_180D`).
4. **`sanctions_feed`** — Monitor finalized INVIMA fines (`MULTA`, `CIERRE`, `DECOMISO`) filtered by quarter, company name, NIT, or product category.

#### Automatic Supplier Sanctions Cross-Check (`checkTitularSanctions: true`)

For every medicine, medical device, or food establishment returned, this Actor automatically cross-checks the holder/company against INVIMA's official executed sanctions database (`rq4n-pzga`) and appends `hasInvimaSanctions`, `sanctionsCount`, `latestSanctionDate`, and `latestSanctionSummary`.

***

### Example Inputs

#### 1. Bulk Verify a Pharmacy / Marketplace Catalog

```json
{
  "mode": "bulk_verify",
  "registrationNumbers": [
    "INVIMA 2023M-0013598-R2",
    "RIV2019-0000062",
    "INVIMA 2011M-0000632-R1"
  ],
  "checkTitularSanctions": true
}
```

#### 2. Monitor Medical Devices Expiring in the Next 90 Days

```json
{
  "mode": "expiring_monitor",
  "expiringWithinDays": 90,
  "maxResults": 100,
  "checkTitularSanctions": true
}
```

#### 3. Search Executed 2026 INVIMA Fines

```json
{
  "mode": "sanctions_feed",
  "sanctionType": "MULTA",
  "quarter": "2026",
  "maxResults": 50
}
```

***

### Clean Normalized Output

All government column typos (`prodcuto`, `prodcutoselaborados`, `linea_subcateggoria_de`, `identificaci_n`), mixed date formats (`MM/DD/YYYY` vs ISO timestamps), `"null"` literal strings, and indefinite Decree 334/2022 sentinel dates (`3000-01-01`) are automatically normalized into one clean JSON schema ready for Excel/CSV exports, CRM webhooks, or AI Agents via MCP.

### Pay-per-Event Pricing & Budget Protection

This Actor supports Apify **Pay-per-Event (PPE)** billing (`invima-record` event per returned record) and automatically respects `maxTotalChargeUsd` budget limits.

# Actor input Schema

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

Choose what workflow to run against official Colombia INVIMA open registries.

## `registries` (type: `array`):

Select one or more official INVIMA datasets on datos.gov.co to query.

## `query` (type: `string`):

Search by product name, commercial description, or food line (e.g., 'IBUPROFENO', 'INSULINA', 'CATETER', 'LACTEOS'). Leave empty to retrieve the latest records.

## `titular` (type: `string`):

Filter by registration holder, manufacturer, food company, or sanctioned entity (e.g., 'PFIZER', 'TECNOQUIMICAS', 'BECTON').

## `activeIngredient` (type: `string`):

Filter CUM medication datasets by active pharmaceutical ingredient (e.g., 'ACETAMINOFEN', 'METFORMINA', 'LOSARTAN').

## `atcCode` (type: `string`):

Filter by WHO Anatomical Therapeutic Chemical (ATC) prefix or exact code (e.g., 'M01AE01', 'C09').

## `nit` (type: `string`):

Filter food establishments or INVIMA sanctions by Colombian NIT.

## `department` (type: `string`):

Filter food registries by Colombian department or city (e.g., 'ANTIOQUIA', 'BOGOTA', 'VALLE', 'CUNDINAMARCA').

## `sanitaryStatus` (type: `string`):

Filter medical devices or food establishments by status (e.g., 'Vigente', 'Vencido', 'Suspendido', 'Cancelado', 'FAVORABLE').

## `riskLevel` (type: `string`):

Filter medical devices by INVIMA risk class.

## `registrationNumbers` (type: `array`):

List of up to 500 INVIMA sanitary registration codes to verify (e.g., \['INVIMA 2023M-0013598-R2', 'RIV2019-0000062']).

## `expedientes` (type: `array`):

List of numeric INVIMA expediente IDs to verify (e.g., \['20048021', '20165128']).

## `expiringWithinDays` (type: `integer`):

Return active medical device registrations and HACCP certifications expiring within the next N days (1 to 730).

## `sanctionType` (type: `string`):

Optional filter on sanction type (e.g., 'MULTA', 'AMONESTACION', 'DECOMISO', 'CIERRE').

## `quarter` (type: `string`):

Optional quarter substring filter (e.g., '2026', 'JULIO-SEPTIEMBRE 2026').

## `deduplicateByRegistration` (type: `boolean`):

When enabled, collapses multiple CUM commercial presentations of the same sanitary registration into a single representative record.

## `checkTitularSanctions` (type: `boolean`):

Automatically checks each registration holder/company against INVIMA's official executed sanctions database (rq4n-pzga) and attaches sanctions count & latest fine.

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

Maximum number of records to return across selected registries (1 to 25,000).

## `socrataAppToken` (type: `string`):

Optional datos.gov.co Socrata App Token for very large extractions.

## Actor input object example

```json
{
  "mode": "search",
  "registries": [
    "medicamentos_vigentes",
    "dispositivos_medicos"
  ],
  "riskLevel": "ALL",
  "expiringWithinDays": 90,
  "deduplicateByRegistration": true,
  "checkTitularSanctions": true,
  "maxResults": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

Structured sanitary registrations, medical devices, food facilities, or executed sanctions.

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

Aggregate breakdown by registry, compliance verdict, renewal risk, and sanctions hits.

# 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 = {
    "registries": [
        "medicamentos_vigentes",
        "dispositivos_medicos"
    ],
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("churches2908/colombia-invima-sanitary-registry").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 = {
    "registries": [
        "medicamentos_vigentes",
        "dispositivos_medicos",
    ],
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("churches2908/colombia-invima-sanitary-registry").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 '{
  "registries": [
    "medicamentos_vigentes",
    "dispositivos_medicos"
  ],
  "maxResults": 50
}' |
apify call churches2908/colombia-invima-sanitary-registry --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,churches2908/colombia-invima-sanitary-registry"
        }
    }
}
```

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/65Qsj3fRZ7ds92VCm/builds/NVDQOM4orW8DhKXtU/openapi.json
