{
  "openapi": "3.0.1",
  "info": {
    "title": "Wildberries Niche Analyzer: аналитика ниш WB",
    "description": "Analyze any Wildberries (Вайлдберриз) keyword or category as a market: seller and brand counts, competition concentration (HHI), price min/avg/median/max, rating and review distributions, and in-stock rate. One aggregate row per niche for product research and competitor analysis.",
    "version": "0.1",
    "x-build-id": "MQLtzh0zwh1CohJDT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~wildberries-niche-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-wildberries-niche-analyzer",
        "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/getascraper~wildberries-niche-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-wildberries-niche-analyzer",
        "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/getascraper~wildberries-niche-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-wildberries-niche-analyzer",
        "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": {
          "keywords": {
            "title": "Keywords / niches to analyze",
            "type": "array",
            "description": "One product keyword per niche, in Russian or English (e.g. \"робот пылесос\", \"wireless earbuds\"). You get ONE market-summary row per keyword. Add several to compare niches side by side in a single run. At least one keyword is required.",
            "default": [
              "пылесос"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxProductsPerQuery": {
            "title": "Sample size per niche",
            "minimum": 100,
            "maximum": 5000,
            "type": "integer",
            "description": "How many top products to sample per keyword before computing the metrics (100 per page). 300 (the top 3 pages) mirrors what a shopper actually sees and is enough for reliable seller, price, and rating figures. Raise it for deeper niches or when using a narrow price band below.",
            "default": 300
          },
          "priceMinRub": {
            "title": "Price band: minimum (RUB)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Analyze only products priced at or above this amount, so you can size up the exact price segment you plan to sell in (for example, premium models only). Leave blank to include the whole niche. A narrow band may need a larger sample size above."
          },
          "priceMaxRub": {
            "title": "Price band: maximum (RUB)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Analyze only products priced at or below this amount. Combine with the minimum to focus on one price tier of the market. Leave blank for no upper limit."
          },
          "sort": {
            "title": "Which products to sample",
            "enum": [
              "popular",
              "rate",
              "priceup",
              "pricedown",
              "newly",
              "benefit"
            ],
            "type": "string",
            "description": "Which slice of the niche to sample. \"Popular\" (the default) reflects the products shoppers see first and gives the most representative market read. \"Newest\" helps gauge how much fresh competition is entering the niche.",
            "default": "popular"
          },
          "region": {
            "title": "Warehouse region",
            "enum": [
              "MOSCOW",
              "KRASNODAR",
              "NOVOSIBIRSK",
              "EKATERINBURGO",
              "KAZAHSTAN",
              "ST_PETERSBURG"
            ],
            "type": "string",
            "description": "Regional warehouse used for localized pricing and availability. Different regions can show different prices and stock levels.",
            "default": "MOSCOW"
          },
          "topN": {
            "title": "Top sellers/brands to list",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many of the leading sellers and brands to include in each niche row (ranked by product count), so you can see who dominates the market.",
            "default": 5
          },
          "debugLogging": {
            "title": "Verbose debug logs",
            "type": "boolean",
            "description": "Print per-niche aggregation details to the run log. Handy for troubleshooting; leave off for normal runs.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy is required: Wildberries returns HTTP 429 on unproxied requests. The shared datacenter group (the default) pages the search endpoint reliably with retries and is far cheaper than residential. Switch to residential only if datacenter starts getting blocked on very large runs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "BUYPROXIES94952"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}