{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Scraper 阿里巴巴货源: Products, SKU Prices, Reviews, Categories",
    "description": "Scrape 1688.com wholesale: products, every SKU variant with its own price and live stock, the full MOQ price ladder, buyer reviews and the category tree. Search in Chinese or English (蓝牙耳机 or bluetooth earphone) and get English titles back. Supplier data and SKU variants included at no extra charge.",
    "version": "0.0",
    "x-build-id": "XloofznpPYbHmSOjz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~1688-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-1688-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/sourabhbgp~1688-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-1688-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/sourabhbgp~1688-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-1688-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": "What to scrape",
            "enum": [
              "search",
              "product_detail",
              "reviews",
              "category_browse"
            ],
            "type": "string",
            "description": "Pick one job per run. search finds products by keyword. product_detail takes offer IDs or product URLs and returns the full record including the SKU variant matrix. reviews returns buyer reviews for an offer. category_browse returns the 1688 category tree, or only the branches you list.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, English or Chinese. Each keyword is searched separately and every row carries the keyword that produced it. Used by search mode only.",
            "items": {
              "type": "string"
            }
          },
          "sortType": {
            "title": "Sort order",
            "enum": [
              "normal",
              "va_sales360",
              "price",
              "priceDesc"
            ],
            "type": "string",
            "description": "Order of search results. Recommended is the 1688 default ranking, Orders sorts by units sold in the last 360 days, Price sorts by price, low to high or high to low.",
            "default": "normal"
          },
          "includeDetails": {
            "title": "Add full product details",
            "type": "boolean",
            "description": "Search mode only. Each result also gets the product page's data: the MOQ price ladder, every SKU variant, specifications, stock, shipping fee, package size and supplier detail. The search card's price, images and links stay as they are. Much slower (15 to 90 seconds per product) and needs the proxy option. Same price per row.",
            "default": false
          },
          "merchantType": {
            "title": "Supplier tier",
            "enum": [
              "any",
              "superFactory",
              "certifiedMerchant"
            ],
            "type": "string",
            "description": "Restrict search results to a verified supplier tier. Any applies no restriction.",
            "default": "any"
          },
          "supplierYears": {
            "title": "Minimum years on 1688",
            "enum": [
              "any",
              "5",
              "7",
              "10"
            ],
            "type": "string",
            "description": "Keep only suppliers that have traded on 1688 for at least this long. A longer history is one of the few durable trust signals 1688 publishes.",
            "default": "any"
          },
          "fastShippingOnly": {
            "title": "Fast dispatch only",
            "type": "boolean",
            "description": "Keep only offers the supplier commits to dispatching within 24 to 48 hours.",
            "default": false
          },
          "certifications": {
            "title": "Required certifications",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only products carrying these compliance certificates. With several, a product must carry all of them. Essential for importing into the EU, UK and US. Leave empty to apply no certificate filter.",
            "items": {
              "type": "string",
              "enum": [
                "CE",
                "RoHS",
                "FCC",
                "MSDS",
                "UL",
                "CPC",
                "TUV_PCOC",
                "UKCA",
                "CB",
                "KC",
                "FSC"
              ]
            },
            "default": []
          },
          "offerIds": {
            "title": "Offer IDs or product URLs",
            "type": "array",
            "description": "1688 offer IDs such as 617247852601, or full product URLs such as https://detail.1688.com/offer/617247852601.html. Used by product_detail and reviews modes.",
            "items": {
              "type": "string"
            }
          },
          "includeSkuDetails": {
            "title": "Include SKU variant matrix",
            "type": "boolean",
            "description": "Return every variant with its own price, discount price, live stock, spec attributes and photo where 1688 has one. On by default: the per variant price is usually the number you actually need.",
            "default": true
          },
          "includeDescriptionHtml": {
            "title": "Include description HTML",
            "type": "boolean",
            "description": "Add the raw supplier description markup to each product_detail row. Large, so it is off by default.",
            "default": false
          },
          "reviewFilter": {
            "title": "Review filter (reviews)",
            "enum": [
              "all",
              "withText",
              "withPhotos",
              "positive",
              "neutral",
              "negative"
            ],
            "type": "string",
            "description": "reviews mode only. Which reviews to return: all of them, only reviews with text (1688's own filter, a few automatic five-star texts still pass), only ones with photos, or only positive, neutral or negative ones.",
            "default": "all"
          },
          "reviewSort": {
            "title": "Review order (reviews)",
            "enum": [
              "recommended",
              "newest"
            ],
            "type": "string",
            "description": "reviews mode only. Recommended is 1688's own order; Newest sorts by review date, newest first.",
            "default": "recommended"
          },
          "priceMin": {
            "title": "Minimum price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest unit price to accept, in yuan. In search it is checked against the price on the search card, in product_detail against the product's lowest price. Rows filtered out by price are never charged."
          },
          "priceMax": {
            "title": "Maximum price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest unit price to accept, in yuan. In search it is checked against the price on the search card, in product_detail against the product's lowest price. Rows filtered out by price are never charged."
          },
          "minOrderQuantity": {
            "title": "Maximum acceptable MOQ",
            "minimum": 1,
            "type": "integer",
            "description": "Drop offers whose minimum order quantity is above this number. Set it to the largest first order you are willing to place."
          },
          "categoryIds": {
            "title": "Category IDs (category_browse)",
            "type": "array",
            "description": "Optional, category_browse mode only. Return these categories and everything under them instead of the whole tree, for example 54. Use it to reach the deeper levels: a whole-tree run is capped at 1,000 categories. Take the IDs from the categoryId field of an earlier category_browse run.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on rows for this run, counted across all keywords or offers. You are only charged for rows actually delivered. The category tree mode is capped at 1000 categories per run.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Required for the product_detail and reviews modes: 1688 blocks product pages from Apify's own address, so those modes need a proxy to work at all. The search and category_browse modes do not need one.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}