# Chile Public Procurement Database — Mercado Público Tenders (`jungle_synthesizer/mercadopublico-chile-public-procurement-scraper`) Actor

Chile's national procurement source, ChileCompra Mercado Público — tenders, awards, bidder counts and purchase orders in one feed. Includes winning supplier RUT, buyer unit RUT, awarded amounts, and convenio-marco purchase orders that never appear as a tender.

- **URL**: https://apify.com/jungle\_synthesizer/mercadopublico-chile-public-procurement-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Lead generation, Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Chile Public Procurement Data — Mercado Público Scraper

Scrape public procurement records from [Mercado Público](https://www.mercadopublico.cl), Chile's national ChileCompra purchasing platform. Returns tenders with buyer details and award outcomes, plus the purchase orders — including convenio-marco catalog orders — that never show up as a tender at all.

***

### Mercado Público Scraper Features

- Extracts open tenders across every status — published, closed, awarded, void, revoked
- Follows through to the award: winning supplier, awarded amount, and bidder count on top of the base listing
- Returns purchase orders separately, the channel a large share of Chilean state spend moves through and most tender-only tools never touch
- Flags which purchase orders came off a convenio-marco framework catalog rather than a one-off award
- Includes buyer and supplier RUT (Chilean tax id) on every record, so output joins cleanly against company registries
- Classifies line items by UNSPSC product code, not just a free-text title
- Filters by date range — a single day or a multi-year backfill run the same code path

***

### Who Uses Mercado Público Data?

- **Sales and BD teams** — find every government unit buying in a product category before a competitor does
- **Market researchers** — track award amounts and winning suppliers across a sector, or benchmark against Chile's broader public spend
- **Compliance and audit teams** — monitor a specific buyer unit or supplier's contract history over time
- **Suppliers and bidders** — compute a win rate against named competitors instead of guessing from headline totals
- **Data teams building LATAM company graphs** — the RUT fields join directly against other Chilean company data

***

### How the Mercado Público Scraper Works

1. Pick a date range and which record types you want — tenders, purchase orders, or both.
2. The scraper pulls the day's full listing, then fetches each record's detail — buyer info, line items, and (for tenders) the award outcome.
3. Records come back as clean, flat JSON: one row per tender or purchase order, with consistent field names across both.
4. A large date range keeps going past `maxItems`; resume it in a later run instead of paying for the whole thing again.

***

### Input

```json
{
  "ticket": "your-mercadopublico-api-ticket",
  "recordTypes": ["tenders", "purchase_orders"],
  "dateFrom": "2026-09-01",
  "dateTo": "2026-09-07",
  "maxItems": 500
}
```

| Field         | Type    | Default                          | Description |
|---------------|---------|----------------------------------|-----------------------------------------------------------------------------------------------------|
| `ticket`      | String  | shared public demo ticket        | Your free Mercado Público API ticket (recommended). Register at [mercadopublico.cl](https://www.mercadopublico.cl) (Empresas > API) — issued instantly, no cost. Leave empty to use ChileCompra's shared public demo ticket. |
| `recordTypes` | Array   | `["tenders", "purchase_orders"]` | Which record families to pull: `tenders` (licitaciones), `purchase_orders` (órdenes de compra), or both. |
| `dateFrom`    | String  | yesterday                        | First day to pull, inclusive (`YYYY-MM-DD`). Mercado Público publishes per calendar day. |
| `dateTo`      | String  | same as `dateFrom`               | Last day to pull, inclusive (`YYYY-MM-DD`). Widening the range costs one extra listing call per day. |
| `maxItems`    | Integer | 20                               | Maximum combined records to save. Each record costs one detail call on top of the listing. |

#### Resuming a large crawl

Every run emits a `resumeCursor` in its Output. If a large crawl stops before it finishes — because it hit `maxItems`, your spend cap (`maxTotalChargeUsd`), or was aborted — start a new run with **the same input** plus that `resumeCursor` to continue from where it left off. The crawl resumes from the queued work the previous run didn't reach.

- You are **not re-charged** for records the earlier run already delivered.
- Resume within your account's run-retention window — on the free tier, roughly your 10 most recent runs. Once the source run is pruned, its `resumeCursor` is no longer valid.
- `resumeCursor` is opaque — supply it unmodified.

***

### Mercado Público Scraper Output Fields

```json
{
  "record_type": "tender",
  "tender_code": "1057417-144-LR26",
  "tender_name": "KCS CONVENIO POR SERVICIO DE ASEO INSTITUCIONAL",
  "status": "Cerrada",
  "type_code": "LR",
  "currency": "CLP",
  "estimated_amount": 12927638542,
  "publication_date": "2026-08-26T14:58:26.64",
  "closing_date": "2026-09-25T15:00:00",
  "buyer_org_name": "COMPLEJO ASISTENCIAL DR.VICTOR RIOS RUIZ",
  "buyer_region": "Región del Biobío",
  "buyer_rut": "61.607.301-K",
  "items": [
    { "codigo_onu": 76111501, "categoria": "Servicios de limpieza de edificios y oficinas", "nombre": "Servicios de limpieza de edificios", "cantidad": 1, "unidad": "Global" }
  ],
  "award_supplier_rut": null,
  "award_amount": null,
  "bidder_count": null,
  "purchase_order_amount": null,
  "is_framework_agreement": null,
  "source_url": "https://api.mercadopublico.cl/servicios/v1/publico/licitaciones.json?codigo=1057417-144-LR26"
}
```

| Field                                        | Type            | Description |
|----------------------------------------------|-----------------|--------------------------------------------------------------------------------------------------------|
| `record_type`                                | String          | `tender` or `purchase_order`. |
| `tender_code`                                | String          | National tender id. Present on tender rows, and on a purchase order that traces back to one. |
| `tender_name`                                | String          | Tender title. Tender rows only. |
| `purchase_order_code`                        | String          | Purchase order id. Purchase-order rows only. |
| `description`                                | String          | Free-text description of the tender or purchase order. |
| `status_code` / `status`                     | Number / String | Source status code and its human-readable label. |
| `type_code`                                  | String          | Tender type (L1, LE, LP, LQ, LR...) or purchase-order type (AG, SE, CM, B...). |
| `currency`                                   | String          | Currency the accompanying amount is declared in — never normalized. |
| `estimated_amount`                           | Number          | Tender's declared budget. Tender rows only. |
| `publication_date`                           | String          | ISO timestamp the record was published or sent. |
| `closing_date`                               | String          | Bid-closing timestamp. Tender rows only. |
| `award_date`                                 | String          | Award timestamp. Awarded tender rows only. |
| `buyer_org_code` / `buyer_org_name`          | String / String | The buying ministry, municipality, hospital, or armed-forces unit. |
| `buyer_unit`                                 | String          | Specific purchasing unit within the buyer organism. |
| `buyer_rut`                                  | String          | Buyer unit's Chilean tax id. |
| `buyer_region`                               | String          | Chilean administrative region of the buyer. |
| `buyer_contact_name`                         | String          | Buyer-side contact on the record. |
| `items`                                      | Array           | Line items: UNSPSC code, category, name, description, quantity, unit. |
| `award_supplier_rut` / `award_supplier_name` | String / String | Winning supplier. Populated once at least one line item is awarded. |
| `award_amount`                               | Number          | Sum of awarded line-item amounts. Awarded tender rows only. |
| `award_item_count`                           | Number          | Count of line items with a recorded award. Tender rows only. |
| `bidder_count`                               | Number          | Number of distinct bidders on the award. |
| `purchase_order_amount`                      | Number          | Purchase order total. Purchase-order rows only. |
| `is_framework_agreement`                     | Boolean         | True when the order was issued off a convenio-marco catalog. Purchase-order rows only. |
| `source_url`                                 | String          | The Mercado Público API endpoint this record was read from. |

***

### FAQ

#### How do I scrape Mercado Público tenders and purchase orders?

Give Mercado Público Scraper a date range and it returns tenders, purchase orders, or both. For regular use, register a free API ticket at mercadopublico.cl and paste it into the `ticket` field.

#### Do I need an account or API key for Mercado Público?

No, but your own is recommended. Left empty, the scraper uses ChileCompra's shared public demo ticket, and every caller without a ticket shares its rate limit. Your own ticket costs nothing, is issued instantly through Mercado Público's registration page, and carries its own limit.

#### Can I get award and bidder data, not just open tenders?

Yes. Every tender record carries the award outcome once one exists — winning supplier, awarded amount, and bidder count — which is exactly the part most tender-list tools stop short of.

#### What's the difference between tenders and purchase orders?

Tenders (licitaciones) are the open-bid process. Purchase orders (órdenes de compra) are the actual spend — including convenio-marco catalog purchases that skip the tender process entirely. A tender-only view misses that spend.

#### Can I pull historical data, not just recent tenders?

Yes. Set `dateFrom` and `dateTo` to any range; a run that hits its item cap on a wide range picks back up with `resumeCursor` instead of starting over.

***

### Need More Features?

Need custom fields, filters, or a different target site? [File an issue](https://console.apify.com/actors/issues) or get in touch.

### Why Use Mercado Público Scraper?

- **Complete, not partial** — tenders, awards, bidders, and purchase orders in one feed, where most alternatives stop at the open-tender list.
- **Joinable by design** — buyer and supplier RUT on every record means the output slots straight into a Chilean company graph or registry match, no manual entity resolution.
- **Covers the spend tender-only tools miss** — convenio-marco purchase orders are flagged explicitly, and they're where a large share of Chilean public spend actually happens.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `resumeCursor` (type: `string`):

Leave empty for a fresh crawl. To CONTINUE a previous run where it stopped — without paying again for records you already received — paste the `resumeCursor` value from that run's Output (the run's OUTPUT key). Resume promptly: the previous run's data expires with your account's retention window (free tier: your ~10 most recent runs).

## `ticket` (type: `string`):

Your free Mercado Público API ticket (recommended). Register at https://www.mercadopublico.cl (Empresas > API) — the ticket is a UUID issued instantly and free of charge. The source enforces its rate limit per ticket, not per IP, so your own ticket gives you your own limit. Leave empty to use ChileCompra's shared public demo ticket.

## `recordTypes` (type: `array`):

Which Mercado Público record families to pull. Tenders (licitaciones) cover the open-tender/award lifecycle; Purchase Orders (órdenes de compra) cover convenio-marco and direct-award spend that never appears as a tender.

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

First day to pull, inclusive. Leave blank to pull only the most recent complete day (yesterday) — Mercado Público publishes per calendar day, and today's list is still filling in.

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

Last day to pull, inclusive. Leave blank to pull a single day (dateFrom only, or yesterday if dateFrom is also blank). Widening this range widens coverage linearly — one extra listing call per endpoint per extra day.

## `maxItems` (type: `integer`):

Maximum number of records (tenders + purchase orders combined) to save. Each record costs one detail API call on top of the listing call, which is the dominant request cost — keep this bounded on a wide date range.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "recordTypes": [
    "tenders",
    "purchase_orders"
  ],
  "maxItems": 20
}
```

# Actor output Schema

## `results` (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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "ticket": "",
    "recordTypes": [
        "tenders",
        "purchase_orders"
    ],
    "dateFrom": "",
    "dateTo": "",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/mercadopublico-chile-public-procurement-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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "ticket": "",
    "recordTypes": [
        "tenders",
        "purchase_orders",
    ],
    "dateFrom": "",
    "dateTo": "",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/mercadopublico-chile-public-procurement-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 '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "ticket": "",
  "recordTypes": [
    "tenders",
    "purchase_orders"
  ],
  "dateFrom": "",
  "dateTo": "",
  "maxItems": 20
}' |
apify call jungle_synthesizer/mercadopublico-chile-public-procurement-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/mercadopublico-chile-public-procurement-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/tGJKjiUSrIB5hUssY/builds/lQN7c5hxgW5TkbFUD/openapi.json
