{
  "openapi": "3.0.1",
  "info": {
    "title": "1688 Reverse Image Search Scraper: Photo to Factory API 🇨🇳",
    "description": "⚡ Find direct Chinese manufacturers on 1688.com from any product photo (Amazon, Shopify, AliExpress, TikTok). Extract factory wholesale prices, MOQ, SKU matrices, and Amazon FBA weights in seconds (from $0.0015) with zero login.",
    "version": "1.0",
    "x-build-id": "DLBZKyfwTQcgpVmwI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unitbytes~1688-image-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unitbytes-1688-image-search-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/unitbytes~1688-image-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unitbytes-1688-image-search-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/unitbytes~1688-image-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unitbytes-1688-image-search-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": {
          "imageUrls": {
            "title": "Product Image URLs (Photo-to-Factory)",
            "type": "array",
            "description": "Paste one or more product image URLs (from Amazon, Shopify, AliExpress, TikTok Shop, eBay, or 1688) to find the original Chinese factories on 1688.com.",
            "items": {
              "type": "string"
            }
          },
          "imageFile": {
            "title": "Upload Product Photo (Local File)",
            "type": "string",
            "description": "Optional: Upload a local product photo (.jpg, .png, .webp) directly from your computer to match against 1688 factories."
          },
          "imagesBase64": {
            "title": "Base64 Images (API / ERP Automation)",
            "type": "array",
            "description": "Optional list of Base64-encoded image strings or data:image/... URIs for automated API/ERP visual sourcing pipelines.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Total Items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum total number of matching wholesale offers to scrape across all images (1 to 10,000).",
            "default": 30
          },
          "maxResultsPerImage": {
            "title": "Max Results Per Image (Optional)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Optional cap on how many matching 1688 factory offers to extract per input image when batch-processing multiple product photos."
          },
          "detailLevel": {
            "title": "Detail Level",
            "enum": [
              "full",
              "summary"
            ],
            "type": "string",
            "description": "Choose 'Full B2B Mode' for complete wholesale tiered volume prices, full color/size SKU variations, MOQ, Amazon FBA packaging weights, and verified factory audit badges, or 'Summary Mode' for fast visual match cards.",
            "default": "full"
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "normal",
              "booked"
            ],
            "type": "string",
            "description": "Sort visual matches by visual similarity ('normal') or highest factory sales volume ('booked').",
            "default": "normal"
          },
          "priceMin": {
            "title": "Min Price (¥ CNY)",
            "type": "integer",
            "description": "Minimum unit wholesale price in Chinese Yuan (CNY ¥). Server-side filtered natively by 1688."
          },
          "priceMax": {
            "title": "Max Price (¥ CNY)",
            "type": "integer",
            "description": "Maximum unit wholesale price in Chinese Yuan (CNY ¥). Server-side filtered natively by 1688."
          },
          "province": {
            "title": "Manufacturing Province",
            "enum": [
              "",
              "广东",
              "浙江",
              "江苏",
              "山东",
              "福建",
              "河北",
              "河南",
              "安徽",
              "湖北",
              "湖南",
              "四川",
              "江西"
            ],
            "type": "string",
            "description": "Filter by Chinese manufacturing province (e.g. '广东' for Guangdong/Shenzhen/Guangzhou, '浙江' for Zhejiang/Yiwu/Hangzhou, '江苏' for Jiangsu).",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs (1688 Visual Search or Direct Offer URLs)",
            "type": "array",
            "description": "Optional: Paste 1688 visual search URLs ('https://s.1688.com/youyuan/index.htm?tab=imageSearch&imageId=...'), direct product image links, or direct 1688 offer links.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "resumptionToken": {
            "title": "Resumption Token",
            "type": "string",
            "description": "Optional encrypted resumption token copied from a previous run, Key-Value store, or dataset item. Restores the exact session and continues scraping directly from where it left off."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy configuration for fast worldwide access. Apify Residential proxy is recommended for high-volume extraction.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}