# COMPRASAL Scraper: El Salvador Public Tenders (`kareninatech/central-america-tenders-scraper`) Actor

Scrape Central America public tenders, starting with El Salvador's official COMPRASAL portal (licitaciones and adjudicaciones). Type El Salvador and get deadlines, ending-soon flags, award amounts, supplier stats, a TENDER_REPORT, and monitor mode. Export JSON, CSV or Excel.

- **URL**: https://apify.com/kareninatech/central-america-tenders-scraper.md
- **Developed by:** [Karen Gisela Gallegos Aguilar](https://apify.com/kareninatech) (community)
- **Categories:** Automation, Lead generation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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

## COMPRASAL Scraper: El Salvador and Central America public tenders

Use this COMPRASAL API alternative to scrape El Salvador public tenders and awards (licitaciones y adjudicaciones) and export the data as JSON, CSV or Excel.

**Fast and cheap: no browser.** This Actor reads official public JSON APIs directly over HTTP and runs on only 512 MB of memory, so a default run of 40 open El Salvador tenders finishes in a few seconds and platform costs stay very low.

Scrape public procurement from Central America, starting with [El Salvador's official COMPRASAL portal](https://www.comprasal.gob.sv). Type a country such as El Salvador, choose open tenders or awards, and get structured data with analytics that other LATAM tender scrapers do not bundle for this region: **days until the bid deadline**, an **ending-soon flag**, **awarded amounts in USD**, **supplier win stats**, a **TENDER_REPORT** by institution, category and month, and **monitor mode** for new, changed (deadline, status or amendment) and removed tenders — ideal for a daily alert.

This version covers **El Salvador (COMPRASAL)** fully: every open tender in one official list, plus paginated awards. Panama, Honduras and the rest of Central America are not included yet (see Limitations).

No login is used. Only public APIs are read. Personal names of company shareholders are not stored.

### What you get

Each dataset row is one open tender or one award.

#### What's inside the data?

For every row you get:

- **Core details:** `id`, `record_type`, `country`, `country_code`, `source`, `process_id`, `award_id`, `code`, `internal_code`, `title`, `url`
- **Buyer and procedure:** `institution`, `institution_code`, `procedure_type`, `procedure_code`, `category`, `categories`, `category_codes`
- **Dates and status:** `publication_date`, `deadline`, `days_until_deadline`, `hours_until_deadline`, `ending_soon`, `current_stage`, `status`, `status_detail`, `version`, `stages`
- **Money:** `amount`, `currency`, `amount_usd`, `awarded_amount`, `awarded_amount_usd` (open COMPRASAL tenders usually have no amount until they are awarded; El Salvador amounts are in USD)
- **Awards:** `award_winner`, `award_winner_trade_name` (legal and commercial supplier names only; shareholder personal names are not stored)
- **Extras:** `documents`, `contact`, `keyword_matches`, `scraped_at`
- **Monitor fields** (when monitor mode is on): `monitor_status`, `change_summary`, `monitor_first_seen`, `monitor_days_tracked`

A JSON **TENDER_REPORT** is also saved in the default key-value store, with volume by institution, category, procedure type and month, official monthly totals when the portal publishes them, and top suppliers by awarded amount.

### How to use it

The default input (40 open tenders in El Salvador) is enough for a first run.

1. Keep **country** as El Salvador, or type `Central America` for every supported country (El Salvador in this version).
2. Choose **status**: open tenders, awarded, or both.
3. Optionally type a keyword, an institution, a category, a procedure type, or an amount / date range.
4. Run.

**Input Example (open tenders that close soon):**

```json
{
  "country": "El Salvador",
  "status": "open",
  "max_items": 100,
  "ending_soon_days": 3
}
```

**Input Example (awards that mention software or sistemas):**

```json
{
  "country": "El Salvador",
  "status": "awarded",
  "keyword": "software",
  "expand_keywords": true,
  "max_items": 300
}
```

**Input Example (monitor open tenders every day):**

```json
{
  "country": "El Salvador",
  "status": "open",
  "monitor_mode": true,
  "monitor_key": "sv-open-tenders",
  "emit_removed": true,
  "max_items": 1000
}
```

**Output Example (one open tender):**

```json
{
  "id": "sv-142749",
  "record_type": "tender",
  "country": "El Salvador",
  "country_code": "SV",
  "source": "comprasal",
  "process_id": 142749,
  "award_id": null,
  "code": "8452-2026-P0276",
  "internal_code": null,
  "title": "Contratación de servicios de mantenimiento de ejemplo",
  "institution": "Ministerio de Ejemplo",
  "institution_code": "2307",
  "procedure_type": "Comparación de precios",
  "procedure_code": "CP",
  "category": "Servicios n.c.p.",
  "amount": null,
  "currency": "USD",
  "amount_usd": null,
  "award_winner": null,
  "publication_date": "2026-11-09T14:00:00.000Z",
  "deadline": "2026-11-25T14:00:00.000Z",
  "days_until_deadline": 4.0,
  "hours_until_deadline": 96.0,
  "ending_soon": false,
  "current_stage": "Recepción de ofertas",
  "status": "En ejecución",
  "status_detail": "Activo",
  "version": 1,
  "url": "https://www.comprasal.gob.sv/procesos-publicos/142749",
  "scraped_at": "2026-11-21T15:00:00.000Z"
}
```

The first monitor run emits every matching tender as `new`. Later runs only emit tenders that are new, whose deadline, status, amendment version, winner or awarded amount changed, or (if `emit_removed` is on) that disappeared from the search.

### Input reference

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `country` | string | No | `El Salvador` | Type `El Salvador` or `SV`. Type `Central America` or `all` for every supported country (El Salvador only in this version). An omitted value becomes El Salvador. |
| `status` | string | No | `open` | `open`, `awarded` or `all`. |
| `keyword` | string | No | — | Match title, institution, category or code. Separate several terms with a comma. |
| `expand_keywords` | boolean | No | `true` | Also match Spanish synonyms. `software` also finds `sistemas`, `tecnología` and `informático`. |
| `institution` | string | No | — | Keep tenders whose buying institution name or code contains this text, for example `Ministerio de Salud`. |
| `category` | string | No | — | Keep tenders whose activity / category contains this text, for example `software` or `construcción`. |
| `procedure_type` | string | No | — | Keep one contracting method, for example `Licitación competitiva` or `Comparación de precios`. |
| `min_amount` / `max_amount` | number | No | — | Filter by awarded or listed amount. Open COMPRASAL tenders usually have no amount. |
| `published_from` / `published_to` | string | No | — | Publication-date range for open tenders (`YYYY-MM-DD`, for example `2026-01-15`). |
| `deadline_from` / `deadline_to` | string | No | — | Bid-deadline range for open tenders (`YYYY-MM-DD`). |
| `awarded_from` / `awarded_to` | string | No | — | Award-date range for awards (`YYYY-MM-DD`). |
| `max_items` | integer | No | `40` | Maximum dataset rows (`1`–`10000`). |
| `max_pages` | integer | No | `200` | Safety cap on award list pages (up to 100 awards per page). |
| `ending_soon_days` | integer | No | `3` | Window for the ending-soon flag, in days (`1`–`90`). |
| `fetch_details` | boolean | No | `false` | Also call the official detail endpoint for the internal code and exact publication time. |
| `monitor_mode` | boolean | No | `false` | Remember this search and, on later runs, only emit new, changed or removed tenders. |
| `monitor_key` | string | No | — | Optional name for the monitor memory, for example `sv-open-tenders`. |
| `emit_removed` | boolean | No | `false` | In monitor mode, also emit a row when a previously seen tender disappears from this search. |
| `proxyConfiguration` | object | No | — | Optional. Not needed for COMPRASAL. |

### Output fields

| Field | Description |
|-------|-------------|
| `id` | Stable row id, including the country code and process or award id. |
| `record_type` | `tender` for an open process, or `award` for an awarded contract. |
| `title` | Process title. |
| `institution` | Buying institution. |
| `procedure_type` | Contracting method, for example Comparación de precios. |
| `code` | Official process code. |
| `deadline` | Bid reception deadline, when published. |
| `days_until_deadline` | Days remaining until the bid deadline. |
| `ending_soon` | True when the deadline falls within the ending-soon window. |
| `amount` / `amount_usd` | Listed or awarded amount. Open tenders usually have no amount. |
| `award_winner` | Legal name of the awarded supplier (companies only). |
| `status` | Public status, for example En ejecución. |
| `url` | Public process page on COMPRASAL. |
| `monitor_status` | In monitor mode: `new`, `changed`, `unchanged` or `removed`. |

The dataset also includes the other fields listed in [What's inside the data?](#whats-inside-the-data).

### Speed and cost

No browser and no proxy are used. The Actor reads official public JSON over plain HTTP on 512 MB of memory. A default run (40 open El Salvador tenders) is a single API call and finishes in a few seconds. An awards run is slower because the official list is paginated (about 100 awards per page). You pay per result, plus a tiny fee per run start.

### Limitations

- **v1 covers El Salvador (COMPRASAL) only.** PanamaCompra is reachable but its list API requires authentication. HonduCompras has an expired TLS certificate, and its open-contracting API did not connect from a datacenter. Guatecompras is blocked by Cloudflare. Costa Rica's SICOP open-data host did not connect. Those countries will be added only when a reliable no-browser public source is available.
- **Open COMPRASAL tenders do not include a budget or amount** in the public list or the public detail. Amounts appear on awards.
- **Document files** are not always exposed by the public API. Each row includes the official process page as a link. Complementary files that need a supplier login are not fetched.
- **Contact details** are not published on the public lists, so `contact` is usually empty. The Actor does not guess missing contacts and does not store personal names of shareholders or beneficiaries.
- Type `Central America` or `all` if you want every supported country. Leaving `country` blank still becomes El Salvador, because Apify merges the input schema default.

### Legal

Data comes from the official public COMPRASAL APIs of the Dirección Nacional de Compras Públicas of El Salvador. Use the data in line with the portal's terms and applicable law. This is not legal advice and not a substitute for reading the official process documents.

### FAQ

**Which countries are supported?** This version starts with El Salvador's official COMPRASAL portal (licitaciones and adjudicaciones). The Actor is built so more Central America portals can be added later.

**Do I need to code?** No. Choose El Salvador, set status or a keyword, and run. Export JSON, CSV or Excel, or call the Actor via the Apify API.

**What is the TENDER_REPORT?** A summary of the run: deadlines, ending-soon tenders, awards, and supplier stats, so you can scan the market without opening every row.

**What is monitor mode?** Schedule the Actor and get only new or closing tenders since the last run, instead of the full list every day.

**Is this an official government tool?** No. It reads public procurement pages and APIs. Follow COMPRASAL terms and local procurement rules when you reuse the data.

### Related Actors

More data extractors by [kareninatech](https://apify.com/kareninatech):

- [Doctoralia Scraper — doctors in LatAm and Spain](https://apify.com/kareninatech/doctoralia-scraper)
- [OCC Mundial Jobs Scraper — Mexico jobs and salaries](https://apify.com/kareninatech/occ-mundial-jobs-scraper)
- [elempleo Scraper — Colombia jobs and salaries](https://apify.com/kareninatech/elempleo-scraper)
- [Falabella Chile Scraper — prices and CMR deals](https://apify.com/kareninatech/falabella-scraper)

### Changelog

- **0.1.2** — Keyword matches use word boundaries (so short synonyms such as *tic* do not match inside *artículos*). Award rows now include the contracting method from the official catalogue.
- **0.1** — First release: El Salvador COMPRASAL open tenders and awards, simple country / status / keyword input, deadline analytics, TENDER_REPORT, supplier stats and monitor mode.

# Actor input Schema

## `country` (type: `string`):

Type El Salvador (or SV). Type Central America or all for every supported country — in this version that is still El Salvador only. Do not leave this empty if you want a wider search: an omitted value is filled with the default, El Salvador, because the input schema default is merged when the field is left out. Panama, Honduras, Guatemala, Costa Rica and Nicaragua are not available yet.

## `status` (type: `string`):

Open tenders currently receiving bids, already awarded processes, or both.

## `keyword` (type: `string`):

Optional words to match in the title, institution, category or code. Separate several terms with a comma. With expand_keywords on, a word such as software also finds sistemas, tecnología and informático.

## `expand_keywords` (type: `boolean`):

When a keyword is set, also match common Spanish synonyms (for example software → sistemas, tecnología, informático).

## `institution` (type: `string`):

Optional. Keep tenders whose buying institution name or code contains this text, for example Ministerio de Salud or 2307.

## `category` (type: `string`):

Optional. Keep tenders whose activity / category name or code contains this text, for example software, construcción or 96092.

## `procedure_type` (type: `string`):

Optional. Keep one contracting method, for example Licitación competitiva, Comparación de precios, Subasta Inversa or CD.

## `min_amount` (type: `number`):

Minimum awarded or listed amount. Open COMPRASAL tenders usually have no amount until they are awarded, so this filter mainly applies to awards.

## `max_amount` (type: `number`):

Maximum awarded or listed amount. Same note as min amount: open tenders often have no figure.

## `published_from` (type: `string`):

Keep open tenders published on or after this date, for example 2026-01-15.

## `published_to` (type: `string`):

Keep open tenders published on or before this date, for example 2026-11-30.

## `deadline_from` (type: `string`):

Keep open tenders whose bid deadline is on or after this date, for example 2026-11-21.

## `deadline_to` (type: `string`):

Keep open tenders whose bid deadline is on or before this date, for example 2026-12-31.

## `awarded_from` (type: `string`):

Keep awards decided on or after this date, for example 2026-01-01.

## `awarded_to` (type: `string`):

Keep awards decided on or before this date, for example 2026-11-30.

## `max_items` (type: `integer`):

Maximum number of dataset rows to save (default 40). Use a higher number to collect every open tender (there are typically a few hundred) or several hundred awards.

## `max_pages` (type: `integer`):

Safety cap on award list pages. Each page has up to 100 awards. Leave empty to use the default (200).

## `ending_soon_days` (type: `integer`):

Flag open tenders whose bid deadline falls within this many days (default 3).

## `fetch_details` (type: `boolean`):

Call the official detail endpoint for each process to fill the internal code and the exact publication timestamp. Off by default because the public lists already include the deadline, institution and award data. Open tenders still have no budget on the detail page.

## `monitor_mode` (type: `boolean`):

Remember this search and, on later runs, only emit tenders that are new, whose deadline, status, amendment version, winner or awarded amount changed, or (if emit_removed is on) that disappeared. Ideal for a daily alert schedule.

## `monitor_key` (type: `string`):

Optional name for the memory used by monitor mode, for example sv-open-software. Use a different key for each search you want to track separately.

## `emit_removed` (type: `boolean`):

In monitor mode, also emit a row when a previously seen tender is no longer in this search.

## `proxyConfiguration` (type: `object`):

Optional. Not needed for COMPRASAL: the official public JSON API is open and does not require a browser or a proxy.

## Actor input object example

```json
{
  "country": "El Salvador",
  "status": "open",
  "expand_keywords": true,
  "max_items": 40,
  "ending_soon_days": 3,
  "fetch_details": false,
  "monitor_mode": false,
  "emit_removed": false
}
```

# Actor output Schema

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

Table view of scraped COMPRASAL tenders and awards using the dataset 'overview' view.

## `awards` (type: `string`):

Table view of awarded processes using the dataset 'awards' view (winner, amount and award date).

## `monitor` (type: `string`):

Table view of new, changed and removed tenders using the dataset 'monitor' view.

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

All scraped COMPRASAL tenders and awards from the default dataset without view transformation.

## `tenderReport` (type: `string`):

JSON tender report in the key-value store: volume by institution, category and month, plus top suppliers.

# 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 = {
    "country": "El Salvador",
    "status": "open",
    "expand_keywords": true,
    "max_items": 40,
    "ending_soon_days": 3,
    "fetch_details": false,
    "monitor_mode": false,
    "emit_removed": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("kareninatech/central-america-tenders-scraper").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 = {
    "country": "El Salvador",
    "status": "open",
    "expand_keywords": True,
    "max_items": 40,
    "ending_soon_days": 3,
    "fetch_details": False,
    "monitor_mode": False,
    "emit_removed": False,
}

# Run the Actor and wait for it to finish
run = client.actor("kareninatech/central-america-tenders-scraper").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 '{
  "country": "El Salvador",
  "status": "open",
  "expand_keywords": true,
  "max_items": 40,
  "ending_soon_days": 3,
  "fetch_details": false,
  "monitor_mode": false,
  "emit_removed": false
}' |
apify call kareninatech/central-america-tenders-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kareninatech/central-america-tenders-scraper"
        }
    }
}
```

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/J8ffYsUYCX7vUEaTa/builds/iJf4ERfsfEGBunjqs/openapi.json
