Public procurementChileBring your free keyBeta

Tenders and purchase orders (Mercado Público)

Search Chilean public tenders, purchase orders and Compra Ágil by code, date, status, buyer, supplier, region or keyword, as normalized JSON.

search_chile_public_tenders

Use it over MCP

  1. Connect the server https://mcp.betterllama.com/mcp in your client (setup per client).
  2. Ask your agent, for example:
    • «Which cleaning-service tenders are open today in Biobío?»
    • «Show me the details of tender 1000-27-LP26»
  3. Or call the tool search_chile_public_tenders with these arguments:
arguments
{
  "source": "licitaciones",
  "tenderStatus": "activas",
  "maxItems": 5,
  "fetchDetails": false
}

You need your own free key for this tool. Yes. ChileCompra's terms say the ticket is personal, so you must use your own. It is free, requested with Clave Única at chilecompra.cl/api, and sent in the X-MercadoPublico-Ticket header (or the ticket argument if your client cannot set headers). Better Llama does not store or log it, and the 10,000 requests per day per ticket limit applies.

Headers: X-MercadoPublico-Ticket. Example for Cursor:

mcp.json
{
  "mcpServers": {
    "better-llama": {
      "url": "https://mcp.betterllama.com/mcp",
      "headers": {
        "X-MercadoPublico-Ticket": "<your key>"
      }
    }
  }
}

Beta: free and with no sign-up while we test the service.

Direct HTTP call (JSON-RPC)

Without an MCP client, POST to the same server:

curl
curl -s https://mcp.betterllama.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "X-MercadoPublico-Ticket: $MERCADOPUBLICO_TICKET" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "search_chile_public_tenders", "arguments": {"source": "licitaciones", "tenderStatus": "activas", "maxItems": 5, "fetchDetails": false}}}'
python
import json, os, requests

# Call a Better Llama MCP tool over HTTP (JSON-RPC)
URL = "https://mcp.betterllama.com/mcp"
HEADERS = {"Accept": "application/json, text/event-stream",
           "X-MercadoPublico-Ticket": os.environ["MERCADOPUBLICO_TICKET"]}

def call(tool, arguments):
    body = {"jsonrpc": "2.0", "id": 1, "method": "tools/call",
            "params": {"name": tool, "arguments": arguments}}
    r = requests.post(URL, json=body, headers=HEADERS, timeout=120)
    r.raise_for_status()
    result = r.json()["result"]
    data = json.loads(result["content"][0]["text"])
    if result.get("isError"):
        raise RuntimeError(data["error"])
    return data

data = call("search_chile_public_tenders", {"source": "licitaciones", "tenderStatus": "activas", "maxItems": 5, "fetchDetails": false})
for row in data["results"]:
    print(row)
print(data["attribution"])

The answer text is JSON with results, count, warnings, attribution and source.

Example response

Real results returned by the source (2026-11-09), shortened:

json
{
  "results": [
    {
      "source": "licitacion",
      "code": "1001-17-LE26",
      "name": "ESTABILIZADOR DE SUELO TIPO QUIMICO",
      "description": "El MOP Dirección Regional de Vialidad solicita ofertas para la adquisición de Estabilizador de suelo tipo químico a base de aditivo líqui…",
      "statusEs": "Publicada",
      "statusEn": "Published",
      "type": "LE",
      "buyerName": "MINISTERIO DE OBRAS PUBLICAS DIREC CION GRAL DE OO PP DCYF",
      "buyerRegion": "Región de la Araucanía",
      "publishedAt": "2026-11-02T18:12:34.587Z",
      "closesAt": "2026-11-12T18:00:00.000Z",
      "estimatedAmount": 35000000,
      "currency": "CLP",
      "itemsCount": 1,
      "officialUrl": "https://www.mercadopublico.cl/Procurement/Modules/RFB/DetailsAcquisition.aspx?idlicitacion=1001-17-LE26",
      "retrievedAt": "2026-11-09T20:41:37.775Z"
    }
  ],
  "attribution": "Fuente: Dirección ChileCompra (API Mercado Público)."
}

Parameters

ArgumentDescriptionType
ticketMercado Público API ticket — Your personal, free key from the provider (https://www.chilecompra.cl/api/). You can also send it in an HTTP header (see the tool page). It is used only for that request; it is never stored or logged.string
sourceData source — licitaciones = tenders (API v1); ordenes_compra = purchase orders (API v1); compra_agil = Compra Ágil (API v2, BETA — the official API is in beta and has not yet been validated with real data; it may fail with a 504).
Values: licitaciones, ordenes_compra, compra_agil; Default: "licitaciones"
string
codesSpecific codes — Optional. If given, the record for each code is fetched and the other filters are ignored. E.g. 1509-5-L114 (tender), 1057532-156-AG26 (purchase order), 1057539-228-COT26 (Compra Ágil).array<string>
dateFromFrom date — YYYY-MM-DD, calendar day in Chile. Default: today. Tenders/purchase orders: one query per day; the API returns the records associated with that date by its own criteria (in real tests it includes tenders published, closed and awarded that day, not only those published). Compra Ágil: publication date. Max. 31 days per call.string
dateToTo date — YYYY-MM-DD, inclusive. Defaults to the same value as 'From' (or today).string
tenderStatusTender status — Only for 'licitaciones'. 'activas' = all published today (ignores dates if you don't give dates).
Values: activas, publicada, cerrada, desierta, adjudicada, revocada, suspendida, todos
string
purchaseOrderStatusPurchase order status — Only for 'ordenes_compra'. Values exactly as published in the official documentation.
Values: todos, enviadaproveedor, aceptada, cancelada, recepcionconforme, pendienterecepcion, recepcionaceptadacialmente, recepecionconformeincompleta
string
buyerCodeBuyer code — Tenders/purchase orders: numeric CodigoOrganismo (e.g. 6945). Combined with the date.string
supplierCodeSupplier code — Tenders/purchase orders: numeric Mercado Público CodigoProveedor (e.g. 17793). It is not the RUT.string
agileStatusesCompra Ágil statuses — [BETA] Only for 'compra_agil'. Empty = all.
Values: publicada, cerrada, desierta, cancelada, proveedor_seleccionado, oc_emitida
array<string>
regionsRegions (Compra Ágil) — [BETA] Only for 'compra_agil'. Region of the buying agency. Empty = all of Chile.
Values: 15, 1, 2, 3, 4, 5, 13, 6, 7, 16, 8, 9, 14, 10 …
array<string>
keywordKeywords (Compra Ágil) — [BETA] Only for 'compra_agil': search in name/description (the API's q parameter).string
buyerRutBuyer RUT (Compra Ágil) — [BETA] Only for 'compra_agil'. API v2 does not filter by agency; this filter is applied locally. Combine it with a region to save quota.string
fetchDetailsFetch full details — Listings by date only return basic data (code, name, status, closing date). When enabled, the full record of each result is fetched (agency, amounts, dates). Uses 1 extra request from your quota per result.
Default: true
boolean
maxItemsMaximum number of results to return (1-25). Default 10.
Default: 10; Max: 25
integer

Source and attribution

Fuente: Dirección ChileCompra (API Mercado Público). Source site: www.chilecompra.cl/api.

FAQ

What data does this Mercado Público API return?

Tenders, purchase orders and Compra Ágil (beta) from the official Mercado Público API run by Dirección ChileCompra. All three sources share the same normalized fields, ISO 8601 UTC dates, status in Spanish and English and a link to the official record. Each call queries the API live.

Do I need a ChileCompra ticket?

Yes. ChileCompra's terms say the ticket is personal, so you must use your own. It is free, requested with Clave Única at chilecompra.cl/api, and sent in the X-MercadoPublico-Ticket header (or the ticket argument if your client cannot set headers). Better Llama does not store or log it, and the 10,000 requests per day per ticket limit applies.

Which filters can I use?

Source (licitaciones, ordenes_compra or compra_agil), a date range of up to 31 days in Chile time (today by default), status, buyer or supplier code and exact codes. Compra Ágil also accepts regions and keywords. maxItems caps the delivered results (50 by default).

How much does it cost?

Free during the beta, with no sign-up and a limit of 60 requests per minute per IP. If paid plans come later, we will announce them on betterllama.com first.