# /goszakup/plans/search

`POST /api/goszakup/plans/search`

Price: 5 credits

Search items of Kazakhstan annual procurement plans on zakup.gov.kz by name words, item number, customer, status, procurement method, subject, procurement system, plan year and month. Returns the planned purchase with customer, quantity, unit and total price.

## How to use it

Status and method values are the Russian labels the rows carry in `status.name` and `purchase_method.name`. Pass `id` to goszakup/plans for budget, funding source, delivery places and the yearly split. 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 plan item name or description (examples: "бумага"; minLength: 2)
- `external_id` (string, nullable) — Plan item number on the goszakup portal (examples: "88052849"; minLength: 1)
- `organization_id` (integer, nullable) — Customer id, as in goszakup/organizations (examples: 9604; min: 0)
- `statuses` (array) — Plan item statuses, any of (default: []; one of: "Договор действует", "Договор изменен", "Договор не заключен", "Договор не заключен, отказ от первого победителя", "Договор не заключен. Изменен.", "Договор не исполнен. Нет платежей", "Договор расторгнут", "Договор создан", "Договор утвержден", "Договор частично исполнен", "Завершено. Изменена документация", "Закупка не состоялась", "Закупка не состоялась. Изменен", "Закупка состоялась", "Заявка", "Заявка возвращена организатором", "Заявка отклонена", "Заявка подтверждена", "Исключен", "Исполнен", "На обжаловании", "Опубликован", "Отказ от закупки", "Отменен", "Отменен. Изменен", "Перенесен", "Пересмотр итогов", "Принятие решение о пересмотре итогов", "Принятие решение об исполнении уведомления", "Приостановлен", "Проект договора", "Проект заявки", "Проект лота", "Утвержден", "Черновик")
- `purchase_methods` (array) — Procurement methods, any of (default: []; one of: "Аукцион", "Аукцион (до 2022)", "Аукцион (не ГЗ)", "Аукцион (не ГЗ) с 2022 г", "Аукцион (с 2022)", "В рамках внутрихолдинговой кооперации", "Второй этап конкурса с использованием рамочного соглашения", "Государственные закупки с применением особого порядка", "Двухэтапный тендер", "Договор на услуги государственного образовательного заказа", "Закупка жилища", "Закупка по государственному социальному заказу", "Запрос ценовых предложений", "Запрос ценовых предложений (не ГЗ new)", "Запрос ценовых предложений на понижение", "Запрос ценовых предложений с ограниченным участием", "Из одного источника (не ГЗ)", "Из одного источника по несостоявшимся закупкам", "Из одного источника по несостоявшимся закупкам не ГЗ", "Из одного источника путем прямого заключения договора", "Из одного источника путем прямого заключения договора (не ГЗ)", "Из одного источника путем прямого заключения договора по питанию обучающихся", "Конкурс по приобретению товаров, связанных с обеспечением питания воспитанников и обучающихся", "Конкурс по приобретению услуг по организации питания воспитанников и обучающихся", "Конкурс по строительству «под ключ»", "Конкурс с использованием рейтингово-балльной системы", "Конкурс с предварительным квалификационным отбором", "Конкурс с применением двухэтапных процедур", "Конкурс с применением специального порядка", "Маркетинговые исследования", "На централизованных торгах электрической энергией", "Открытый конкурс", "Открытый тендер", "Открытый тендер на понижение", "Открытый тендер с ограниченным участием", "Первый этап конкурса с использованием рамочного соглашения", "Тендер", "Тендер по строительству «под ключ»", "Тендер путем проведения конкурентных переговоров", "Тендер с использованием рейтингово-балльной системы", "Тендер с применением особого порядка", "Через товарные биржи", "Электронный магазин", "Электронный магазин (не ГЗ)")
- `subject` (string, nullable) — Subject of the purchase (one of: "goods", "works", "services")
- `system` (string, nullable) — Procurement system the plan runs on (one of: "egz", "mitwork", "skk", "epz")
- `plan_year` (integer, nullable) — Plan year (examples: 2026)
- `month` (integer, nullable) — Planned month of the purchase (examples: 9; min: 1; max: 12)
- `offset` (integer) — Rows to skip (default: 0; min: 0; max: 9999)
- `count` (integer, required) — Max number of plan items to return (min: 1; max: 1000)

## Response

### 200 — Successful Response

- `@type` (string) (default: "GoszakupPlanSummary")
- `id` (integer, required)
- `external_id` (string, nullable)
- `name` (string, nullable)
- `name_kk` (string, nullable)
- `extra_description` (string, nullable)
- `organization` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `plan_id` (integer, nullable)
- `plan_years` (array) (default: [])
- `month` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (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_subject` (object, nullable)
  - `@type` (string) (default: "GoszakupRef")
  - `id` (integer, nullable)
  - `name` (string, nullable)
  - `name_kk` (string, nullable)
- `quantity` (number, nullable)
- `unit_price` (number, nullable)
- `total_price` (number, nullable)
- `delivery_kato_id` (integer, nullable)
- `delivery_region_id` (integer, nullable)
- `is_quasi_sector` (boolean, nullable)

## 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.

