{
  "openapi": "3.0.1",
  "info": {
    "title": "Kazakhstan Public Procurement Tenders (goszakup.gov.kz)",
    "description": "State procurement announcements and lots from Kazakhstan's official goszakup.gov.kz portal: one row per announcement or lot with number, name, amount in tenge, procurement method, status and application dates. Filter by keyword, customer, method, status, amount or financial year.",
    "version": "0.1",
    "x-build-id": "iLLavoiNShcrqGR1t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~goszakup-kz-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-goszakup-kz-tenders",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/yadroo~goszakup-kz-tenders/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-goszakup-kz-tenders",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/yadroo~goszakup-kz-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-goszakup-kz-tenders",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to read",
            "enum": [
              "announcements",
              "lots"
            ],
            "type": "string",
            "description": "Two different jobs. `announcements` answers \"which tenders were published\": one row per announcement with its total amount, procurement method, status and the dates applications are accepted - the view compliance officers, analysts and journalists work in. `lots` answers \"what is actually being bought\": one row per lot with the lot name, its description, the quantity and the lot amount - the view a supplier needs to decide whether to bid. Both modes read the portal's public search and both rows name their mode in `mode`.",
            "default": "announcements"
          },
          "query": {
            "title": "Keyword in the name",
            "type": "string",
            "description": "Substring the portal searches in the announcement name, and in the lot name as well when the mode is `lots`. It is sent to the portal exactly as you type it, because the portal does the matching itself - so Russian and Kazakh words both work (`ремонт`, `страхование`, `компьютер`, `жөндеу`), capitals are ignored by the portal and a part of a word matches longer forms. Latin transliteration does not match: the portal stores the names as they were filed, in Russian or Kazakh. Left empty, the run returns the newest announcements with no name filter."
          },
          "customer": {
            "title": "Customer / organizer name contains",
            "type": "string",
            "description": "Substring of the name of the state body or company that buys - `школа`, `больница`, `КазМунайГаз`, `акимат`. The portal matches it inside the full registered name, so a short word is enough and a full name works too. Sent as typed, like the keyword above. The search page names the buying body only in a note under the announcement; switch on \"Add customer details\" below to get it as columns - `customerName`, `customerBin` and the registered address."
          },
          "announcementNumber": {
            "title": "One announcement number",
            "type": "string",
            "description": "Look up a single announcement by the number the portal prints, with or without its lot suffix: `17911453` and `17911453-1` both work. The portal narrows the search to that one announcement, so the run costs one request and writes one row (or none, when the number does not exist). Leave it empty for a normal search; combined with the other filters it still wins, because only one announcement can match."
          },
          "method": {
            "title": "Procurement methods",
            "maxItems": 10,
            "type": "array",
            "description": "One procurement method per line, written as the portal prints it in Russian: `Открытый конкурс`, `Запрос ценовых предложений`, `Аукцион`, `Из одного источника по несостоявшимся закупкам`. Case, extra spaces and the Kazakh spelling of the same method are accepted, and the portal's own numeric method id (for example `2` for an open competition) is accepted too. A value that matches nothing stops the run and names the closest methods instead of quietly returning another method's tenders. The full list is in README -> Reference. Empty = every method.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Announcement statuses",
            "maxItems": 10,
            "type": "array",
            "description": "One status per line as the portal prints it: `Опубликовано`, `Опубликовано (прием заявок)`, `Завершено`, `Отменено`, `Отказ от закупки`. Case, extra spaces and the portal's numeric status id (for example `350` for a finished announcement) are accepted; anything else stops the run with the closest statuses named. Use `Опубликовано` and `Опубликовано (прием заявок)` to see only tenders still open for bids, and `Завершено` to study what was already bought. The lot registry has its own, shorter status list. Empty = every status.",
            "items": {
              "type": "string"
            }
          },
          "amountFrom": {
            "title": "Amount from (tenge)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only announcements (or lots) whose published amount is at least this many tenge, VAT excluded as the portal reports it. `500000000` isolates the half-billion-tenge purchases that are worth a look one by one; the small office buys disappear."
          },
          "amountTo": {
            "title": "Amount to (tenge)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound of the published amount in tenge. Combine it with the lower bound to work through one size band at a time - a market study of purchases between 1 and 10 million tenge, for example."
          },
          "financialYear": {
            "title": "Financial year",
            "minimum": 2015,
            "maximum": 2030,
            "type": "integer",
            "description": "The budget year the purchase belongs to, which is not always the year it was published: a tender for the next year appears late in the current one. Empty = every year the portal holds, newest announcements first, which is what a monitoring task wants."
          },
          "sinceDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Keep only rows whose application-start date falls inside this many days back from today (UTC). The portal has no date filter of its own, so this is applied to the dates printed on the search page, and paging stops once a whole page is older than the cutoff - which makes a daily or hourly schedule cheap. Empty = no date cutoff."
          },
          "onlyNew": {
            "title": "Only announcements not returned before",
            "type": "boolean",
            "description": "Remember the announcement or lot number of every row written, and on the next run of the same actor or task write only numbers that were not written before - so a schedule appends what appeared since the last run instead of resending and recharging the whole search. The first run writes everything that matches. The memory belongs to the actor or task, so two tasks watching two customers never mix. A row whose status changed later is not resent.",
            "default": false
          },
          "includeCustomer": {
            "title": "Add customer details (slower)",
            "type": "boolean",
            "description": "Off (default): rows are built from the search pages only, which is one request per 100 rows. On: the announcement page of every row is opened as well to add `customerName`, `customerBin`, `customerAddress`, `subjectType`, `purchaseType` and `lotCount`. The portal asks crawlers for five seconds between requests and we keep to it, so one extra row costs about five seconds - use it with a small row cap. Contact people named on those pages are never written out.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on the rows this run writes, and so on what it costs. Results arrive newest announcement first, so a capped run holds the most recent tenders. The portal serves up to 100 rows per request and shows at most 10,000 results for one search - narrow the search with a keyword, a customer, an amount band or a year to reach further back than that.",
            "default": 50
          },
          "fields": {
            "title": "Only these columns",
            "type": "array",
            "description": "Keep only the named columns, in this order - for example `announcementNumber, announcementName, amountTenge, applicationEndDate`. Empty = every column. `mode`, `announcementNumber`, `announcementName`, `amountTenge`, `status`, `url` and `fetchedAt` are always written; name one of them here and it moves to the position you gave it. An unknown name is reported in the run status rather than dropped in silence.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}