{
  "openapi": "3.0.1",
  "info": {
    "title": "Kaspi.kz Product Search Scraper — Prices, Sellers & Ratings",
    "description": "Kaspi.kz marketplace products for price monitoring, assortment research and AI agents: search or browse any category in 320 cities, filter by brand, merchant, price and rating. Price, installment, rating, reviews, merchant offers with min/max price, optional specs.",
    "version": "0.1",
    "x-build-id": "My0LJTAYWZowamTfH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~kaspi-kz-products/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-kaspi-kz-products",
        "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~kaspi-kz-products/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-kaspi-kz-products",
        "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~kaspi-kz-products/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-kaspi-kz-products",
        "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": "Mode",
            "enum": [
              "search",
              "products",
              "cities",
              "categories"
            ],
            "type": "string",
            "description": "`search` — products matching query/category in each city. `products` — the exact products from `productUrls` in each city (price, availability, sellers). `cities` / `categories` — reference lists for picking `cityIds` / `categories` values, no scraping: `cities` gives all 320 cities with regions, `categories` the 20 root categories; `query` keeps the rows where a word starts with that text (e.g. \"tires\", \"Караганд\"), and the full lists are always saved free to key-value store records CITIES / CATEGORIES. With only `productUrls` filled the run switches to `products` by itself.",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text search as typed into the kaspi.kz search box (Russian or English, brand + model works best). Leave empty to browse a whole `category`."
          },
          "queries": {
            "title": "More search queries",
            "type": "array",
            "description": "Several searches in one run (each is combined with every category and city). Example: [\"iphone 16\", \"galaxy s25\", \"redmi note 14\"].",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category code",
            "type": "string",
            "description": "kaspi.kz category code (the English code in the catalogue URL https://kaspi.kz/shop/c/<code>/), e.g. \"Smartphones\", \"Notebooks\", \"TVs\", \"Tires\", \"Home equipment\", \"Beauty care\". Case-insensitive; Russian titles are accepted (\"Смартфоны\", \"Шины\"). 20 root categories and 1 732 sub-categories are built in (README → Reference). Unknown codes are passed through with a warning."
          },
          "categories": {
            "title": "More categories",
            "type": "array",
            "description": "Several category codes in one run, e.g. [\"TVs\", \"Refrigerators\", \"Шины\"]. Run mode `categories` once to get every valid code.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product links or ids (products mode)",
            "type": "array",
            "description": "kaspi.kz product links (https://kaspi.kz/shop/p/apple-iphone-15-128gb-…-113137790/) or numeric ids. Each product is looked up in every city of `cityIds` — one row per product × city with the city's price, availability, rating and (with includeOffers) sellers. Up to 2 000 product × city pairs per run.",
            "items": {
              "type": "string"
            }
          },
          "cityId": {
            "title": "City",
            "type": "string",
            "description": "Delivery city — prices and availability are city-specific. Accepts the kaspi city id (750000000 Almaty, 710000000 Astana, 511010000 Shymkent, 351010000 Karaganda, 151010000 Aktobe…), the URL code (\"almaty\", \"nur-sultan\", \"shymkent\") or the city name in Russian/English. All 320 cities are in README → Reference.",
            "default": "750000000"
          },
          "cityIds": {
            "title": "Cities (several)",
            "type": "array",
            "description": "Several cities in one run — ids, codes or names (\"Алматы\", \"astana\", \"511010000\") and presets: `@top-10` (10 biggest cities), `@regional-centers` (20: Astana, Almaty, Shymkent + every regional capital), `@region:35` (all kaspi cities of one region by KATO code, see README → Regions), `@all` (all 320). Overrides `cityId`. Every row carries cityId, cityName and region.",
            "items": {
              "type": "string"
            }
          },
          "myMerchantId": {
            "title": "My merchant id (seller position)",
            "type": "string",
            "description": "For Kaspi sellers: your merchant id (Kaspi seller cabinet → profile, or `offers[].merchantId` in this actor's output). Every product then gets myPrice, myRank among all sellers in that city (1 = cheapest), sellersCount, cheapestCompetitorPrice, priceGapToCheapest (₸ and %), isCheapest. Combine with `merchantId` (same id) to check your whole storefront. Fetches all sellers per product (+1–5 requests)."
          },
          "brand": {
            "title": "Brands",
            "type": "array",
            "description": "Manufacturer names exactly as shown on kaspi.kz (\"Apple\", \"Samsung\", \"Xiaomi\"). Several = OR. Maps to `:manufacturerName:<brand>`.",
            "items": {
              "type": "string"
            }
          },
          "merchantId": {
            "title": "Merchant id",
            "type": "string",
            "description": "Only products sold by this merchant (kaspi merchant id such as \"441010\" — visible in the site URL after choosing a seller in the «Продавцы» filter, or in this actor's `offers[].merchantId` output). Maps to `:allMerchants:<id>`."
          },
          "priceFrom": {
            "title": "Price from (₸)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum product price in tenge (client-side)."
          },
          "priceTo": {
            "title": "Price to (₸)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum product price in tenge (client-side). Combine with `sort: cheapest` so the run stops as soon as prices exceed the limit."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only products rated at least this (0–5, client-side)."
          },
          "minReviews": {
            "title": "Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products with at least this many reviews (client-side)."
          },
          "officialPartnerOnly": {
            "title": "Official brand partners only",
            "type": "boolean",
            "description": "Keep only products whose best offer comes from an official brand partner (client-side).",
            "default": false
          },
          "sinceDays": {
            "title": "Added in the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only products first listed on kaspi.kz within the last N days (uses `createdTime`; client-side). Use with `sort: newest` for cheap new-arrival monitoring."
          },
          "facets": {
            "title": "Extra facets (advanced)",
            "type": "object",
            "description": "Any additional kaspi facet as {code: value | [values]}, copied from the site's `q=` URL parameter, e.g. {\"Smartphones*Internal memory size\": \"256 ГБ\", \"Smartphones*Colour\": [\"черный\", \"белый\"]}. Run once with `saveFacets: true` to see every facet code and value available for your search."
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Remember every product × city under `monitorKey` (a named key-value store in your account) and add changeType (new / priceUp / priceDown / unchanged / outOfStock / backInStock / removed), previousPrice, priceChange, priceChangePct, offersCountChange, firstSeenAt. The first run saves the baseline. A summary goes to key-value store → CHANGES.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name of this monitor — use a different key for each schedule/task so their histories do not mix (e.g. \"iphones-almaty\", \"my-shop\"). Stored as key-value store `kaspi-monitor-<key>`.",
            "default": "default"
          },
          "onlyChanges": {
            "title": "Output only changes",
            "type": "boolean",
            "description": "With trackChanges: save only new, cheaper, pricier, out-of-stock, back-in-stock and removed products — unchanged ones are skipped (and not charged). Ideal for alerts.",
            "default": false
          },
          "includeRemoved": {
            "title": "Report removed products",
            "type": "boolean",
            "description": "With trackChanges: add a row (changeType \"removed\") for each product seen last time but gone now. Only reported when every search in the run was read to its end (not cut by maxItems/maxPages) and nothing failed, so a capped search never looks like a sell-out.",
            "default": true
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "newest",
              "cheapest",
              "expensive",
              "rating",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Result order as on kaspi.kz. Legacy values priceAsc/priceDesc are still accepted.",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each search (query × category × city) after this many products. kaspi.kz returns 12 products per request, so 1000 items ≈ 84 requests.",
            "default": 50
          },
          "maxTotalItems": {
            "title": "Max items per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on dataset rows (each one is charged) for the whole run, across all searches / products / cities and change-tracking `removed` rows. Unchanged products skipped by onlyChanges do not count.",
            "default": 10000
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap on search pages (12 products each). Matters when client-side filters reject most products.",
            "default": 100
          },
          "includeOffers": {
            "title": "Include merchant offers",
            "type": "boolean",
            "description": "For each product also fetch the offer list: number of sellers, min/max offer price and the cheapest `offersLimit` merchants with rating, review count and delivery speed (+1 request per product).",
            "default": false
          },
          "offersLimit": {
            "title": "Offers per product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many cheapest merchant offers to keep per product when `includeOffers` is on.",
            "default": 5
          },
          "includeReviewsSummary": {
            "title": "Include reviews summary",
            "type": "boolean",
            "description": "Fetch the rating breakdown (1–5 star counts, positive/negative/with-photo totals) and the 3 latest review texts (+1 request per product).",
            "default": false
          },
          "detail": {
            "title": "Open product pages",
            "type": "boolean",
            "description": "Open each product page and add the full specification table, description text, breadcrumbs and gallery size (+1 HTML request per product, ~1 s each).",
            "default": false
          },
          "saveFacets": {
            "title": "Save search facets",
            "type": "boolean",
            "description": "Store the search metadata (total, sort options, all facets with counts, category tree) to the key-value store record SEARCH_FACETS — useful to discover valid brand/facet values.",
            "default": false
          },
          "dedupe": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Skip products already seen in this run (kaspi sometimes repeats items across pages).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches / product lookups run at the same time. 3 is safe; higher is faster on big multi-city runs but kaspi.kz answers bursts with 429 (retried automatically) — see README → Limits for measured numbers.",
            "default": 3
          },
          "fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Keep only these columns, in this order (empty = every column), e.g. [\"title\", \"price\", \"cityName\", \"url\"]. Names as in README → Output. `id` and `cityId` (plus `changeType` with trackChanges) are always kept and come first unless you list them; mode \"cities\" always keeps `id`, mode \"categories\" `code`. Case, spaces and '_' do not matter; a near miss with one candidate (\"pric\") is read as it and an unknown name is ignored — both are reported in the run status. If none of the names exists, the run fails with the list of valid names.",
            "items": {
              "type": "string"
            }
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "kaspi.kz blocks datacenter IPs, so Apify RESIDENTIAL proxy (Kazakhstan) is on by default. Switch off only when running from a whitelisted/local network.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "KZ"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}