{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopee Brazil Product Scraper — Bulk Product Pages",
    "description": "Bulk-scrape public Shopee Brasil product pages by URL or shopId+itemId — title, stock, images, and shop signals. Anonymous SSR may strip unit prices; Affiliate/ScrapeBadger fill when configured. Unofficial; not affiliated with Shopee.",
    "version": "0.1",
    "x-build-id": "DFkjfRUPEvgfpIpdm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bakos_bence~shopee-br-products/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bakos_bence-shopee-br-products",
        "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/bakos_bence~shopee-br-products/runs": {
      "post": {
        "operationId": "runs-sync-bakos_bence-shopee-br-products",
        "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/bakos_bence~shopee-br-products/run-sync": {
      "post": {
        "operationId": "run-sync-bakos_bence-shopee-br-products",
        "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": {
          "startUrls": {
            "title": "Product page links",
            "type": "array",
            "description": "Paste links copied from your browser on <b>shopee.com.br</b>. Either format works:<br>• <code>https://shopee.com.br/product/{shopId}/{itemId}</code><br>• Pretty URL ending in <code>-i.{shopId}.{itemId}</code>",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Shopee Brasil product page URL"
                }
              },
              "required": [
                "url"
              ]
            },
            "default": [
              {
                "url": "https://shopee.com.br/product/1409138451/58261085798"
              }
            ]
          },
          "urls": {
            "title": "URL list (alias)",
            "type": "array",
            "description": "Plain string URL list alias.",
            "items": {
              "type": "string"
            }
          },
          "shopIds": {
            "title": "Shop IDs",
            "type": "array",
            "description": "Numeric shop IDs — zip with Item IDs in order.",
            "items": {
              "type": "string"
            }
          },
          "itemIds": {
            "title": "Item IDs",
            "type": "array",
            "description": "Numeric item IDs — zip with Shop IDs in order.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search / catalog keywords",
            "type": "array",
            "description": "Optional priced catalog path: ScrapeBadger search (market=br) or Affiliate productOfferV2. Needs scrapebadgerApiKey or Affiliate credentials. Leave empty for SSR product-URL smoke.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "How many products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many products. Keep <b>1</b> for your first run; raise when you paste a longer URL list.",
            "default": 1
          },
          "requireMustHave": {
            "title": "Require name + price + source",
            "type": "boolean",
            "description": "When true, only emit rows with name, price, and source — needs scrapebadgerApiKey or Affiliate credentials (anonymous SSR strips unit prices). Default false so Start/smoke succeeds with SSR title+source rows.",
            "default": false
          },
          "minPriceRate": {
            "title": "Minimum price fill rate",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Only enforced when requireMustHave is true. Fail if withPrice/totalRecords is below this (default 0.95).",
            "default": 0.95
          },
          "enrichShop": {
            "title": "Enrich shop metadata",
            "type": "boolean",
            "description": "Fetch public shop signals (name, followers, rating, verified flags). No personal contact fields.",
            "default": true
          },
          "includeRawPdp": {
            "title": "Include full product-page dump",
            "type": "boolean",
            "description": "Attach raw.pdpEntry + related MFE slices from the product page. Off by default when chasing priced rows (smaller dataset).",
            "default": false
          },
          "enrichScrapebadger": {
            "title": "Enrich prices via ScrapeBadger",
            "type": "boolean",
            "description": "When scrapebadgerApiKey is set, fill missing unit prices (and sold/rating when present) via ScrapeBadger's Shopee API. They warm real Chrome guest sessions — no Shopee login from you.",
            "default": true
          },
          "scrapebadgerApiKey": {
            "title": "ScrapeBadger API key",
            "type": "string",
            "description": "API key from scrapebadger.com dashboard. 5 credits per product/search call. Env fallback: SCRAPEBADGER_API_KEY."
          },
          "enrichAffiliate": {
            "title": "Enrich via Shopee Affiliate API (optional)",
            "type": "boolean",
            "description": "Fallback when Affiliate App ID+Secret are available (productOfferV2). Catalog coverage is incomplete vs ScrapeBadger.",
            "default": true
          },
          "affiliateAppId": {
            "title": "Shopee Affiliate App ID",
            "type": "string",
            "description": "Open API App ID from affiliate.shopee.com.br (optional if using ScrapeBadger)."
          },
          "affiliateAppSecret": {
            "title": "Shopee Affiliate App Secret",
            "type": "string",
            "description": "Open API App Secret. Stored encrypted when marked secret in Console."
          },
          "maxRetries": {
            "title": "Retries per product",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "HTTP/parse retries per product before counting it failed.",
            "default": 3
          },
          "productUrls": {
            "title": "Product URLs (alias)",
            "type": "array",
            "description": "Alias of startUrls for drop-in compatibility with other Shopee Actors.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Shopee Brasil product page URL"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional pause between products. Forces concurrency=1 when > 0. 0 = as fast as the proxy allows.",
            "default": 0
          },
          "concurrency": {
            "title": "Concurrent product fetches",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many product pages to fetch in parallel (1–32). Raise for throughput; lower if Shopee starts failing.",
            "default": 16
          },
          "proxyConfiguration": {
            "title": "Apify Proxy configuration",
            "type": "object",
            "description": "Managed by the Actor; leave default. RESIDENTIAL + BR is forced in code (user toggles are ignored).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "BR"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}