# DNCP Paraguay Technology Leads (`gesuvik/dncp-tech-leads`) Actor

Find and rank open technology procurement opportunities published by Paraguay's DNCP.

- **URL**: https://apify.com/gesuvik/dncp-tech-leads.md
- **Developed by:** [Víctor Jesús Ruíz](https://apify.com/gesuvik) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 technology procurement leads

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

## DNCP Paraguay Technology Leads

Turn Paraguay public procurement notices into a clean stream of auditable technology opportunities.

This Actor queries the official DNCP open-data API, prefilters notices, downloads only relevant tender details, applies deterministic scoring, and delivers one structured dataset item per accepted opportunity.

### Why use it

Raw procurement feeds are broad. This Actor focuses on opportunities involving:

- software and licenses;
- cybersecurity and network equipment;
- cloud, servers, and data centers;
- IT services and digitalization;
- artificial intelligence and databases;
- telecommunications;
- CCTV and video surveillance.

Every result includes the official notice URL, DNCP API URL, scoring signals, UNSPSC codes, buyer, amount, deadline, and source documents. The classifier is deterministic and auditable: an LLM does not decide which rows you pay for.

### Current scope

Version `0.1` is deliberately inexpensive:

- HTTP-only; no browser;
- no proxy;
- no OCR;
- no attachment downloads;
- no LLM cost;
- one sequential DNCP request stream;
- hard input limits for pages and results.

`llmEnrichment` is reserved for a future Hermes gateway release and must remain disabled in v0.1.

### Input

| Field | Default | Description |
| --- | ---: | --- |
| `lookbackDays` | `7` | Search window when `dateFrom` is omitted. |
| `dateFrom` / `dateTo` | current window | Explicit dates in `YYYY-MM-DD`. |
| `onlyOpen` | `true` | Return open DNCP notices only. |
| `keywords` | technology list | Case- and accent-insensitive signals. |
| `unspscPrefixes` | `["43"]` | Technology classification prefixes. |
| `minimumTechScore` | `40` | Minimum accepted score. |
| `maxResults` | `100` | Hard cap on delivered paid rows. |
| `maxPages` | `20` | Hard source pagination cap. |
| `pageSize` | `50` | DNCP search records per page. |

Example:

```json
{
  "lookbackDays": 7,
  "onlyOpen": true,
  "minimumTechScore": 40,
  "maxPages": 2,
  "maxResults": 25,
  "keywords": [
    "software",
    "licencia",
    "ciberseguridad",
    "firewall",
    "inteligencia artificial"
  ]
}
```

### Output

```json
{
  "schemaVersion": "1.0",
  "source": "DNCP Paraguay",
  "sourceLicense": "CC-BY-4.0",
  "ocid": "ocds-03ad3f-493234-1",
  "tenderId": "1f1b6719-ea2a-6972-aa82-3de7bcb442e4",
  "title": "ADQUISICIÓN DE LICENCIAS PARA EL RECTORADO DE LA UNA",
  "statusDetails": "En Convocatoria (Abierta)",
  "buyerName": "Rectorado / Universidad Nacional de Asunción",
  "amount": 37594000,
  "currency": "PYG",
  "tenderEndDate": "2026-10-19T08:00:00-04:00",
  "techScore": 85,
  "techSegments": ["software"],
  "matchedSignals": ["unspsc:43", "keyword:licencia"],
  "opportunityUrl": "https://www.contrataciones.gov.py/licitaciones/convocatoria/...",
  "apiUrl": "https://www.contrataciones.gov.py/datos/api/v3/doc/tender/...",
  "enrichmentStatus": "disabled"
}
```

The `STATS` key-value-store record reports scanned rows, candidates, detail requests, emitted results, source errors, and truncation.

### Pay-Per-Event

The code emits the custom event `basic-lead` exactly once for each accepted row written to the default dataset. Configure this event in Apify Console before Store publication.

Suggested beta price: **$0.01 per delivered lead**. With the default `maxResults=100`, the maximum explicit `basic-lead` charge for one run would be **$1.00**, before Apify synthetic platform events and compute costs. Users can set a lower result cap or platform spending limit.

No event is intentionally emitted for:

- search rows rejected by the prefilter;
- duplicate tender IDs;
- closed notices when `onlyOpen` is enabled;
- details below `minimumTechScore`;
- DNCP detail requests that fail.

Apify may also record synthetic platform events. Store pricing and spending limits remain controlled by Apify's charging manager.

### Scoring

Current deterministic signals:

| Signal | Score |
| --- | ---: |
| Configured UNSPSC prefix | `+45` |
| Configured keyword in title | `+40` |

Scores are capped at 100. `matchedSignals` explains every awarded point. Segments are inferred from the matching keyword and specific UNSPSC family where possible.

### Local development

Requirements:

- Python 3.13;
- `uv`;
- Apify CLI;
- Docker/Colima for container verification.

```bash
uv sync --all-groups
uv run pytest -q --disable-socket --allow-unix-socket
uv run ruff check .
uv run ruff format --check .
uv run mypy src
apify validate-schema
```

Run against DNCP using local Apify storage:

```bash
mkdir -p storage/key_value_stores/default
cp tests/fixtures/input_smoke.json storage/key_value_stores/default/INPUT.json

ACTOR_TEST_PAY_PER_EVENT=true \
DNCP_DELAY_SECONDS=4.2 \
APIFY_LOCAL_STORAGE_DIR="$PWD/storage" \
uv run python -m dncp_tech_leads
```

Build the production image:

```bash
docker build -t dncp-tech-leads:local .
```

### Responsible source usage

The Actor uses the official DNCP API and defaults to a 4.2-second delay between requests in anonymous mode. Keep short date windows and conservative page limits. Do not remove the delay for scheduled or public production runs without authenticated DNCP access and an approved rate policy.

This Actor is a lead-discovery tool, not legal, procurement, or bid advice. Always verify deadlines, requirements, amounts, amendments, and eligibility in the official DNCP notice and documents.

### Roadmap

1. authenticated DNCP client and documented retry policy;
2. item-description and category scoring;
3. optional Hermes LLM summaries after deterministic acceptance;
4. attachment requirement extraction;
5. saved searches and webhook alerts.

### Data source

- Dirección Nacional de Contrataciones Públicas, Paraguay;
- official DNCP API v3;
- open-contracting records exposed by DNCP.

# Actor input Schema

## `dateFrom` (type: `string`):

Start date in YYYY-MM-DD. If omitted, lookbackDays is used.

## `dateTo` (type: `string`):

End date in YYYY-MM-DD. Defaults to the current date.

## `lookbackDays` (type: `integer`):

Date window used when dateFrom is omitted.

## `onlyOpen` (type: `boolean`):

Skip notices whose DNCP status is not open.

## `keywords` (type: `array`):

Case- and accent-insensitive title and item signals.

## `excludedKeywords` (type: `array`):

Reserved for exclusions in future scoring revisions.

## `unspscPrefixes` (type: `array`):

UNSPSC prefixes treated as technology signals.

## `minimumTechScore` (type: `integer`):

Only opportunities at or above this score are delivered.

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

Hard cap on paid dataset rows.

## `maxPages` (type: `integer`):

Safety cap for source pagination.

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

Search records requested per source page.

## `llmEnrichment` (type: `boolean`):

Reserved for the upcoming Hermes gateway integration. Keep disabled in v0.1.

## Actor input object example

```json
{
  "lookbackDays": 7,
  "onlyOpen": true,
  "keywords": [
    "software",
    "sistema informático",
    "desarrollo",
    "licencia",
    "ciberseguridad",
    "seguridad de la información",
    "datacenter",
    "centro de datos",
    "servidor",
    "nube",
    "cloud",
    "base de datos",
    "firewall",
    "switch",
    "red informática",
    "telecomunicaciones",
    "digitalización",
    "inteligencia artificial",
    "soporte técnico informático",
    "circuito cerrado",
    "videovigilancia"
  ],
  "excludedKeywords": [],
  "unspscPrefixes": [
    "43"
  ],
  "minimumTechScore": 40,
  "maxResults": 100,
  "maxPages": 20,
  "pageSize": 50,
  "llmEnrichment": false
}
```

# Actor output Schema

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

Ranked and auditable DNCP technology leads.

## `stats` (type: `string`):

Scanned, filtered, delivered, and error counts.

# 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("gesuvik/dncp-tech-leads").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("gesuvik/dncp-tech-leads").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 gesuvik/dncp-tech-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gesuvik/dncp-tech-leads"
        }
    }
}
```

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/24712YNOoSQZ0iRuk/builds/DRhWml8kXHEr48NhH/openapi.json
