{
  "openapi": "3.0.1",
  "info": {
    "title": "Petrovich Building Materials Scraper",
    "description": "Scrape Petrovich (petrovich.ru) - a major Russian building-materials and DIY retailer. Search products, browse by category, and fetch full product detail pages including price, specs/characteristics tables, brand, images, and availability.",
    "version": "1.0",
    "x-build-id": "LveIS3NxoF8d1SZ7B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~petrovich-building-materials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-petrovich-building-materials-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/vexaloom-labs~petrovich-building-materials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-petrovich-building-materials-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/vexaloom-labs~petrovich-building-materials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-petrovich-building-materials-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byCategory",
              "productDetails",
              "reviews",
              "categoryInfo"
            ],
            "type": "string",
            "description": "What to collect. Search products, browse a category, fetch specific product pages, collect product reviews, or inspect a category (filters, subcategories, sort options).",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query, e.g. `кабель`, `цемент`, `дрель`. Search results are always in Petrovich's default relevance order; `sortBy` has no effect in this mode."
          },
          "categoryUrls": {
            "title": "Category URLs or codes (mode=byCategory, categoryInfo)",
            "type": "array",
            "description": "Petrovich catalog URLs, paths, or bare category codes, e.g. `https://petrovich.ru/catalog/100131139/` or `100131139`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs or IDs (mode=productDetails, reviews)",
            "type": "array",
            "description": "Petrovich product URLs, paths, or bare numeric product IDs, e.g. `https://petrovich.ru/product/1181179/` or `1181179`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City / region",
            "enum": [
              "spb",
              "msk",
              "ekb"
            ],
            "type": "string",
            "description": "Petrovich shows city-specific prices and stock. Choose the city whose data you want.",
            "default": "spb"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "popular",
              "price_asc",
              "price_desc",
              "rating",
              "reviews",
              "new"
            ],
            "type": "string",
            "description": "Sort order for category listings. `new` means only new arrivals (the site has no newest-first sort). Search results are always in the site's default relevance order.",
            "default": "popular"
          },
          "brand": {
            "title": "Brand (mode=byCategory only)",
            "type": "string",
            "description": "Optional brand filter. Accepts a Petrovich brand slug (`makita`, `pdidtd`, `kitfort`) or the brand title shown in the category filters (`Makita`). Ignored in other modes."
          },
          "onSale": {
            "title": "Only discounted products",
            "type": "boolean",
            "description": "Apply Petrovich's `Распродажа` (sale) filter in category listings.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new arrivals",
            "type": "boolean",
            "description": "Apply Petrovich's `Новинки` (new arrivals) filter in category listings.",
            "default": false
          },
          "onlyPromo": {
            "title": "Only promotional products",
            "type": "boolean",
            "description": "Apply Petrovich's `Акции` (promotions) filter in category listings.",
            "default": false
          },
          "inStockOnly": {
            "title": "Only in-stock products",
            "type": "boolean",
            "description": "Keep only products the site marks as currently available in the selected city. Applied after fetching, so the actor may read extra pages.",
            "default": false
          },
          "deliveryType": {
            "title": "Delivery / pickup availability",
            "enum": [
              "any",
              "today",
              "tomorrow",
              "five_days",
              "whenever"
            ],
            "type": "string",
            "description": "Server-side availability filter for category listings.",
            "default": "any"
          },
          "minRating": {
            "title": "Minimum rating",
            "enum": [
              "any",
              "4",
              "3"
            ],
            "type": "string",
            "description": "Server-side rating filter for category listings.",
            "default": "any"
          },
          "minPrice": {
            "title": "Minimum price (mode=byCategory only)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional lower price bound in RUB. Petrovich's API has no price-range parameter, so the actor pages through the listing and filters the results itself. Ignored in other modes."
          },
          "maxPrice": {
            "title": "Maximum price (mode=byCategory only)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional upper price bound in RUB. Applied together with `minPrice` after fetching."
          },
          "reviewSort": {
            "title": "Review sort (mode=reviews)",
            "enum": [
              "date_desc",
              "date_asc"
            ],
            "type": "string",
            "description": "Order in which reviews are collected.",
            "default": "date_desc"
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product (mode=reviews)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on reviews collected for each product. The overall `maxItems` cap still applies.",
            "default": 20
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on emitted records (products, reviews, or category records, depending on the mode).",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (optional)",
            "type": "object",
            "description": "Optional custom proxy for the browser fallback. No proxy is needed for normal runs: the actor uses Petrovich's anonymous API and only falls back to a residential browser session if the API path is unavailable.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}