{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Supplier Catalogue",
    "description": "Export any Alibaba supplier's whole catalogue as one clean table: every product with its published price band, minimum order and unit, catalogue group, certificates and today's discount. Every row carries the supplier id, so it joins straight to your supplier list.",
    "version": "0.0",
    "x-build-id": "2SgunP82r7vaAHMv8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~alibaba-supplier-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-alibaba-supplier-products-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/apt_marble~alibaba-supplier-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-alibaba-supplier-products-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/apt_marble~alibaba-supplier-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-alibaba-supplier-products-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": [
          "supplierUrls"
        ],
        "properties": {
          "supplierUrls": {
            "title": "Supplier storefronts",
            "type": "array",
            "description": "The storefront address of each supplier whose catalogue you want, for example https://jianha.en.alibaba.com/. The short name on its own works too. Up to 10 suppliers per run.",
            "default": [
              "https://jianha.en.alibaba.com/"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchText": {
            "title": "Search inside the catalogue",
            "type": "string",
            "description": "Optional. Return only the supplier's products matching this term, using the supplier's own in-store search. Leave empty for the whole catalogue."
          },
          "maxProductsPerSupplier": {
            "title": "Maximum products per supplier",
            "minimum": 1,
            "maximum": 6400,
            "type": "integer",
            "description": "How many products to collect from each supplier. Large catalogues are collected in order, newest first, and the run tells you exactly where it stopped.",
            "default": 100
          },
          "country": {
            "title": "Country to read from",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "PL",
              "CA",
              "AU",
              "BR",
              "MX",
              "SA",
              "AE",
              "IL",
              "KR",
              "JP",
              "IN",
              "SG",
              "ZA"
            ],
            "type": "string",
            "description": "Which country's version of the site to read. Supplier catalogues publish their asking prices in US dollars for every country, so this changes the storefront you see rather than the currency.",
            "default": "US"
          },
          "onlyPricedProducts": {
            "title": "Only products with a published price",
            "type": "boolean",
            "description": "Drop products where the supplier publishes no price and invites an enquiry instead. Off by default, so those products are returned and marked as quote-on-request.",
            "default": false
          },
          "onlyReadyToShip": {
            "title": "Only ready-to-ship products",
            "type": "boolean",
            "description": "Keep only the products the supplier holds in stock for immediate dispatch. Many suppliers publish none at all.",
            "default": false
          },
          "includeLivePrices": {
            "title": "Include today's discounted price",
            "type": "boolean",
            "description": "Attach the price the supplier is charging today, so you can see an active discount against the standing asking price. On by default.",
            "default": true
          },
          "maxCatalogPagesPerRun": {
            "title": "Catalogue page allowance for the whole run",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "The total number of catalogue pages this run may collect across all suppliers. Sixteen products fit on a page. Keeping this modest is what makes repeated runs reliable; the run stops cleanly when it is spent and reports what it did not collect.",
            "default": 24
          },
          "delayBetweenPagesSeconds": {
            "title": "Seconds between catalogue pages",
            "minimum": 2,
            "maximum": 15,
            "type": "integer",
            "description": "How long to wait between catalogue pages. Two seconds is the minimum and is usually enough; raise it if you are collecting several large suppliers.",
            "default": 3
          },
          "parallelSuppliers": {
            "title": "Suppliers at a time",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "How many supplier storefronts to work through at the same time.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}