# /secop/tenders/search

`POST /api/secop/tenders/search`

Price: 20 credits

Search Colombian public procurement processes on SECOP II by words, process name, procuring entity, awarded supplier, UNSPSC category, status, procurement method, contract type, department, award flag, base price range and publication or bid reception dates, newest publication first. Each row carries the process status and stage, buyer, base price, key dates and the award with its supplier.

## How to use it

Without filters the newest processes come first. `query` matches words anywhere in the record, `title`, `buyer` and `supplier` match a text fragment of that name. Pass a row's `id` to secop/tenders for the bidders of the process.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `count` (integer, required) — Max number of processes to return (min: 1; max: 5000)
- `offset` (integer) — How many processes to skip before the first returned one (default: 0; min: 0; max: 100000)
- `query` (string, nullable) — Words anywhere in the process record (examples: "medicamentos"; minLength: 2)
- `buyer_nit` (string, nullable) — NIT of the procuring entity (examples: "890905211")
- `buyer_id` (string, nullable) — SECOP II code of the procuring entity (examples: "701899197")
- `buyer` (string, nullable) — Text contained in the procuring entity name (examples: "medellin"; minLength: 2)
- `supplier_nit` (string, nullable) — NIT of the awarded supplier (examples: "901384593")
- `supplier_id` (string, nullable) — SECOP II code of the awarded supplier (examples: "710834128")
- `supplier` (string, nullable) — Text contained in the awarded supplier name (examples: "drogueria"; minLength: 2)
- `category` (string, nullable) — UNSPSC code or code prefix of the main category (examples: "80111600", "4214")
- `statuses` (array) — Process statuses, any of (default: []; one of: "Publicado", "Evaluación", "Seleccionado", "Cancelado", "Borrador", "Abierto", "Aprobado", "En aprobación", "Suspendido")
- `procurement_methods` (array) — Procurement methods, any of (default: []; one of: "Contratación directa", "Contratación régimen especial", "Mínima cuantía", "Selección Abreviada de Menor Cuantía", "Selección abreviada subasta inversa", "Solicitud de información a los Proveedores", "Contratación régimen especial (con ofertas)", "Contratación Directa (con ofertas)", "Licitación pública", "Concurso de méritos abierto", "Licitación pública Obra Publica", "Licitación Pública Acuerdo Marco de Precios", "Seleccion Abreviada Menor Cuantia Sin Manifestacion Interes", "Subasta de prueba", "Enajenación de bienes con subasta", "Enajenación de bienes con sobre cerrado", "Concurso de méritos con precalificación")
- `contract_types` (array) — Contract types, any of (default: []; one of: "Prestación de servicios", "Decreto 092 de 2017", "Suministros", "Otro", "Compraventa", "Obra", "Arrendamiento de inmuebles", "Seguros", "Interventoría", "Consultoría", "Comodato", "Acuerdo Marco de Precios", "Arrendamiento de muebles", "Servicios financieros", "Operaciones de Crédito Público", "Concesión", "Venta muebles", "Asociación Público Privada", "Negocio fiduciario", "Venta inmuebles", "Comisión", "Acuerdo de cooperación", "Empréstito")
- `departments` (array) — Departments of the procuring entity, any of (default: []; one of: "Distrito Capital de Bogotá", "Antioquia", "Valle del Cauca", "Cundinamarca", "Santander", "Boyacá", "Bolívar", "Magdalena", "Nariño", "Atlántico", "Tolima", "Norte de Santander", "Meta", "Caldas", "Huila", "Risaralda", "Quindío", "Cauca", "Cesar", "Casanare", "Córdoba", "Putumayo", "La Guajira", "Sucre", "Caquetá", "Arauca", "San Andrés, Providencia y Santa Catalina", "Chocó", "Amazonas", "Vichada", "Vaupés", "Guaviare", "Guainía")
- `is_awarded` (boolean, nullable) — Only awarded (true) or only not awarded (false)
- `value_min` (number, nullable) — Minimum base price in COP (examples: 100000000; min: 0)
- `value_max` (number, nullable) — Maximum base price in COP (examples: 500000000; min: 0)
- `published_from` (string, nullable) — Earliest publication date, inclusive (examples: "2026-09-01")
- `published_to` (string, nullable) — Latest publication date, inclusive (examples: "2026-09-15")
- `deadline_from` (string, nullable) — Earliest bid reception date, inclusive (examples: "2026-09-24")
- `deadline_to` (string, nullable) — Latest bid reception date, inclusive (examples: "2026-10-31")

## Response

### 200 — Successful Response

- `@type` (string) (default: "SecopTender")
- `id` (string, required)
- `portfolio_id` (string, nullable)
- `reference` (string, nullable)
- `description` (string, nullable)
- `status` (string, nullable)
- `status_code` (string, nullable)
- `stage` (string, nullable)
- `summary_status` (string, nullable)
- `visibility` (string, nullable)
- `buyer` (object, nullable)
  - `@type` (string) (default: "SecopBuyerRef")
  - `id` (string, nullable)
  - `nit` (string, nullable)
  - `name` (string, nullable)
  - `department` (string, nullable)
  - `city` (string, nullable)
  - `order` (string, nullable)
  - `centralization` (string, nullable)
  - `unit_code` (string, nullable)
  - `unit_name` (string, nullable)
  - `unit_city` (string, nullable)
- `procurement_method` (string, nullable)
- `method_justification` (string, nullable)
- `contract_type` (string, nullable)
- `category` (string, nullable)
- `additional_categories` (array) (default: [])
- `value` (object, nullable)
  - `@type` (string) (default: "SecopValue")
  - `amount` (number, required)
  - `currency` (string) (default: "COP")
- `duration` (number, nullable)
- `duration_unit` (string, nullable)
- `lot_count` (integer, nullable)
- `published_date` (string, nullable)
- `last_published_date` (string, nullable)
- `draft_published_date` (string, nullable)
- `selection_published_date` (string, nullable)
- `prequalification_planning_date` (string, nullable)
- `prequalification_selection_date` (string, nullable)
- `interest_published_date` (string, nullable)
- `deadline_date` (string, nullable)
- `opening_date` (string, nullable)
- `actual_opening_date` (string, nullable)
- `is_awarded` (boolean, nullable)
- `award` (object, nullable)
  - `@type` (string) (default: "SecopAward")
  - `id` (string, nullable)
  - `value` (object, nullable)
    - `@type` (string) (default: "SecopValue")
    - `amount` (number, required)
    - `currency` (string) (default: "COP")
  - `awarded_date` (string, nullable)
  - `awarder_name` (string, nullable)
  - `supplier` (object, nullable)
    - `@type` (string) (default: "SecopSupplierRef")
    - `id` (string, nullable)
    - `nit` (string, nullable)
    - `name` (string, nullable)
    - `department` (string, nullable)
    - `city` (string, nullable)
- `invited_supplier_count` (integer, nullable)
- `directly_invited_supplier_count` (integer, nullable)
- `interested_supplier_count` (integer, nullable)
- `responding_supplier_count` (integer, nullable)
- `response_count` (integer, nullable)
- `external_response_count` (integer, nullable)
- `offer_response_count` (integer, nullable)
- `view_count` (integer, nullable)
- `country` (string) (default: "CO")
- `url` (string, nullable)

## Errors

### 422 — Validation Error

A NIT, code, UNSPSC category or date is malformed, a range is reversed, or SECOP II rejected the query

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

