# SECOP II Monitor de Licitaciones. (`crx_zx2/secop-ii-mo`) Actor

Encuentra convocatorias abiertas de SECOP II en Colombia por palabra clave y departamento. Consulta fechas de cierre en hora de Bogotá, presupuesto base y enlaces oficiales. Repite la búsqueda con el mismo perfil para detectar cambios de plazo y nuevas convocatorias dentro de tus resultados.

- **URL**: https://apify.com/crx_zx2/secop-ii-mo.md
- **Developed by:** [Carlos Martinez](https://apify.com/crx_zx2) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 convocatoria exportadas

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

## SECOP II Monitor de Licitaciones

Consulta convocatorias de Colombia en [Datos Abiertos](https://www.datos.gov.co/Estad-sticas-Nacionales/SECOP-II-Procesos-de-Contrataci-n/p6dx-8zbt). Selecciona procesos publicados, abiertos, en fase de presentación de oferta, con fecha futura de recepción de respuestas. Las fechas de salida se expresan en hora de Bogotá. Confirma el cierre y los requisitos contra el enlace oficial antes de presentar una oferta.

### Primera prueba

Pega en Input → JSON:

```json
{"maxResultados":5,"soloNovedades":false,"perfil":"prueba"}
```

El dataset contiene una fila por convocatoria. Puedes exportarlo a CSV o Excel desde Apify. En Storage → Key-value store → RESUMEN aparecen los totales, incluso cuando no hay filas para exportar. Empieza sin filtros y luego prueba con tu rubro y departamento.

### Seguimiento

- `linea_base` indica la primera observación del perfil.
- `nuevo_en_monitoreo` indica que un proceso entra al conjunto observado; puede haberse publicado antes.
- `cambio_de_cierre` incluye la fecha anterior y la actual.
- `cierre_proximo` se emite cuando un proceso observado entra al período de aviso.
- `sin_cambios` se oculta con Solo novedades. `vence_pronto` describe la cercanía actual en cualquier fila.

El historial considera los resultados de la misma búsqueda observados en los últimos 30 días. Conserva el perfil, filtros y límite entre corridas. Programa corridas secuenciales por perfil para evitar que dos corridas escriban el mismo historial a la vez. El límite selecciona los vencimientos más cercanos, por lo que el seguimiento no cubre procesos fuera de la muestra o que dejen de aparecer.

### Instalación en el proyecto existente

Extrae el ZIP. Copia las carpetas `.actor` y `my_actor`, y el archivo `README.md`, dentro de `secop-ii-mo`. Combina las carpetas y reemplaza los archivos coincidentes. Conserva el Dockerfile y las dependencias de tu plantilla. Añade `tzdata` en una línea de `requirements.txt` para que Windows pueda usar la zona horaria de Bogotá.

Desde la carpeta `secop-ii-mo` ejecuta `apify run` y después `apify push`. Prueba el formulario en Apify Console. Deja el Actor en privado mientras contrastas los datos y compruebas dos corridas del mismo perfil. Para publicar, completa la ficha y la muestra de salida en Publishing. Si decides cobrar por convocatoria exportada, configura el evento de filas del dataset y prueba el cobro en Apify.

# Actor input Schema

## `palabraClave` (type: `string`):

Ejemplo: cableado estructurado. Se buscan todos los términos en el título o la descripción.

## `departamento` (type: `string`):

Escribe el nombre tal como lo publica SECOP II, por ejemplo Antioquia.

## `maxResultados` (type: `integer`):

Devuelve primero las convocatorias con el cierre más próximo.

## `diasCierreProximo` (type: `integer`):

Número de días para marcar un cierre como próximo.

## `soloNovedades` (type: `boolean`):

Oculta los registros sin cambios. En la primera corrida muestra la línea base.

## `perfil` (type: `string`):

Usa el mismo perfil para comparar corridas con los mismos filtros.

## Actor input object example

```json
{
  "maxResultados": 30,
  "diasCierreProximo": 3,
  "soloNovedades": false,
  "perfil": "principal"
}
```

# Actor output Schema

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

// Run the Actor and wait for it to finish
const run = await client.actor("crx_zx2/secop-ii-mo").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("crx_zx2/secop-ii-mo").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 '{}' |
apify call crx_zx2/secop-ii-mo --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crx_zx2/secop-ii-mo"
        }
    }
}
```

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/ttwFZtXb4eup4ucTD/builds/fo4P27Xa5Sdxxnb25/openapi.json
