{
  "openapi": "3.0.1",
  "info": {
    "title": "SMZDM Scraper - 什么值得买 Deals & Search",
    "description": "Scrape SMZDM (什么值得买): deal feed with prices, malls, brands, historical-low tags and votes, plus keyword search with built-in JS-challenge bypass. Filters for mall, price, category and price drops.",
    "version": "0.0",
    "x-build-id": "BGEXvQpmQheFMQ3Lx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/liver0914~smzdm-deals-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-liver0914-smzdm-deals-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/liver0914~smzdm-deals-scraper/runs": {
      "post": {
        "operationId": "runs-sync-liver0914-smzdm-deals-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/liver0914~smzdm-deals-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-liver0914-smzdm-deals-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": {
          "startUrls": {
            "title": "Deal detail URLs (optional)",
            "type": "array",
            "description": "Specific SMZDM deal URLs to scrape in full detail, e.g. https://www.smzdm.com/p/183861924/. When provided, search and the homepage feed are skipped. Filters below apply to feed and search modes only.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search SMZDM for these keywords (好价 deals channel) and scrape the result pages. search.smzdm.com hides behind a JS challenge, so searches run through a built-in headless browser (with automatic residential-proxy retry on the platform). When provided, the homepage feed is skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchMaxPages": {
            "title": "Search pages per keyword",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Max result pages per keyword (about 20 deals per page).",
            "default": 3
          },
          "faxianKeywords": {
            "title": "Faxian (发现) search keywords",
            "type": "array",
            "description": "Keywords to search in the SMZDM 发现 channel. Runs through search.smzdm.com with the faxian filter (the faxian site's own search form posts there); browser fallback handles the JS challenge automatically.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "faxianUrls": {
            "title": "Faxian listing URLs",
            "type": "array",
            "description": "Category/brand listing URLs from faxian.smzdm.com, e.g. https://faxian.smzdm.com/h1s0t0f163c0p1/ (the c0pN page segment is advanced automatically).",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "faxianMaxPages": {
            "title": "Faxian pages per keyword/URL",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Max listing pages per faxian keyword or URL (about 20 deals per page).",
            "default": 3
          },
          "maxItems": {
            "title": "Max deals from the feed",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many deals scraped from the homepage feed (20 per page).",
            "default": 100
          },
          "malls": {
            "title": "Malls (stores)",
            "type": "array",
            "description": "Keep only deals from these malls. Substring match: 天猫 covers 天猫精选/天猫超市/天猫国际官方直营, 京东 covers 京东全球购. Observed values: 京东, 京东全球购, 天猫精选, 天猫超市, 天猫国际官方直营, 拼多多, 唯品会 (~90% of the feed is 京东). Empty = all malls.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Keep only deals in these categories (substring match on any level of the category tree). Observed top-level values: 食品生鲜 (52%), 日用百货, 服饰鞋包, 电脑数码, 运动户外, 家居家装, 汽车消费, 游戏, 个护化妆, 医疗健康, 母婴用品. Empty = all categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only deals with a numeric price of at least this many yuan. 0 = no lower bound. Setting any price bound also drops unpriced posts (news, ~9% of the feed). Median feed deal is ¥26, P75 is ¥49.",
            "default": 0
          },
          "maxPrice": {
            "title": "Max price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Keep only deals with a numeric price of at most this many yuan. 0 = no upper bound. Setting any price bound also drops unpriced posts.",
            "default": 0
          },
          "onlyPriceDrops": {
            "title": "Only price drops (历史低价 / N天新低)",
            "type": "boolean",
            "description": "Keep only deals tagged as historical lows: 历史低价 or any N天新低 variant (~21% of the feed).",
            "default": false
          },
          "requireTags": {
            "title": "Required tags (any of)",
            "type": "array",
            "description": "Keep only deals carrying at least one of these tags (substring match). Frequent tags: 拼单 (29%), 京东自营 (28%), 每日白菜 (19%), 低于常卖价 (17%), 手慢无. Empty = no tag requirement.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minWorthy": {
            "title": "Min 值得 votes",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Keep only deals with at least this many 值得 (worthy) upvotes. Note votes accumulate over hours, so on a fresh feed most items have 0-2 votes - best used for backfill/snapshot runs, not fresh monitoring.",
            "default": 0
          },
          "minFavorite": {
            "title": "Min 收藏 favorites",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep only deals with at least this many 收藏 (favorites). Favorites track purchase intent (~3.5x the worthy votes in our sample); like votes they accumulate over hours.",
            "default": 0
          },
          "dedupeByTitle": {
            "title": "Skip same-product reposts",
            "type": "boolean",
            "description": "Skip reposts of the same product: ~5% of the feed is evergreen deals re-published under new article ids (same title after stripping marketing prefixes like 今日必买/值友专享). With skipSeenItems on, titles are remembered across runs too.",
            "default": false
          },
          "includeDetail": {
            "title": "Fetch detail pages",
            "type": "boolean",
            "description": "Additionally open each deal's page for the exact price, breadcrumb categories, author and top comments. Slower but richer.",
            "default": false
          },
          "maxCommentsPerDeal": {
            "title": "Max comments per deal",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit of comments saved per deal when detail pages are fetched.",
            "default": 30
          },
          "mallFilter": {
            "title": "Mall filter (legacy)",
            "type": "string",
            "description": "Legacy single-mall filter, exact name. Prefer the malls list above (substring matching). Empty = all malls.",
            "default": ""
          },
          "skipSeenItems": {
            "title": "Skip seen deals (monitoring mode)",
            "type": "boolean",
            "description": "Remember scraped deal IDs across runs and only output new deals. Ideal for scheduled monitoring runs.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests for detail pages (feed pagination is sequential by design).",
            "default": 2
          },
          "proxyConfig": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or custom proxies. Try direct first; if SMZDM's WAF blocks the run, residential proxy is used automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}