# /goszakup/lots/search

`POST /api/goszakup/lots/search`

Price: 5 credits

Search lots of Kazakhstan public procurement tenders on zakup.gov.kz by name words, lot number, tender number, status, procurement method, customer, ENSTRU classifier and plan year. Returns the lot with its tender, quantity, price, bid window, classifier codes and delivery places.

## How to use it

Status and method values are the Russian labels the rows carry in `status.name` and `purchase_method.name`. A lot has no page of its own: `tender_id` opens its tender in goszakup/tenders, which lists every lot with its plan items. One filter set reaches at most its first 10,000 rows.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `query` (string, nullable) — Words of the lot name or description (examples: "бумага", "бензин"; minLength: 2)
- `lot_number` (string, nullable) — Lot number (examples: "88025518-ОИ2"; minLength: 1)
- `tender_number` (string, nullable) — Number of the tender the lot belongs to (examples: "17685590-1"; minLength: 1)
- `statuses` (array) — Lot statuses, any of (default: []; one of: "Внесена поправка", "Завершено", "Закупка не состоялась", "Закупка состоялась", "Заполнение условных скидок", "Изменена документация", "Итоги. Закупка не состоялась. Изменен", "Корректировка инициатором", "Корректировка оператором", "На обжаловании", "На рассмотрении у оператора", "Ожидание камерального контроля", "Ожидание проведения контроля качества", "Опубликован", "Опубликован (дополнение заявок)", "Опубликован (прием заявок)", "Опубликован (прием ценовых предложений)", "Опубликовано (ожидание проведения аукциона)", "Опубликовано (проведение аукциона)", "Опубликовано (проверка заявок)", "Опубликовано предварительное обсуждение", "Опубликовано. Торги", "Отказ от лота", "Отказан с инициацией об отмене", "Отменен", "Пересмотр итогов", "Подведение итогов", "Предварительное обсуждение завершено", "Принятие решение о пересмотре итогов", "Принятие решение об исполнении уведомления", "Принятие решения по пересмотру ППД", "Приостановлен", "Проект", "Пройдено контроль качества", "Рассмотрение дополнений заявок", "Рассмотрение заявок", "Рассмотрение предварительного обсуждения инициатором", "Рассмотрение предварительного обсуждения оператором", "Рассмотрение предварительного обсуждения уполномоченным лицом", "Согласование утверждающим", "Формирование проекта протокола преддопуска", "Формирование протокола допуска", "Формирование протокола итогов", "Формирование протокола преддопуска", "Формирование протокола промежуточных итогов")
- `purchase_methods` (array) — Procurement methods, any of (default: []; one of: "Аукцион", "Аукцион (до 2022)", "Аукцион (не ГЗ)", "Аукцион (не ГЗ) с 2022 г", "Аукцион (с 2022)", "В рамках внутрихолдинговой кооперации", "Второй этап конкурса с использованием рамочного соглашения", "Государственные закупки с применением особого порядка", "Двухэтапный тендер", "Договор на услуги государственного образовательного заказа", "Закупка жилища", "Закупка по государственному социальному заказу", "Запрос ценовых предложений", "Запрос ценовых предложений (не ГЗ new)", "Запрос ценовых предложений на понижение", "Запрос ценовых предложений с ограниченным участием", "Из одного источника (не ГЗ)", "Из одного источника по несостоявшимся закупкам", "Из одного источника по несостоявшимся закупкам не ГЗ", "Из одного источника путем прямого заключения договора", "Из одного источника путем прямого заключения договора (не ГЗ)", "Из одного источника путем прямого заключения договора по питанию обучающихся", "Конкурс по приобретению товаров, связанных с обеспечением питания воспитанников и обучающихся", "Конкурс по приобретению услуг по организации питания воспитанников и обучающихся", "Конкурс по строительству «под ключ»", "Конкурс с использованием рейтингово-балльной системы", "Конкурс с предварительным квалификационным отбором", "Конкурс с применением двухэтапных процедур", "Конкурс с применением специального порядка", "Маркетинговые исследования", "На централизованных торгах электрической энергией", "Открытый конкурс", "Открытый тендер", "Открытый тендер на понижение", "Открытый тендер с ограниченным участием", "Первый этап конкурса с использованием рамочного соглашения", "Тендер", "Тендер по строительству «под ключ»", "Тендер путем проведения конкурентных переговоров", "Тендер с использованием рейтингово-балльной системы", "Тендер с применением особого порядка", "Через товарные биржи", "Электронный магазин", "Электронный магазин (не ГЗ)")
- `customer_id` (integer, nullable) — Customer id, as in goszakup/organizations (examples: 11409; min: 0)
- `enstru_id` (integer, nullable) — ENSTRU classifier id, as in a row's `enstru` (examples: 50310; min: 0)
- `plan_year` (integer, nullable) — Plan year of the lot (examples: 2026)
- `offset` (integer) — Rows to skip (default: 0; min: 0; max: 9999)
- `count` (integer, required) — Max number of lots to return (min: 1; max: 1000)

## Response

### 200 — Successful Response

- `@type` (string) (default: "GoszakupLotSummary")
- `id` (integer, required)
- `external_id` (integer, nullable)
- `number` (string, nullable)
- `name` (string, nullable)
- `name_kk` (string, nullable)
- `description` (string, nullable)
- `description_kk` (string, nullable)
- `tender_id` (integer, nullable)
- `tender_external_id` (integer, nullable)
- `tender_number` (string, nullable)
- `tender_published_at` (integer, nullable)
- `url` (string, nullable)
- `status` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `system` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `purchase_method` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `purchase_subjects` (array) (default: [])
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `customer_name` (string, nullable)
- `quantity` (number, nullable)
- `total_price` (number, nullable)
- `dumping_price` (number, nullable)
- `offer_start_at` (integer, nullable)
- `offer_end_at` (integer, nullable)
- `plan_years` (array) (default: [])
- `enstru` (array) (default: [])
  - `@type` (string) (default: "GoszakupEnstru")
  - `id` (integer, nullable)
  - `code` (string, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
  - `short_description` (string, nullable)
  - `short_description_kk` (string, nullable)
  - `item_type` (object, nullable)
    - `@type` (string) (default: "GoszakupCode")
    - `id` (integer, nullable)
    - `code` (string, nullable)
    - `name` (string, nullable)
  - `is_for_disabled_people` (boolean, nullable)
  - `is_construction_work` (boolean, nullable)
  - `is_score_based_tender` (boolean, nullable)
- `delivery_places` (array) (default: [])
  - `@type` (string) (default: "GoszakupKato")
  - `id` (integer, nullable)
  - `code` (string, nullable)
  - `name` (string, nullable)
  - `full_name` (string, nullable)
  - `full_name_kk` (string, nullable)
  - `level` (integer, nullable)
- `plan_item_ids` (array) (default: [])

## Errors

### 422 — Validation Error

The plan year is unknown or the portal rejected the filter combination

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.

