{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Scraper",
    "description": "1688 Scraper: Scrape 1688.com wholesale products by keyword (Chinese or English), category, supplier shop or product link: price, quantity price breaks, minimum order, variants, stock, sales, specs, photos, plus supplier name, location, years, ratings and badges.",
    "version": "0.1",
    "x-build-id": "OjDhgsDH6oIOOppJx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~1688-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-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/automly~1688-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automly-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/automly~1688-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automly-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": {
          "searchQueries": {
            "title": "Search keywords (Chinese or English)",
            "type": "array",
            "description": "What to search 1688 for, one keyword per line, e.g. phone case, 手机壳, wireless earbuds, 蓝牙耳机. Chinese keywords usually find the most products. Each keyword is searched separately and Max products applies to each one.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max products per search",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Most products to save for each keyword, category or shop, e.g. 100. Set 0 for every product 1688 lists (2,000 per sort order; past that, more are added from the other sort orders). Product links are always saved.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include full product details",
            "type": "boolean",
            "description": "Open each product's page and add quantity price breaks, minimum order, variants (colors, sizes) with their prices and stock, total sold, stock, specifications, all photos, video, rating, review count, ships-from city, dropshipping channels and the supplier's company name, type, service score and repeat-buyer rate. Turn off for a faster, cheaper list of search results. Product links always come with details.",
            "default": true
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "bestSelling",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Order of the search results, as on 1688: best match, best selling, or by price.",
            "default": "relevance"
          },
          "priceMin": {
            "title": "Minimum price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products from this unit price in Chinese yuan, e.g. 5. Leave empty for no minimum."
          },
          "priceMax": {
            "title": "Maximum price (CNY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products up to this unit price in Chinese yuan, e.g. 50. Leave empty for no maximum."
          },
          "province": {
            "title": "Supplier province",
            "type": "string",
            "description": "Only suppliers in this province, in Chinese, e.g. 广东 (Guangdong), 浙江 (Zhejiang), 江苏 (Jiangsu). Several with commas: 江苏,浙江,上海."
          },
          "city": {
            "title": "Supplier city",
            "type": "string",
            "description": "Only suppliers in this city, in Chinese without 市, e.g. 深圳 (Shenzhen), 广州 (Guangzhou), 义乌 (Yiwu)."
          },
          "categoryIds": {
            "title": "Categories",
            "type": "array",
            "description": "1688 category ids, e.g. 1031910 (dresses). Each gives the category's products. Every detailed product row carries its categoryId, so you can feed categories back here.",
            "items": {
              "type": "string"
            }
          },
          "shops": {
            "title": "Supplier shops",
            "type": "array",
            "description": "Supplier shop links or member ids, e.g. https://gdglove.1688.com or b2b-1674820511. Each gives the supplier's products. Every product row carries the supplier's shop link and member id.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Product links or offer IDs",
            "type": "array",
            "description": "1688 product links or offer ids, e.g. https://detail.1688.com/offer/617247852601.html or 617247852601. Search links (s.1688.com), shop links and category links work here too.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave the default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}