{
  "openapi": "3.0.1",
  "info": {
    "title": "Kaspi Scraper — Prices, Offers, Reviews & Specs",
    "description": "Scrape Kaspi.kz products: KZT prices, Kaspi bonus, installments, seller offers, specs, ratings and reviews. City-aware Kaspi API alternative — JSON via Python, Node.js, MCP.",
    "version": "0.1",
    "x-build-id": "UebhlvtwmHWUYrHcB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~kaspi-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-kaspi-scraper",
        "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/crawloop~kaspi-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-kaspi-scraper",
        "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/crawloop~kaspi-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-kaspi-scraper",
        "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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search on Kaspi.kz (Russian, Kazakh, or English), e.g. iphone, холодильник, қыздырғыш.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Kaspi.kz URLs: product pages (/shop/p/…), category pages (/shop/c/smartphones/), search pages, or merchant shops (/shop/info/merchant/{id}/).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "productIds": {
            "title": "Product IDs",
            "type": "array",
            "description": "Kaspi numeric product IDs (the digits at the end of /shop/p/…-145467625/).",
            "items": {
              "type": "string"
            }
          },
          "merchantIds": {
            "title": "Merchant IDs",
            "type": "array",
            "description": "Kaspi merchant / shop IDs — scrape that seller's public catalog.",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "enum": [
              "750000000",
              "710000000",
              "511010000",
              "351010000",
              "151010000",
              "471010000",
              "551010000",
              "271010000",
              "631010000",
              "231010000",
              "591010000",
              "351610000",
              "552210000"
            ],
            "type": "string",
            "description": "City for prices, Kaspi bonus, stock and delivery. Ignored when Cities is set.",
            "default": "750000000"
          },
          "cities": {
            "title": "Cities (multi-city)",
            "type": "array",
            "description": "Optional extra city IDs for one run (same product can appear once per city — prices differ). Leave empty to use City.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "relevance",
              "price",
              "rating"
            ],
            "type": "string",
            "description": "Search / category sort order.",
            "default": "relevance"
          },
          "scrapeProductDetails": {
            "title": "Product details (specs & description)",
            "type": "boolean",
            "description": "Open each product page for grouped specifications, description, gallery and color/memory variants. Slower, richer rows.",
            "default": false
          },
          "scrapeOffers": {
            "title": "Seller offers",
            "type": "boolean",
            "description": "Collect the full seller price ladder: merchant name, rating, price, Kaspi delivery, pickup / door / express / postomat.",
            "default": false
          },
          "scrapeReviews": {
            "title": "Customer reviews",
            "type": "boolean",
            "description": "Collect public product reviews (author, date, rating, text, photos) plus the rating histogram.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on reviews when Customer reviews is on.",
            "default": 50
          },
          "maxOffersPerProduct": {
            "title": "Max offers per product",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on seller offers when Seller offers is on.",
            "default": 64
          },
          "maxItems": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum product rows across all queries, URLs and cities.",
            "default": 50
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Kaspi returns 12 products per page. 0 = paginate until empty or Max products.",
            "default": 20
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Politeness delay between HTTP requests.",
            "default": 250
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy in Kazakhstan (KZ) is recommended. Datacenter IPs are often rate-limited."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}