{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Scraper — Products, MOQ, Tiered Pricing & Suppliers",
    "description": "No-login Alibaba.com B2B scraper: product search, full details (MOQ, tiered/ladder pricing, SKU variants, specs, certifications, images/video), and supplier profiles (years, employees, response time, on-time delivery, trade assurance, ratings). HTTP-first via Apify Residential.",
    "version": "0.0",
    "x-build-id": "kdNyKqfA5s5L35yWP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brilliant_gum~alibaba-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brilliant_gum-alibaba-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/brilliant_gum~alibaba-scraper/runs": {
      "post": {
        "operationId": "runs-sync-brilliant_gum-alibaba-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/brilliant_gum~alibaba-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-brilliant_gum-alibaba-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Modes",
            "type": "array",
            "description": "What to scrape. 'search' runs each search term / search URL and returns one product record per offer card (MOQ, price range, supplier, ratings). 'product-details' fetches the full product record (tiered/ladder pricing, MOQ, SKU variants, specifications, certifications, images/video, seller) for each product URL / ID. 'supplier-company' returns a supplier/company profile (years, employees, response time, on-time delivery, trade assurance, transaction volume, ratings) for each supplier URL / company ID. 'reviews' attaches available review aggregates (product & store rating, review counts, rating breakdown) to the resolved products. Modes can be combined.",
            "items": {
              "type": "string",
              "enum": [
                "search",
                "product-details",
                "supplier-company",
                "reviews"
              ],
              "enumTitles": [
                "Product search",
                "Product details",
                "Supplier / company",
                "Reviews (aggregates)"
              ]
            },
            "default": [
              "search"
            ]
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Alibaba.com (e.g. \"bluetooth speaker\", \"cnc machine\"). Search mode only. Each term is paginated (about 48 offers per page).",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Ready-made Alibaba.com search URLs (https://www.alibaba.com/trade/search?SearchText=...). Used verbatim and paginated. Advanced alternative to searchTerms.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Alibaba.com URLs to scrape. Product URLs (/product-detail/..._<id>.html) feed product-details/reviews; search URLs (/trade/search?...) are paginated in search mode; supplier minisite URLs (https://<company>.en.alibaba.com/) feed supplier-company mode.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Direct Alibaba.com product URLs as plain strings (https://www.alibaba.com/product-detail/..._<id>.html). Used by product-details and reviews modes.",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "title": "Product IDs",
            "type": "array",
            "description": "Bare numeric Alibaba product/offer IDs (e.g. 1601787130500). Used by product-details and reviews modes. Alias: itemIds.",
            "items": {
              "type": "string"
            }
          },
          "supplierUrls": {
            "title": "Supplier / company URLs",
            "type": "array",
            "description": "Alibaba supplier minisite URLs or subdomains (https://<company>.en.alibaba.com/, or just the bare <company>.en.alibaba.com subdomain). Used by supplier-company mode. The full supplier profile is resolved from the supplier's public minisite and product listings. A minisite subdomain is required: a bare company ID cannot be resolved to a subdomain, so company IDs are not accepted as a standalone input.",
            "items": {
              "type": "string"
            }
          },
          "categoryId": {
            "title": "Category ID filter",
            "type": "string",
            "description": "Optional Alibaba category ID to narrow keyword search (appended as &categoryId=). Leave empty to search all categories."
          },
          "maxItems": {
            "title": "Max products per query",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum products per search term / search URL. 0 = all available (safety-capped at 3000). Also caps products emitted per supplier in supplier-company mode.",
            "default": 0
          },
          "maxSearchPages": {
            "title": "Max search pages",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum search result PAGES to fetch per query (about 48 offers per page). 0 = until maxItems reached or no more results (Alibaba caps at 100 pages).",
            "default": 0
          },
          "sortBy": {
            "title": "Search sort",
            "enum": [
              "default",
              "orders",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Sort order for search results. Best-effort: mapped to Alibaba's sort parameter (default best-match, or price/orders). Alibaba may ignore unsupported sorts for some queries.",
            "default": "default"
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products at or above this unit price (in the result currency). Passed to Alibaba (pricef) and applied to output using the product's low tier price."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products at or below this unit price (in the result currency). Passed to Alibaba (pricet) and applied to output."
          },
          "verifiedSupplierOnly": {
            "title": "Verified / gold suppliers only",
            "type": "boolean",
            "description": "Keep only offers from verified / gold suppliers (offers exposing a gold-supplier badge or years). Applied to search output.",
            "default": false
          },
          "tradeAssuranceOnly": {
            "title": "Trade Assurance only",
            "type": "boolean",
            "description": "In product-details, keep only products whose supplier offers Trade Assurance. Applied to output.",
            "default": false
          },
          "alibabaGuaranteed": {
            "title": "Alibaba Guaranteed only",
            "type": "boolean",
            "description": "Search mode only: return only 'Alibaba Guaranteed' (formerly 'Guaranteed') offers, i.e. orders backed by Alibaba's end-to-end guarantee. Applies Alibaba's own halfTrust=true search facet and keeps only offers carrying the Alibaba Guaranteed badge. Every product record also exposes an isAlibabaGuaranteed boolean regardless of this flag.",
            "default": false
          },
          "fetchProductDetails": {
            "title": "Fetch full product details",
            "type": "boolean",
            "description": "In search mode, enrich each result with the full product page: tiered/ladder pricing, exact MOQ, SKU variants, full specifications, certifications, image gallery + video, lead time and the full seller profile. Turn off for a faster/cheaper lightweight card (id, title, url, price range, MOQ, supplier, ratings from the search card). Alias: enrichListingDetails.",
            "default": true
          },
          "fetchSupplierDetails": {
            "title": "Fetch supplier profile",
            "type": "boolean",
            "description": "Also emit a separate supplier/company record for each distinct supplier encountered (years, employees, response time, on-time delivery, trade assurance, transaction volume, business type, ratings). In search/product modes this is off by default; in supplier-company mode it is always on.",
            "default": false
          },
          "includeReviews": {
            "title": "Include review aggregates",
            "type": "boolean",
            "description": "Attach a review-aggregates object inline on every product record: product rating & review count, store rating & count, supplier rating breakdown, and any review snippets embedded in the page (in the product record's 'reviews' field). Works in search and product-details modes without needing the separate 'reviews' mode. NOTE: Alibaba.com does not expose individual buyer review text without login, so this returns aggregates/snippets only (see README).",
            "default": false
          },
          "shipToCountry": {
            "title": "Ship-to country",
            "type": "string",
            "description": "Two-letter ISO ship-to country code (e.g. US, GB, DE). Sets the shipping/pricing context. The proxy country is pinned to match so prices stay in the chosen currency.",
            "default": "US"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Three-letter currency code for prices (e.g. USD, EUR, GBP). Alibaba localizes prices to the proxy country; USD is returned for a US context.",
            "default": "USD"
          },
          "language": {
            "title": "Language / locale",
            "type": "string",
            "description": "Language/locale for titles and text (e.g. en_US, de_DE). Set via Alibaba's locale cookie.",
            "default": "en_US"
          },
          "deduplicate": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Drop records whose dedupKey was already produced (within run, and across runs if a key store is set).",
            "default": true
          },
          "deduplicateKeyStore": {
            "title": "Cross-run dedup key store",
            "type": "string",
            "description": "Named key-value store to persist seen dedupKeys (and product prices) across scheduled runs. Empty = in-run dedup only."
          },
          "monitoringMode": {
            "title": "Monitoring mode (new / changed only)",
            "type": "boolean",
            "description": "Output only products that are new or whose price changed since the previous run (requires a dedup key store). Great for price/MOQ monitoring.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Parallel product/supplier targets. Keep moderate (3-8) for reliable extraction.",
            "default": 5
          },
          "maxChallengeRetries": {
            "title": "Max challenge retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries with a fresh proxy session on a temporary block, 403, 5xx or timeout. A few retries are normal.",
            "default": 6
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxies are included and configured automatically — leave the default in place. The proxy country is auto-pinned to the ship-to country for correct localized pricing.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}