{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Image Search Scraper: Find Offers by Photo",
    "description": "Search Alibaba.com by photo, no login: paste an image link or upload a photo and get the offers Alibaba's own image search matches. Each row: title, price, MOQ, units sold, ad flag, supplier, country, years, Verified, rating. Filters, find similar, product details. JSON, CSV, API; pay per offer.",
    "version": "0.1",
    "x-build-id": "mFAjqKVNIPrsdh9nL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~alibaba-image-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-alibaba-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/automation_craft~alibaba-image-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-alibaba-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/automation_craft~alibaba-image-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-alibaba-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": "Photo links",
            "type": "array",
            "description": "Product photos to search by, one per line: a public https:// or http:// link to a JPEG, PNG, WEBP, GIF, AVIF or TIFF image (up to 12 MB and 40 million pixels; AVIF up to 4 million), or a data URL (data:image/jpeg;base64,...). The Actor reads each photo itself and uploads it to Alibaba.com's own image search, the way its search bar does; the matching is Alibaba's own. Up to 100 photos a run.",
            "items": {
              "type": "string"
            }
          },
          "imageFile": {
            "title": "Or upload a photo",
            "type": "string",
            "description": "One product photo from your computer, searched like a photo link. Works on its own or together with the links."
          },
          "productUrls": {
            "title": "Find similar to these products",
            "type": "array",
            "description": "Alibaba product links (alibaba.com/product-detail/..._<id>.html) or bare product ids: each gives Alibaba's own \"find similar\" matches for that product, no photo needed. Up to 100.",
            "items": {
              "type": "string"
            }
          },
          "searchText": {
            "title": "Words with the photo",
            "type": "string",
            "description": "Optional words sent with every photo (Alibaba's own text plus image search), for example \"leather\" or \"wireless\". They narrow the matches and can outweigh the photo: a shoe photo with \"bicycle\" returns bicycles."
          },
          "searchAllObjects": {
            "title": "Search every object in the photo",
            "type": "boolean",
            "description": "Alibaba's detector finds up to 4 objects in a photo and searches the first by default. On: one search per object found, each object's matches named on its rows (objectIndex, objectRegion). Each search bills its own Image search event.",
            "default": false
          },
          "objectIndex": {
            "title": "Object to search",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Search this object of each photo, by the order of Alibaba's own detector (1 to 4; 1 is the object Alibaba searches by default). A photo with fewer objects gets a free row. Not with \"Search every object\"."
          },
          "cropBox": {
            "title": "Crop box",
            "type": "string",
            "description": "Search one part of each photo: \"x,y,width,height\" in whole pixels of the original photo, for example \"120,40,300,300\". The Actor cuts that part before the upload. Not with \"Search every object\"."
          },
          "maxResultsPerImage": {
            "title": "Matches per photo",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most offers one search delivers (1 to 1,000): per photo, per object with \"Search every object\", per product for similar offers. Alibaba reports a few hundred to a few thousand matches a photo.",
            "default": 20
          },
          "maxPagesPerImage": {
            "title": "Pages per photo",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "The most results pages one search reads (1 to 50; a page holds up to 200 matches). Left out: as many as the matches asked need."
          },
          "maxItems": {
            "title": "Offers per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most offer rows of the whole run (1 to 100,000), shared fairly between the searches.",
            "default": 1000
          },
          "onePerSupplier": {
            "title": "One row per supplier",
            "type": "boolean",
            "description": "On: each search delivers one row per supplier, its best placed match, with supplierMatches counting how many of that supplier's offers matched on the pages read. Off: every matched offer is a row.",
            "default": false
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "best_match",
              "price_low",
              "price_high",
              "units_sold"
            ],
            "type": "string",
            "description": "Alibaba's own order, or an order the run makes: the search reads up to 500 matches in one call and delivers the first \"Matches per photo\" of that order (labelled sortedBy on every row, with the value it was ordered by in sortValue). The order uses the search card's price (the LOW end of its range, for both price orders) or units sold; with product details on, a row's price fields come from its product page and can differ. Alibaba's image search has no sort of its own."
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Offers priced at or above this many US dollars (Alibaba's own price filter; a row whose price range touches the asked range passes). Needs currency USD."
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Offers priced at or below this many US dollars. Needs currency USD."
          },
          "maxMoq": {
            "title": "Maximum minimum order",
            "minimum": 1,
            "maximum": 100000000,
            "type": "integer",
            "description": "Offers whose minimum order is at most this quantity (1 to 100,000,000)."
          },
          "verifiedOnly": {
            "title": "Verified suppliers only",
            "type": "boolean",
            "description": "Suppliers whose credentials a third party inspected (Alibaba's Verified filter; Verified Pro suppliers included)."
          },
          "verifiedProOnly": {
            "title": "Verified Pro suppliers only",
            "type": "boolean",
            "description": "Alibaba's Verified Pro suppliers only."
          },
          "manufacturersOnly": {
            "title": "Manufacturers only",
            "type": "boolean",
            "description": "Alibaba's manufacturers only filter. The match card does not show it, so ads are left out under it."
          },
          "tradeAssuranceOnly": {
            "title": "Trade Assurance only",
            "type": "boolean",
            "description": "Offers under Alibaba's Trade Assurance. Ads are left out under it."
          },
          "guaranteedOnly": {
            "title": "Alibaba Guaranteed only",
            "type": "boolean",
            "description": "Offers with Alibaba Guaranteed (fixed price and delivery dates)."
          },
          "readyToShipOnly": {
            "title": "Ready to ship only",
            "type": "boolean",
            "description": "Offers you can order at once (Alibaba's instant order filter). Ads are left out under it."
          },
          "fastCustomizationOnly": {
            "title": "Fast customization only",
            "type": "boolean",
            "description": "Offers with Alibaba's fast customization mark."
          },
          "productCertification": {
            "title": "Product certification",
            "type": "string",
            "description": "One certification name the offer must carry, for example CE, ROHS, FCC or FSC (Alibaba's own certification filter)."
          },
          "maxDeliveryDays": {
            "title": "Delivered within (days)",
            "minimum": 18,
            "maximum": 365,
            "type": "integer",
            "description": "Offers Alibaba promises to deliver within this many days (18 or more): Alibaba's 18, 24 and 30 day filters, the largest at or under the value is used. Ads are left out under it."
          },
          "minYearsOnAlibaba": {
            "title": "Minimum years on Alibaba",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Suppliers on Alibaba for at least this many years (1 to 50), checked on every row."
          },
          "categoryId": {
            "title": "Category",
            "type": "string",
            "description": "One Alibaba category: its id (for example 100005429) or a category link (alibaba.com/catalog/..._cid<id>). Ads are left out under it."
          },
          "outsideChinaOnly": {
            "title": "Suppliers outside China only",
            "type": "boolean",
            "description": "Alibaba's Worldwide view: offers of suppliers outside mainland China."
          },
          "supplierCountries": {
            "title": "Supplier countries",
            "type": "array",
            "description": "Only suppliers in these countries: ISO codes or English names, up to 20 (checked on the row; Alibaba's image search has no country filter).",
            "items": {
              "type": "string"
            }
          },
          "minStoreRating": {
            "title": "Minimum store rating",
            "minimum": 0.1,
            "maximum": 5,
            "type": "number",
            "description": "Suppliers whose store rating is at least this (0.1 to 5); a supplier without a rating is left out."
          },
          "excludeAds": {
            "title": "Leave out ads",
            "type": "boolean",
            "description": "Leave out sponsored offers (free)."
          },
          "excludeTitleWords": {
            "title": "Leave out titles with these words",
            "type": "array",
            "description": "Offers whose title holds any of these words or phrases as whole words (case and accents ignored), up to 20.",
            "items": {
              "type": "string"
            }
          },
          "excludeSupplierIds": {
            "title": "Leave out these suppliers",
            "type": "array",
            "description": "Alibaba company ids (the supplier.id of a row) to leave out, up to 100,000. An offer whose card names no company id (about one in ten) is left out too, free: it cannot be shown to be another supplier.",
            "items": {
              "type": "string"
            }
          },
          "includeProductDetails": {
            "title": "Product details",
            "type": "boolean",
            "description": "Read each offer's product page: the quantity price ladder and the unit price at the minimum order, attributes, variants and their prices, lead times, packaging, sample, certifications, the supplier's verification. Billed as Product detail per row that carries it; a page that cannot be read is free and the row comes without it.",
            "default": false
          },
          "includeCompanyProfile": {
            "title": "Company profile",
            "type": "boolean",
            "description": "Read the supplier's store home page: year established, employees, factory size, revenue, main markets, certifications, the inspection company that verified it, contact people. Billed as Company profile once per supplier in a run; later rows of the same supplier carry it free.",
            "default": false
          },
          "includeRawCard": {
            "title": "Raw match card",
            "type": "boolean",
            "description": "Add Alibaba's own match card as served (raw, free).",
            "default": false
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "INR",
              "BRL",
              "MXN",
              "AED",
              "SAR",
              "JPY",
              "KRW",
              "SGD",
              "ZAR",
              "RUB",
              "TRY"
            ],
            "type": "string",
            "description": "The currency Alibaba shows prices in (its own site setting; prices are never converted by the Actor). The price filters and price orders need USD."
          },
          "language": {
            "title": "Language",
            "enum": [
              "en_US",
              "es_ES",
              "fr_FR",
              "de_DE",
              "pt_PT",
              "ja_JP",
              "ru_RU",
              "ar_SA",
              "ko_KR",
              "zh_CN"
            ],
            "type": "string",
            "description": "The language of Alibaba's titles (its own site language)."
          },
          "shipToCountry": {
            "title": "Buyer country",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "BE",
              "SE",
              "PL",
              "CH",
              "AT",
              "IE",
              "DK",
              "NO",
              "FI",
              "PT",
              "GR",
              "CZ",
              "RO",
              "HU",
              "IN",
              "JP",
              "KR",
              "HK",
              "SG",
              "MY",
              "TH",
              "VN",
              "ID",
              "PH",
              "AE",
              "SA",
              "TR",
              "IL",
              "CA",
              "MX",
              "BR",
              "AR",
              "CL",
              "CO",
              "PE",
              "AU",
              "NZ",
              "ZA",
              "NG",
              "EG",
              "KE",
              "PK",
              "BD",
              "UA",
              "TW",
              "CN",
              "VE",
              "EC",
              "UY",
              "BG",
              "HR",
              "SK",
              "SI",
              "LT",
              "LV",
              "EE",
              "LK",
              "QA",
              "KW",
              "BH",
              "OM",
              "JO",
              "MA",
              "GH"
            ],
            "type": "string",
            "description": "The country Alibaba shows the offers for (its own site setting: totals and offers differ by country). Left out: the United States."
          },
          "feedback": {
            "title": "Feedback",
            "type": "string",
            "description": "A note for the developer (at most 2,000 characters), kept in the run's key-value store and never shown in the results."
          },
          "extendOutputFunction": {
            "title": "Extend output function",
            "type": "string",
            "description": "Optional JavaScript (row) => ({...}) run on each delivered row in a sealed process; its result is the row's custom field."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Left empty: the run's own address, with one Apify datacenter session as the fallback. Apify datacenter proxy only (no residential)."
          },
          "maxRequestRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times a failed request is asked again (0 to 5).",
            "default": 2
          },
          "maxRunSeconds": {
            "title": "Time limit (seconds)",
            "minimum": 30,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop the run after this many seconds (30 to 86,400), delivering what was read."
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "More detail in the run log.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}