{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopee Scraper",
    "description": "Shopee product and shop catalog scraper. Captures product JSON, ordered gallery images, variants, attributes, prices, sales signals, and seller metadata.",
    "version": "0.3",
    "x-build-id": "j2lfnGbUVCCh2HYOa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bnzz~shopee-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bnzz-shopee-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/bnzz~shopee-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bnzz-shopee-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/bnzz~shopee-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bnzz-shopee-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": {
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Shopee product detail URLs to extract.",
            "items": {
              "type": "string"
            }
          },
          "shopUrl": {
            "title": "Shop URL",
            "type": "string",
            "description": "Optional Shopee shop URL. The actor scrolls the shop page and enqueues discovered product URLs."
          },
          "fullShopCatalog": {
            "title": "Full Shop Catalog Discovery",
            "type": "boolean",
            "description": "When true, resolve the shop id, fetch seller categories, crawl category/sort/offset listing APIs, dedupe product ids, then run product detail extraction for the discovered products.",
            "default": false
          },
          "shopId": {
            "title": "Shop ID",
            "type": "string",
            "description": "Optional Shopee shop id. Supplying this avoids username resolution during fullShopCatalog discovery."
          },
          "catalogSorts": {
            "title": "Catalog Sorts",
            "type": "array",
            "description": "Sort strategies to rotate during fullShopCatalog discovery.",
            "default": [
              "pop",
              "ctime",
              "sales",
              "relevancy"
            ],
            "items": {
              "type": "string"
            }
          },
          "catalogPageLimit": {
            "title": "Catalog Page Limit",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Number of listing rows to request per Shopee category/sort/offset call.",
            "default": 60
          },
          "catalogMaxOffsetsPerGroup": {
            "title": "Catalog Max Offsets Per Group",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum offset pages to try per seller category, sort, and price slice.",
            "default": 3
          },
          "catalogMaxBlockedAttempts": {
            "title": "Catalog Max Blocked Attempts",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Stop listing discovery when this many Shopee listing calls are blocked before any products are found. Prevents wasting a full run on blocked proxy/IP paths.",
            "default": 20
          },
          "catalogDiscoveryOnly": {
            "title": "Catalog Discovery Only",
            "type": "boolean",
            "description": "When true with Full Shop Catalog Discovery, stop after building the deduped product URL pool and do not extract product detail pages or export images.",
            "default": false
          },
          "catalogPriceSlices": {
            "title": "Catalog Price Slices",
            "type": "array",
            "description": "Optional price slices for listing discovery, e.g. [{\"min\":0,\"max\":1999},{\"min\":2000,\"max\":null}]. Leave empty for no price slicing."
          },
          "maxProducts": {
            "title": "Max Products",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum product detail pages to extract per run.",
            "default": 10
          },
          "failedProductRetryPasses": {
            "title": "Failed Product Retry Passes",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Number of retry passes for product-level failed or blocked extractions. The original attempt still runs first.",
            "default": 1
          },
          "maxImagesPerProduct": {
            "title": "Max Images Per Product",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum ordered Shopee image assets to keep per product after deduping resize variants and thumbnails.",
            "default": 12
          },
          "countryCode": {
            "title": "Proxy Country",
            "type": "string",
            "description": "Apify proxy country code.",
            "default": "TH"
          },
          "proxyGroups": {
            "title": "Proxy Groups",
            "type": "array",
            "description": "Apify proxy groups. Residential is recommended for Shopee.",
            "default": [
              "RESIDENTIAL"
            ],
            "items": {
              "type": "string"
            }
          },
          "useProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Disable only for local debugging.",
            "default": true
          },
          "brightDataProvider": {
            "title": "Browser Provider",
            "enum": [
              "local_playwright",
              "browser_api",
              "unlocker_api"
            ],
            "type": "string",
            "description": "Use local_playwright for the default Apify browser/proxy path, browser_api to connect Playwright to Bright Data Browser API, or unlocker_api to fetch Shopee HTML/JSON through Bright Data Unlocker API.",
            "default": "local_playwright"
          },
          "useBrightDataBrowser": {
            "title": "Use Bright Data Browser API",
            "type": "boolean",
            "description": "Shortcut for brightDataProvider=browser_api. Requires Bright Data Browser API auth or a full websocket endpoint.",
            "default": false
          },
          "brightDataBrowserAuth": {
            "title": "Bright Data Browser Auth",
            "type": "string",
            "description": "Bright Data Browser API zone credentials in USER:PASS format. Prefer Apify secrets or BRIGHT_DATA_BROWSER_AUTH instead of plain input."
          },
          "brightDataBrowserWSEndpoint": {
            "title": "Bright Data Browser WS Endpoint",
            "type": "string",
            "description": "Optional full Bright Data Browser API websocket endpoint. If provided, this is used instead of brightDataBrowserAuth."
          },
          "brightDataApiKey": {
            "title": "Bright Data API Key",
            "type": "string",
            "description": "Bright Data Unlocker API key. Requires brightDataUnlockerZone. Browser API scraping still requires brightDataBrowserAuth or brightDataBrowserWSEndpoint."
          },
          "useBrightDataUnlocker": {
            "title": "Use Bright Data Unlocker API",
            "type": "boolean",
            "description": "Shortcut for brightDataProvider=unlocker_api. Requires brightDataApiKey/brightDataUnlockerApiKey and brightDataUnlockerZone.",
            "default": false
          },
          "brightDataUnlockerApiKey": {
            "title": "Bright Data Unlocker API Key",
            "type": "string",
            "description": "Bright Data Unlocker API key. You can also use brightDataApiKey or BRIGHT_DATA_UNLOCKER_API_KEY."
          },
          "brightDataUnlockerZone": {
            "title": "Bright Data Unlocker Zone",
            "type": "string",
            "description": "Bright Data Unlocker API zone name from the zone Overview tab."
          },
          "brightDataUnlockerEndpoint": {
            "title": "Bright Data Unlocker Endpoint",
            "type": "string",
            "description": "Optional Bright Data Unlocker direct API endpoint. Defaults to https://api.brightdata.com/request."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of browser pages to run in parallel. Keep at 1 for Shopee stability.",
            "default": 1
          },
          "waitMs": {
            "title": "Page Wait Milliseconds",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra wait after page load so Shopee API calls and gallery images can render.",
            "default": 7000
          },
          "shopScrollSteps": {
            "title": "Shop Scroll Steps",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of scroll steps on a shop page for product URL discovery.",
            "default": 12
          },
          "productScrollSteps": {
            "title": "Product Scroll Steps",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of scroll steps on product pages to expose lazy-loaded gallery and description images.",
            "default": 4
          },
          "saveDebug": {
            "title": "Save Debug Artifacts",
            "type": "boolean",
            "description": "Save response summaries, DOM image candidates, and a screenshot to key-value store for extraction QA.",
            "default": false
          },
          "headless": {
            "title": "Headless Browser",
            "type": "boolean",
            "description": "Run Chrome in headless mode. Default false uses headed Chrome inside Apify Xvfb, which is often less detectable.",
            "default": false
          },
          "warmHomePage": {
            "title": "Warm Shopee Home Page",
            "type": "boolean",
            "description": "Visit Shopee home page before each target URL to establish first-party cookies and client state.",
            "default": true
          },
          "maxSessionAttempts": {
            "title": "Max Session Attempts",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum fresh browser/proxy sessions to try for each product before emitting a blocked record.",
            "default": 5
          },
          "sessionPoolSize": {
            "title": "Session Pool Size",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Number of Crawlee sessions available for proxy/cookie rotation.",
            "default": 20
          },
          "preflight": {
            "title": "HTTP Preflight",
            "type": "boolean",
            "description": "Run a cheap got-scraping request before browser navigation and record whether the proxy/session is already blocked.",
            "default": true
          },
          "skipBrowserOnPreflightBlock": {
            "title": "Skip Browser On Preflight Block",
            "type": "boolean",
            "description": "When true, avoid browser cost if HTTP preflight already shows Shopee traffic verification. For benchmarking unblocking, keep false.",
            "default": false
          },
          "requireProductPayload": {
            "title": "Require Product Payload",
            "type": "boolean",
            "description": "Only emit importable ok products when a structured Shopee product payload is found.",
            "default": true
          },
          "useFingerprints": {
            "title": "Use Browser Fingerprints",
            "type": "boolean",
            "description": "Use Crawlee browser-pool fingerprints tuned to desktop Chrome/Thai locale.",
            "default": true
          },
          "probeApiOnly": {
            "title": "Probe API Only",
            "type": "boolean",
            "description": "Run product-detail API endpoint probes through the configured proxy without launching a browser.",
            "default": false
          },
          "shopUsername": {
            "title": "Shop Username",
            "type": "string",
            "description": "Optional Shopee shop username used in normalized product output when it cannot be inferred from shopUrl.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}