{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Category Scraper",
    "description": "Extract comprehensive product data from Alibaba's marketplace using keyword searches. This Apify Actor scrapes details like prices, supplier ratings, images, and certifications, delivering structured JSON output for easy analysis....",
    "version": "1.2",
    "x-build-id": "XAxihFoUQ1v0OvUKt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~alibaba-category-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-alibaba-category-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/w3crawler~alibaba-category-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-alibaba-category-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/w3crawler~alibaba-category-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-alibaba-category-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": {
          "keyword": {
            "title": "Search keyword",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Product phrase used to build the default Alibaba search URL. If startUrls is supplied, the URL's SearchText is used when this is omitted.",
            "default": "wireless earbuds"
          },
          "startUrls": {
            "title": "Start URLs",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "One or more public HTTPS Alibaba category, search, catalog, or product-detail URLs. All sources share one maxItems limit.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrl": {
            "title": "Category URL",
            "type": "string",
            "description": "Convenience field for one Alibaba category/search URL; it is processed after startUrls."
          },
          "categoryUrls": {
            "title": "Additional category URLs",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Additional Alibaba category/search URLs; they are processed after startUrls.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum product rows",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Global maximum number of product rows emitted across every source and page.",
            "default": 40
          },
          "maxPages": {
            "title": "Maximum pages per source",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Pages per source. Use 0 for bounded automatic pagination up to 100 pages; every page remains subject to maxItems.",
            "default": 3
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "best_match",
              "price_asc",
              "price_desc",
              "rating_desc",
              "reviews_desc",
              "sold_desc",
              "supplier_years_desc"
            ],
            "type": "string",
            "description": "Sort after extraction and filtering; best_match preserves page and card order.",
            "default": "best_match"
          },
          "includeMedia": {
            "title": "Include product media",
            "type": "boolean",
            "description": "Keep product image URLs and thumbnail. Images are restricted to product-scoped public Alibaba CDN assets.",
            "default": true
          },
          "deduplicate": {
            "title": "Deduplicate products",
            "type": "boolean",
            "description": "Remove repeated product IDs or canonical product URLs across pages and sources.",
            "default": true
          },
          "includeDiagnostics": {
            "title": "Include diagnostics",
            "type": "boolean",
            "description": "Add minimal {url, error, errorCode, scrapedAt} rows when a source is blocked or has no public product evidence.",
            "default": true
          },
          "excludeAds": {
            "title": "Exclude sponsored products",
            "type": "boolean",
            "description": "Exclude rows explicitly marked as advertisements by the public page.",
            "default": false
          },
          "certifiedOnly": {
            "title": "Certified suppliers only",
            "type": "boolean",
            "description": "Keep rows with an observed certification, verified, assessed, or equivalent public supplier signal.",
            "default": false
          },
          "supplierCountry": {
            "title": "Supplier country",
            "pattern": "^(?:any|[A-Za-z]{2,3})$",
            "type": "string",
            "description": "Optional two- or three-letter supplier country code, or any."
          },
          "supplierLocation": {
            "title": "Supplier location text",
            "maxLength": 120,
            "type": "string",
            "description": "Optional case-insensitive text match against observed supplier location or country."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Keep rows whose observed price range reaches this value."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Keep rows whose observed price range reaches this value."
          },
          "minOrderQuantity": {
            "title": "Minimum order quantity",
            "minimum": 1,
            "type": "number",
            "description": "Keep rows with an observed MOQ at or above this value."
          },
          "minSupplierRating": {
            "title": "Minimum supplier rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep rows with an observed supplier/product rating at or above this value."
          },
          "minReviewCount": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep rows with at least this observed rating/review count."
          },
          "minSoldCount": {
            "title": "Minimum sold count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep rows with at least this observed sold count."
          },
          "requiredBadges": {
            "title": "Required badges",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Keep rows whose observed badge, certification, or selling-point text contains every value.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "requestDelayMs": {
            "title": "Page delay (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Delay before page navigations and retries. Respectful pacing is recommended.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Source concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of source URLs processed concurrently; pages within one source remain sequential.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for transient navigation failures. Challenge responses fail closed and are not bypassed.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 15,
            "maximum": 300,
            "type": "integer",
            "description": "Per-navigation timeout.",
            "default": 60
          },
          "requestHandlerTimeoutSecs": {
            "title": "Request handler timeout (seconds)",
            "minimum": 60,
            "maximum": 900,
            "type": "integer",
            "description": "Maximum time budget documented for one source/page operation.",
            "default": 300
          },
          "selectorTimeoutSecs": {
            "title": "Selector timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout used while waiting for the public page body before extracting HTML and embedded data.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Apify Proxy",
            "type": "object",
            "description": "Optional standard Apify Proxy route for public requests. Proxying does not solve CAPTCHA or bypass access controls.",
            "properties": {
              "useApifyProxy": {
                "title": "Use Apify Proxy",
                "type": "boolean",
                "description": "Route browser requests through Apify Proxy."
              },
              "apifyProxyGroups": {
                "title": "Proxy groups",
                "type": "array",
                "description": "Optional Apify Proxy groups.",
                "items": {
                  "type": "string"
                }
              },
              "apifyProxyCountry": {
                "title": "Proxy country",
                "type": "string",
                "description": "Optional two- or three-letter Apify Proxy country code.",
                "pattern": "^[A-Za-z]{2,3}$"
              }
            },
            "additionalProperties": false
          },
          "fixtureFile": {
            "title": "Local HTML fixture",
            "pattern": "^(?!.*(?:^|[/\\\\])\\.\\.(?:[/\\\\]|$))(?![/\\\\])[^:]+\\.(?:html?|xhtml)$",
            "type": "string",
            "description": "Optional Actor-relative HTML fixture for deterministic QA. Page 2+ automatically uses sibling files named -page-2.html, -page-3.html, etc., when present."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}