{
  "openapi": "3.0.1",
  "info": {
    "title": "Weidian Scraper: 微店 Product & Shop Data",
    "description": "Scrape Weidian (微店) product listings and merchant shop data by item URL or shop URL. Get price, sales count, stock, images, SKU variants, and shop rating for cross-border sourcing and competitive intelligence.",
    "version": "0.1",
    "x-build-id": "jiLieLPPiILQt49o1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~weidian-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-weidian-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/getascraper~weidian-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-weidian-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/getascraper~weidian-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-weidian-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": {
          "itemUrls": {
            "title": "Item URLs or IDs",
            "type": "array",
            "description": "One or more Weidian product URLs (weidian.com/item.html?itemID=...) or bare numeric item IDs. Each returns full product data: name, price, stock, sales count, images, and SKU variants.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "shopUrls": {
            "title": "Shop URLs or IDs",
            "type": "array",
            "description": "One or more Weidian shop URLs (weidian.com/?userid=...) or bare numeric shop IDs. Returns the shop profile (name, rating, repurchase rate, followers) and attempts to enumerate the shop's product catalog.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "fetchShopCatalog": {
            "title": "Fetch Shop Catalog",
            "type": "boolean",
            "description": "For each shop, attempt to enumerate its product catalog via Weidian's shop-category API. This call is best-effort: some shop layouts may not return catalog data, in which case the shop profile is still returned on its own. Disable to only fetch shop profile data (faster, fewer requests).",
            "default": true
          },
          "includeSkuVariants": {
            "title": "Include SKU Variants",
            "type": "boolean",
            "description": "Include the per-variant breakdown (size/color/style options with their own price and stock) for each item.",
            "default": true
          },
          "includeShopProfile": {
            "title": "Include Shop Profile",
            "type": "boolean",
            "description": "Push a shop-profile row (name, rating, repurchase rate, followers, location) for each shop in Shop URLs or IDs. Disable if you only want catalog/item rows.",
            "default": true
          },
          "enrichCatalogItems": {
            "title": "Enrich Catalog Items with Full Detail",
            "type": "boolean",
            "description": "When a shop's catalog is enumerated, fetch the full item-detail page for each product found (adds images, SKU variants, and delivery info) instead of only the lightweight catalog row (name, price, stock, thumbnail). Uses more requests.",
            "default": true
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of rows (items, shops, and catalog rows combined) to push before stopping. Set to 0 for no limit.",
            "default": 100
          },
          "maxCatalogPagesPerShop": {
            "title": "Max Catalog Pages per Shop",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of catalog pages (20 items per page) to fetch per shop when Fetch Shop Catalog is enabled.",
            "default": 5
          },
          "sinceItemId": {
            "title": "Since Item ID",
            "minimum": 0,
            "type": "integer",
            "description": "Skip catalog items with a numeric item ID at or below this value. Useful for one-off incremental pulls when you already know the highest item ID from a previous run. Leave at 0 to include everything.",
            "default": 0
          },
          "onlyNewItems": {
            "title": "Only New Items (Recurring Runs)",
            "type": "boolean",
            "description": "For scheduled/recurring runs: remember which catalog item IDs were already returned for each shop (persisted in the Actor's key-value store) and only push items not seen in a previous run. Ideal for price/stock-churn monitoring without re-downloading the whole catalog every time.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of parallel requests.",
            "default": 5
          },
          "requestDelayMs": {
            "title": "Request Delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Extra delay before each request, on top of normal crawler pacing. Increase if you plan to scrape many shops in one run and want to stay conservative against Weidian's soft bot-tracking signals.",
            "default": 0
          },
          "debugLogging": {
            "title": "Debug Logging",
            "type": "boolean",
            "description": "Enable verbose per-step logging, including raw catalog API responses when they don't parse as expected.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Datacenter Apify Proxy is the default and was sufficient for every endpoint tested during feasibility recon (no IP-reputation gating observed). Switch to residential only if you see blocks at high volume.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}