Guide · Peru public procurement

SEACE API: how to query Peru's public procurement tenders as JSON

How to get Peruvian government procurement processes from your code or an AI agent: what SEACE publishes, where OECE's open data comes from, and how to search tenders by text, region, category, method and reference value, with bidders and winning companies, as clean JSON with Better Llama's MCP tool, with no key.

What is SEACE and what open data does it publish?

SEACE (Sistema Electrónico de Contrataciones del Estado) is the platform where Peruvian public bodies publish their purchases: calls for tenders, bidding documents, bids and awards. It is run by OECE (Organismo Especializado para las Contrataciones Públicas Eficientes, formerly OSCE).

OECE publishes those processes as open data in the international OCDS standard (Open Contracting Data Standard) on its Open Contracting portal, under a CC BY 4.0 licence: you may reuse it, commercially too, as long as you credit the source. The Open Contracting Partnership Data Registry collects that publication every month and offers yearly downloads.

Each process includes the buyer and its location, the purpose of the contract, the reference number, the method (public tender, public competition, electronic reverse auction, price comparison…), the category (goods, services or works), the reference value, the dates, the number of bidders and, once awarded, the awarded amount and the winning companies.

Important: this data is updated once a month, 4 to 8 weeks behind. Use it for market, competitor and purchase-history analysis, not to bid on tenders that are open today. For that, use SEACE directly.

Two ways to access SEACE data

1. OECE's OCDS downloads

The OCP Data Registry offers the full OECE publication, or one year at a time, as JSON Lines and CSV. For example, the 2026 file (about 155 MB compressed):

curl · OCP Data Registry
curl -L -o 2026.jsonl.gz "https://data.open-contracting.org/en/publication/135/download?name=2026.jsonl.gz"

The integration is on your side: decompressing and walking thousands of nested OCDS records (tender, buyer, parties, awards), joining each buyer with its region, filtering by date or amount, telling companies apart from natural persons among the winners, and reloading every month. The Open Contracting portal also has a web API, but in our tests from servers outside Peru it answered with a 403 error.

2. Better Llama's SEACE tool (over MCP)

Our Peru public procurement (SEACE) tool, peru_public_procurement_search, already has that data indexed and lets you search it in one call:

  • Text search over the purpose, reference number and buyer, accent-insensitive.
  • Filters by the buyer's region or province, category, procurement method, publication date range and minimum reference value in soles.
  • Flat JSON, newest process first, with ISO dates and numeric amounts in PEN.
  • Only companies (RUC 20) as winners: natural persons are left out.
  • Every response includes the data coverage in warnings, the source date in sourceUpdatedAt and the CC BY 4.0 attribution.

Use it as an MCP tool from Claude, Cursor or other agents, or over HTTP with JSON-RPC from any language.

Step by step: search Peruvian tenders by API

Step 1. Define what you need

All parameters are optional and can be combined. Values are in Spanish, as published by SEACE:

ParameterWhat it does
queryFree text over the purpose, reference number or buyer, for example ambulancia or ESSALUD; all words must appear
regionRegion or province of the buyer, for example Lima, Arequipa or Cusco
categorybienes (goods), servicios (services) or obras (works)
methodProcurement method (partial text), for example Licitación Pública, Subasta Inversa or Comparación de Precios
fromDate / toDatePublication date from and to, as YYYY-MM-DD
minValueMinimum reference value in soles; excludes processes with no published value
maxItemsMaximum results (1 to 100, default 20)

Step 2. Connect the MCP server

Use the MCP https://mcp.betterllama.com/mcp in your client or call it over HTTP with JSON-RPC, as in the examples. This tool needs no key, and no account or sign-up is required during the beta.

Step 3. Call the tool with curl

A JSON-RPC POST returns the result as JSON. This call asks for works by buyers in Cusco with a reference value from PEN 1,000,000:

curl
curl -s https://mcp.betterllama.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "peru_public_procurement_search", "arguments": {"region": "Cusco", "category": "obras", "minValue": 1000000, "maxItems": 3}}}'

The real response is further down, in which fields it returns.

The same in Python: who wins computer purchases

Purchases of computers (goods), with the number of bidders, the awarded amount and the winning company:

python
import json
import requests

URL = "https://mcp.betterllama.com/mcp"
HEADERS = {"Accept": "application/json, text/event-stream"}
arguments = {
    "query": "computadoras",
    "category": "bienes",
    "maxItems": 5
}
body = {"jsonrpc": "2.0", "id": 1, "method": "tools/call",
        "params": {"name": "peru_public_procurement_search", "arguments": arguments}}
resp = requests.post(URL, json=body, headers=HEADERS, timeout=60)
resp.raise_for_status()
data = json.loads(resp.json()["result"]["content"][0]["text"])
for p in data["results"]:
    ganadores = ", ".join(a["name"] for a in p["adjudicatarios"]) or "-"
    print(p["fechaPublicacion"], p["metodo"], p.get("postores", "-"), p.get("montoAdjudicado", "-"), ganadores)
print(data["warnings"][0])

Real output (29 November 2026, 08:24 Chile time):

output
2026-09-28 Licitación Pública Abreviada - - -
2026-09-14 Comparación de Precios - - -
2026-08-26 Comparación de Precios 3 78298 VAYER´S CONTRATISTAS GENERALES E.I.R.L.
2026-07-15 Comparación de Precios - - -
2026-07-10 Licitación Pública Abreviada 46 104980 DICOSATS S.A.C.
Datos publicados entre 2026-01-01 y 2026-10-02 (instantánea mensual; los procesos más recientes aún no están). Para postular a procesos vigentes usa el SEACE.

The same five processes as a table:

PublishedBuyerMethodOutcome
2026-09-28GOBIERNO REGIONAL DE PUNO SEDE CENTRALLicitación Pública AbreviadaNo award in the snapshot
2026-09-14MUNICIPALIDAD PROVINCIAL DE BARRANCAComparación de PreciosNo award in the snapshot
2026-08-26MUNICIPALIDAD PROVINCIAL DE BARRANCAComparación de Precios3 bidders; awarded for PEN 78,298 to VAYER´S CONTRATISTAS GENERALES E.I.R.L.
2026-07-15GOBIERNO REGIONAL DE LORETO - DIRECCIÓN REGIONAL DE EDUCACION DE LORETOComparación de PreciosNo award in the snapshot
2026-07-10GOBIERNO REGIONAL DE ANCASH-SALUD UTES CARAZLicitación Pública Abreviada46 bidders; awarded for PEN 104,980 to DICOSATS S.A.C.

When a process has no award yet in the monthly snapshot, adjudicatarios is empty and there is no montoAdjudicado.

Step 4. Check coverage and cite the source

The first warnings message states the dates covered (in Spanish). In today's query it says the data covers processes published between 2026-01-01 and 2026-10-02, as a monthly snapshot. sourceUpdatedAt gives the date of the OECE publication used (2026-11-01).

If nothing matches, the response says so and suggests fewer words, another region or no date filters. The same happens if you ask for dates after the coverage.

Example: the largest works tendered in the latest month of data

With method set to Licitación Pública, category to obras, minValue to 20000000 and fromDate to 2026-09-01, the tool returned these five processes (real call, 28 November 2026, 14:22 Chile time). The method filter is partial text, so it also matches «Licitación Pública Abreviada»:

PublishedBuyerWorks (summary)MethodReference value
2026-10-02GOBIERNO REGIONAL DE SAN MARTIN - PROYECTO ESPECIAL HUALLAGA CENTRAL Y BAJO MAYOUrban roads in the Tarapotillo neighbourhood (road infrastructure component)Licitación PúblicaS/ 28,231,838.39
2026-10-01GOBIERNO REGIONAL DE JUNIN SEDE CENTRALUpgrade of the Manuel Higa Arakaki support hospital, SatipoLicitación Pública AbreviadaS/ 237,661,143.03
2026-10-01GOBIERNO REGIONAL DE LA LIBERTAD Sede CentralUpgrade of the Jorge Desmaison Seminario technical institute, PacasmayoLicitación PúblicaS/ 38,278,989.16
2026-10-01GOBIERNO REGIONAL DE JUNIN SEDE CENTRALUpgrade and expansion of the Domingo Olavegoya hospital, JaujaLicitación PúblicaS/ 391,130,695.59
2026-09-30GOBIERNO REGIONAL DE PIURA SEDE CENTRALStreets in the Chiclayito settlement, Castilla (Piura)Licitación Pública AbreviadaS/ 20,095,521.91

That is enough to build, in minutes, a radar of works by region, of the suppliers that win most in a sector, or of awarded prices against reference values.

Use the SEACE API from an AI agent (MCP)

Add Better Llama's MCP server to your client (Claude, Cursor, VS Code or any other with remote MCP). One MCP brings peru_public_procurement_search, the BCRP series and the rest of the catalogue, with no sign-up during the beta.

Cursor · mcp.json
{
  "mcpServers": {
    "better-llama": {
      "url": "https://mcp.betterllama.com/mcp"
    }
  }
}
Claude Code
claude mcp add --transport http better-llama https://mcp.betterllama.com/mcp

Setup for Claude, Codex, Gemini CLI, Windsurf, VS Code and other clients: connect your agent.

Ready-to-run Python and Node.js examples, with config files for each client: examples repository on GitHub.

Example scripts for this guide: python/seace_peru.py (Python), node/compras_publicas.mjs (Node.js).

Then ask, for example: “Which hospitals in Peru tendered works above PEN 20 million in September 2026? Give me the buyer, the reference value and cite the source.”

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

Which fields it returns

Each process has ocid (OCDS identifier), fechaPublicacion (published), entidad (buyer), region, nomenclatura (reference number), objeto (purpose), metodo, categoria, valorReferencial and moneda (when published), cierrePropuestas (bid deadline), postores (bidders), montoAdjudicado (awarded amount) and adjudicatarios (RUC and name of each winning company). The response also includes count, warnings, attribution, source, sourceUpdatedAt and retrievedAt.

Real response to the curl call above (29 November 2026, 08:24 Chile time), trimmed to the third of three results, the only one with an award:

json
{
  "tool": "peru_public_procurement_search",
  "count": 3,
  "results": [
    {
      "ocid": "ocds-dgv273-seacev3-1239912",
      "fechaPublicacion": "2026-08-11",
      "entidad": "MUNICIPALIDAD DISTRITAL DE SAN JERONIMO - CUSCO",
      "region": "CUSCO",
      "nomenclatura": "RES-PROC-4-2025-MDSJ/LEY29230-1",
      "objeto": "EJECUCION DE OBRA: MEJORAMIENTO Y AMPLIACION DEL SERVICIO DE AGUA POTABLE Y ALCANTARILLADO EN EL ANEXO PALLPANCAY -COLLPARO Y EL SECTOR KAYRAPAMPA DE LAS COMUNIDADES CAMPESINAS DE SUCSO AUCAYLLE Y CCOLLANA CHAHUANCCOSCO DEL DISTRITO DE SAN JERONIMO CUSCO CUSCO",
      "metodo": "Regímen Especial",
      "categoria": "obras",
      "valorReferencial": 5297023.94,
      "moneda": "PEN",
      "cierrePropuestas": "2026-08-11",
      "postores": 1,
      "montoAdjudicado": 5297023.94,
      "adjudicatarios": [
        {
          "ruc": "20526910797",
          "name": "CORPORACION MONTENEGRO S.R.L."
        }
      ]
    }
  ],
  "warnings": [
    "Datos publicados entre 2026-01-01 y 2026-10-02 (instantánea mensual; los procesos más recientes aún no están). Para postular a procesos vigentes usa el SEACE.",
    "Se devolvieron 3 resultados (tope); acota la búsqueda o sube maxItems (máx. 100)."
  ],
  "attribution": "Fuente: Organismo Especializado para las Contrataciones Públicas Eficientes (OECE), SEACE — datos abiertos en formato OCDS (contratacionesabiertas.oece.gob.pe), obtenidos del Open Contracting Partnership Data Registry (data.open-contracting.org). Licencia CC BY 4.0. Datos sin modificar salvo formato y omisión de personas naturales.",
  "source": "https://data.open-contracting.org/en/publication/135",
  "sourceUpdatedAt": "2026-11-01",
  "retrievedAt": "2026-11-30T11:24:20.553Z"
}

If you reuse the data, credit “Source: OECE, SEACE — OCDS open data via the Open Contracting Partnership Data Registry, CC BY 4.0 licence”, as the licence requires.

Pricing

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 first on betterllama.com. This tool needs no key.

Frequently asked questions

Does SEACE have an API?

OECE publishes SEACE processes as OCDS open data on its Open Contracting portal, which has a web API and downloads; the Open Contracting Partnership Data Registry offers that publication as yearly files. Better Llama's peru_public_procurement_search tool indexes that data and lets you search it by text, region, category, method, dates and reference value in one MCP or JSON-RPC call.

Can I see tenders that are open today?

Not with this tool. The source is updated once a month, so processes from the last 4 to 8 weeks are not there yet. Use it for market, competitor and history analysis; to bid on current processes, use SEACE.

How up to date is the data?

It currently covers processes published between 2026-01-01 and 2026-10-02, from the OECE publication of 2026-11-01. Every response states the coverage in warnings and the source date in sourceUpdatedAt; we update the database when a new monthly publication comes out.

Do I need a key or a SEACE account?

No. Better Llama's tool needs no key and is free during the beta, with a limit of 60 requests per minute per IP. OECE's open data needs no account either.

Can I reuse SEACE data?

Yes. OECE publishes its open data under CC BY 4.0, which allows reuse, commercial too, as long as you credit the source. Every response includes the attribution field with the citation.

Are natural persons included?

No. Only companies (RUC starting with 20) are shown as winners; natural persons are left out.

Can I search Peruvian tenders from Claude, Cursor or another AI agent?

Yes. Add Better Llama's MCP server (https://mcp.betterllama.com/mcp) to your client and the agent can use peru_public_procurement_search to search SEACE processes in natural language.

Is Better Llama affiliated with OECE?

No. Better Llama is an independent project, not affiliated with, sponsored by or endorsed by OECE or the Open Contracting Partnership. The data source is OECE's OCDS open data, reused under CC BY 4.0.

Other guides

This guide is also available en español.