{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Scraper - Wholesale Prices, MOQ, SKUs & Suppliers",
    "description": "Scrape 1688.com (Alibaba China wholesale) by keyword or offer URL: CNY quantity price tiers, MOQ and unit, full SKU matrix with stock, specs, images, supplier company, location and ratings. Search-only mode for cheap bulk listings. No login, no cookies to supply.",
    "version": "0.1",
    "x-build-id": "LR49BcULY9UamYgh6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ragnum~1688-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ragnum-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/ragnum~1688-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ragnum-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/ragnum~1688-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ragnum-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",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per line. Chinese keywords match best (e.g. 手机壳, 蓝牙耳机, 瑜伽垫, LED灯带, 包装盒); English works too. Each keyword is searched separately and returns up to 'Max results per keyword' products. Ignored when 'Offer IDs or URLs' is filled.",
            "items": {
              "type": "string"
            }
          },
          "offers": {
            "title": "Offer IDs or URLs",
            "type": "array",
            "description": "Specific offers to fetch: numeric offer IDs (e.g. 905559094884) or any 1688 offer link (detail.1688.com/offer/<id>.html, m.1688.com/offer/<id>.html, links with ?offerId=, qr.1688.com share links). When filled, keywords are ignored and every offer returns one full detail row, or an uncharged error row (INVALID_OFFER_ID, OFFER_UNAVAILABLE, RETRIEVAL_FAILED).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerKeyword": {
            "title": "Max results per keyword",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum products per keyword (1–2,000; 1688 search shows at most 2,000 results per keyword). Excluded and duplicate products don't count toward this limit and are never charged.",
            "default": 100
          },
          "maxResults": {
            "title": "Max results in total",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on the total number of products for the whole run, across all keywords or offers. Leave empty for no cap."
          },
          "includeDetails": {
            "title": "Include full product details",
            "type": "boolean",
            "description": "On (default): every product is opened for the full record — all quantity price tiers, unit, stock, specs, images, video, description, SKU summary, supplier location and ratings — charged as a 'product' result. Off: search-result fields only (title, price, MOQ, sales, supplier name), charged as the cheaper 'search-product' result. Offer IDs/URLs always use full details.",
            "default": true
          },
          "includeSkus": {
            "title": "Include the full SKU matrix",
            "type": "boolean",
            "description": "Adds every variant (color/size/model…) with its SKU ID, spec values, price, stock, image and weight. Needs full details. No extra charge.",
            "default": false
          },
          "language": {
            "title": "Language",
            "enum": [
              "zh",
              "en"
            ],
            "type": "string",
            "description": "zh (default) = titles, specs and variant names as listed on 1688, in Chinese. en = 1688's own English translation of titles, specs and variant names (other fields such as company names, locations and badges stay in Chinese). With en, 'titleOriginal' keeps the Chinese title in keyword searches. No extra charge.",
            "default": "zh"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "bestSelling",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "relevance"
          },
          "priceMin": {
            "title": "Minimum price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Only products whose listed price is at least this many yuan (CNY). Products outside the range are skipped and not charged."
          },
          "priceMax": {
            "title": "Maximum price (CNY)",
            "minimum": 0,
            "type": "number",
            "description": "Only products whose listed price is at most this many yuan (CNY)."
          },
          "province": {
            "title": "Supplier province",
            "type": "string",
            "description": "Only suppliers shipping from this province, in Chinese (e.g. 广东 or 广东省, 浙江, 福建). 1688 search has no location filter, so this is checked on each product page: it needs full details, and products from other provinces are skipped (not charged). Narrow filters can end a keyword early."
          },
          "city": {
            "title": "Supplier city",
            "type": "string",
            "description": "Only suppliers shipping from this city, in Chinese (e.g. 深圳, 义乌, 广州). Same rules as 'Supplier province'."
          },
          "merchantType": {
            "title": "Supplier type",
            "enum": [
              "any",
              "factory",
              "verified"
            ],
            "type": "string",
            "description": "any = all suppliers; factory = 1688 'Super Factory' suppliers only; verified = 'Certified Merchant' suppliers only.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude titles containing",
            "type": "array",
            "description": "Skip products whose title contains any of these words (case-insensitive). Skipped products are not charged and don't count toward the limits.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "proxyCountry": {
            "title": "Proxy country",
            "enum": [
              "CN",
              "HK",
              "US",
              "auto"
            ],
            "type": "string",
            "description": "Residential proxy location used for 1688 requests. CN (default) works best; HK and US are alternatives; auto spreads requests over all three.",
            "default": "CN"
          },
          "maxConcurrency": {
            "title": "Max parallel product pages",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many product pages are fetched in parallel (1–8). Lower it if you see many failed products.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}