{
  "openapi": "3.0.1",
  "info": {
    "title": "Alibaba Product Profile Scraper",
    "description": "Extract public Alibaba product profiles, offers, supplier signals, attributes, and media.",
    "version": "1.1",
    "x-build-id": "AF5whcZQYQDgPwdx1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~alibaba-single-product-details-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-alibaba-single-product-details-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-single-product-details-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-alibaba-single-product-details-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-single-product-details-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-alibaba-single-product-details-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": {
          "productUrl": {
            "title": "Primary product URL",
            "type": "string",
            "description": "One HTTPS public Alibaba product-detail URL."
          },
          "productUrls": {
            "title": "Product URLs",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Additional HTTPS public Alibaba product-detail URLs. Each URL is fetched independently.",
            "items": {
              "type": "string",
              "pattern": "^https://"
            },
            "default": []
          },
          "startUrls": {
            "title": "Start URLs (compatibility alias)",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for productUrls.",
            "items": {
              "type": "string",
              "pattern": "^https://"
            }
          },
          "maxItems": {
            "title": "Maximum profiles",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum product or diagnostic rows emitted after filtering, sorting, and deduplication.",
            "default": 25
          },
          "sortBy": {
            "title": "Sort profiles",
            "enum": [
              "relevance",
              "price_asc",
              "price_desc",
              "rating_desc",
              "reviews_desc",
              "supplier_asc",
              "title_asc"
            ],
            "type": "string",
            "description": "Stable order applied after all product URLs are processed.",
            "default": "relevance"
          },
          "textQuery": {
            "title": "Text filter",
            "maxLength": 200,
            "type": "string",
            "description": "Keep profiles whose title, description, supplier, category, availability, SKU, or MPN contains this text."
          },
          "currency": {
            "title": "Currency filter",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Keep profiles with this three-letter price currency code."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Keep profiles whose normalized minimum price is at least this value."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Keep profiles whose normalized minimum price is at most this value."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep profiles with a product rating at or above this value."
          },
          "minReviewCount": {
            "title": "Minimum review count",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Keep profiles with at least this many reviews."
          },
          "supplierCountries": {
            "title": "Supplier countries",
            "maxItems": 50,
            "type": "array",
            "description": "Keep profiles whose visible supplier country/location contains one of these values.",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "deduplicate": {
            "title": "Deduplicate profiles",
            "type": "boolean",
            "description": "Keep one row per public product identifier or canonical product URL.",
            "default": true
          },
          "includeMedia": {
            "title": "Include media",
            "type": "boolean",
            "description": "Include public Alibaba image URLs, thumbnails, and image counts.",
            "default": true
          },
          "includeAttributes": {
            "title": "Include attributes",
            "type": "boolean",
            "description": "Include visible attributes, specifications, and breadcrumbs.",
            "default": true
          },
          "includeSupplierDetails": {
            "title": "Include supplier details",
            "type": "boolean",
            "description": "Include supplier identity, profile URL, location, and rating fields.",
            "default": true
          },
          "includeDiagnostics": {
            "title": "Emit minimal diagnostics",
            "type": "boolean",
            "description": "Add URL/error/errorCode/scrapedAt rows for failed or unusable public pages.",
            "default": true
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time for each public product request.",
            "default": 45
          },
          "timeoutSecs": {
            "title": "Request timeout (legacy alias)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Compatibility alias for requestTimeoutSecs."
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Delay between public requests per worker.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum simultaneous product-page workers.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for timeouts and transient server failures. Access challenges and rate limits are terminal.",
            "default": 3
          },
          "maxBytes": {
            "title": "Maximum response bytes",
            "minimum": 1000,
            "maximum": 15000000,
            "type": "integer",
            "description": "Reject unusually large public product responses before parsing.",
            "default": 5000000
          },
          "fixturePath": {
            "title": "Local fixture path",
            "type": "string",
            "description": "Relative JSON, HTML, or text fixture used for deterministic offline QA."
          },
          "fixturePaths": {
            "title": "Ordered local fixture paths",
            "maxItems": 100,
            "type": "array",
            "description": "Use one fixture per product URL, or reuse the last fixture for additional URLs.",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "fixtureHtml": {
            "title": "Inline fixture HTML",
            "maxLength": 5000000,
            "type": "string",
            "description": "Inline HTML fixture for offline QA; do not combine with fixturePath(s)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}