{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Product & Supplier Scraper (Reverse Image Search)",
    "description": "Find real Alibaba suppliers behind any product using text or image search. Extract supplier data, pricing, MOQ, and product links at scale.",
    "version": "0.0",
    "x-build-id": "0cK6GEnZJhKRpL7fT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/toolsnmoreapi~Alibaba-Product-and-Vender-Finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-toolsnmoreapi-Alibaba-Product-and-Vender-Finder",
        "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/toolsnmoreapi~Alibaba-Product-and-Vender-Finder/runs": {
      "post": {
        "operationId": "runs-sync-toolsnmoreapi-Alibaba-Product-and-Vender-Finder",
        "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/toolsnmoreapi~Alibaba-Product-and-Vender-Finder/run-sync": {
      "post": {
        "operationId": "run-sync-toolsnmoreapi-Alibaba-Product-and-Vender-Finder",
        "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": [
          "searchMode"
        ],
        "properties": {
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "text",
              "image"
            ],
            "type": "string",
            "description": "Choose how you want to search Alibaba. Text search uses keywords only. Image search uses uploaded product images.",
            "default": "text"
          },
          "searchTerms": {
            "title": "Keywords to search",
            "maxItems": 50,
            "type": "array",
            "description": "Use this section only when Search mode is Text search. Add one product keyword per line.",
            "default": [
              "portable blender"
            ],
            "items": {
              "type": "string"
            }
          },
          "uploadedImages": {
            "title": "Upload product images",
            "maxItems": 20,
            "type": "array",
            "description": "Use this section when Search mode is Image search. Upload up to 20 product images.",
            "default": []
          },
          "imageUrls": {
            "title": "Or paste image URLs",
            "maxItems": 20,
            "type": "array",
            "description": "Optional alternative to uploading files. Paste public image URLs, one per line.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "csvOutputMode": {
            "title": "CSV output mode",
            "enum": [
              "combined",
              "separate",
              "both"
            ],
            "type": "string",
            "description": "Choose how CSV files should be saved.",
            "default": "combined"
          },
          "cookies": {
            "title": "Alibaba cookies",
            "type": "array",
            "description": "Optional. Paste Alibaba browser cookies as JSON only if you know you need them.",
            "default": []
          },
          "maxUniqueSuppliers": {
            "title": "Suppliers to return per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum unique suppliers returned per keyword or per image.",
            "default": 3
          },
          "maxPagesText": {
            "title": "Text result pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum Alibaba result pages to scrape per keyword in Text search mode.",
            "default": 1
          },
          "maxPagesImage": {
            "title": "Image result pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum Alibaba result pages to scrape per image.",
            "default": 1
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Off by default. Chrome cannot reliably use authenticated Apify Proxy URLs with --proxy-server unless proxy authentication is implemented separately.",
            "default": false
          },
          "headless": {
            "title": "Headless browser",
            "type": "boolean",
            "description": "Run Chrome without a visible browser window.",
            "default": true
          },
          "blockImages": {
            "title": "Block page images",
            "type": "boolean",
            "description": "Speeds up result scraping after Alibaba search results load. Keep disabled if Alibaba cards fail to render.",
            "default": false
          },
          "saveCsvFile": {
            "title": "Save CSV output",
            "type": "boolean",
            "description": "Save CSV files in the key-value store in addition to pushing results to the default dataset.",
            "default": false
          },
          "csvFilename": {
            "title": "Combined CSV filename",
            "type": "string",
            "description": "Name of the combined CSV file saved by the actor.",
            "default": "alibaba_results.csv"
          },
          "userAgent": {
            "title": "Custom user agent",
            "type": "string",
            "description": "Optional custom browser user agent.",
            "default": ""
          },
          "skipFailedImages": {
            "title": "Skip failed image downloads",
            "type": "boolean",
            "description": "If enabled, failed image downloads are skipped instead of failing the whole run.",
            "default": true
          },
          "failOnNoResults": {
            "title": "Fail when no results are found",
            "type": "boolean",
            "description": "If disabled, the actor succeeds with an empty dataset when Alibaba returns no results or blocks the page.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}