# Shopee Scraper: Search Products Across All Shopee Markets (`lentic_clockss/shopee-search-scraper`) Actor

Scrape Shopee product search results across all supported Shopee country markets with automatic market-matched residential proxies, browser-assisted API capture, clean product data, and SEO-ready ecommerce price monitoring outputs.

- **URL**: https://apify.com/lentic\_clockss/shopee-search-scraper.md
- **Developed by:** [kane liu](https://apify.com/lentic_clockss) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 3 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Shopee Scraper: Search Products Across All Shopee Markets

Extract live Shopee product search results from every supported Shopee country/region marketplace with automatic market-matched residential proxy routing.

Shopee Search Scraper is built for ecommerce teams, sellers, analysts, and data pipelines that need structured Shopee product data without maintaining browser automation, proxy routing, and search-result parsing themselves.

### What does this Shopee scraper do?

This Actor opens the selected Shopee marketplace, searches your keyword, captures Shopee search result data, and writes normalized product rows to the default Apify dataset.

It is useful as a practical **Shopee search API alternative** for:

- Shopee price monitoring
- competitor product tracking
- ecommerce market research
- assortment and catalog analysis
- product sourcing research
- seller and marketplace intelligence
- scheduled product search exports

### Supported Shopee countries and proxy routing

When you choose a market, the Actor automatically uses Apify **RESIDENTIAL** proxy IPs from the matching country/region. You usually do not need to configure proxies manually.

| Market code | Country / region | Shopee domain | Proxy country |
|---|---|---|---|
| `PH` | Philippines | `shopee.ph` | `PH` |
| `SG` | Singapore | `shopee.sg` | `SG` |
| `MY` | Malaysia | `shopee.com.my` | `MY` |
| `TH` | Thailand | `shopee.co.th` | `TH` |
| `TW` | Taiwan | `shopee.tw` | `TW` |
| `VN` | Vietnam | `shopee.vn` | `VN` |
| `ID` | Indonesia | `shopee.co.id` | `ID` |
| `BR` | Brazil | `shopee.com.br` | `BR` |
| `MX` | Mexico | `shopee.com.mx` | `MX` |
| `CO` | Colombia | `shopee.com.co` | `CO` |
| `CL` | Chile | `shopee.cl` | `CL` |

If you provide a custom `proxyConfiguration` with the wrong proxy country, the Actor fails fast instead of silently scraping the wrong regional site.

### Features

- Scrape Shopee search results by keyword
- Support all currently configured Shopee country/region marketplaces listed above
- Automatically match Apify residential proxy country to selected market
- Browser-assisted collection with Shopee `search_items` network payload capture
- DOM fallback when the API payload is unavailable
- Normalized product rows with stable IDs and product URLs
- Optional debug artifacts in key-value store for troubleshooting
- Live View / Standby endpoints with a valid OpenAPI schema
- Pay-per-event pricing: low run start fee + per-result billing

### Input

| Field | Type | Required | Description |
|---|---:|---:|---|
| `keyword` | string | yes | Search keyword, for example `phone case`, `sneakers`, or `wireless earbuds`. |
| `market` | string | no | Shopee country/region code. Default: `PH`. |
| `limit` | integer | no | Maximum number of product rows to output. Default: `30`, max: `200`. |
| `fetchMode` | string | no | `playwright_browser` for live runs; `fixture` only for deterministic local QA. |
| `proxyConfiguration` | object | no | Optional Apify proxy configuration. If omitted, the Actor uses `RESIDENTIAL` + selected market country. |
| `proxyUrl` / `proxyServer` | string | no | Optional custom proxy override. Use only if you manage your own proxy routing. |
| `proxyCountry` | string | no | Optional country assertion. Must match selected market country. |

Advanced browser/session fields are available for troubleshooting in the input schema, including storage-state replay, Chrome cookie import, native Chrome CDP attach, scroll settings, and debug limits.

### Example input

```json
{
  "keyword": "phone case",
  "market": "PH",
  "limit": 30,
  "fetchMode": "playwright_browser"
}
````

Example for Singapore:

```json
{
  "keyword": "wireless earbuds",
  "market": "SG",
  "limit": 100
}
```

### Output

Each product is written as one dataset item.

| Field | Description |
|---|---|
| `market` | Selected Shopee market code |
| `market_name` | Country/region display name |
| `market_host` | Shopee domain used for collection |
| `country` | Country/region name |
| `keyword` | Search keyword |
| `rank` | Rank within the returned results |
| `absolute_rank` | Absolute result rank |
| `shop_id` | Shopee shop ID |
| `item_id` | Shopee item ID |
| `product_id` | Combined product identifier when available |
| `title` | Product title |
| `price` | Display price with market currency |
| `sold_text` | Sold count text when visible |
| `rating_text` | Rating text when visible |
| `location` | Seller/product location text |
| `product_url` | Canonical Shopee product URL |
| `source_url` | Search URL used for collection |
| `image` | Product image URL |
| `currency` / `currency_code` | Market currency details |
| `captured_at` | ISO timestamp |
| `source` | Extraction source, e.g. API capture or DOM fallback |
| `provider` | Fetch provider used by the Actor |

### Example output item

```json
{
  "market": "PH",
  "market_name": "Philippines",
  "market_host": "shopee.ph",
  "country": "Philippines",
  "keyword": "phone case",
  "rank": 1,
  "absolute_rank": 1,
  "shop_id": "123456789",
  "item_id": "11111111111",
  "product_id": "123456789_11111111111",
  "title": "Soft Silicone Phone Case for iPhone 13",
  "price": "₱129.00",
  "sold_text": "1.2k sold",
  "rating_text": "4.9",
  "location": "Metro Manila",
  "product_url": "https://shopee.ph/product/123456789/11111111111",
  "image": "https://down-ph.img.susercontent.com/file/example-image",
  "currency_code": "PHP",
  "source": "shopee_search_api",
  "provider": "playwright_browser"
}
```

### Live View and OpenAPI

The Actor includes a lightweight Standby / Live View web server. Normal scraping still runs as a standard Apify Actor run.

Available Live View endpoints:

| Endpoint | Purpose |
|---|---|
| `GET /` | Service metadata and readiness |
| `GET /health` | Health check |
| `GET /markets` | Supported markets and proxy-country mapping |
| `GET /input-example` | Low-cost example input |
| `GET /openapi.json` | Packaged OpenAPI 3 schema |

### Pricing

This Actor uses **Pay per event** pricing.

| Event | Event name | Price |
|---|---|---:|
| Actor Start | `apify-actor-start` | `$0.005` per run |
| Result | `apify-default-dataset-item` | `$2.00 / 1,000` results (`$0.002` each) |

**User pays platform usage costs:** Yes. Apify platform usage such as compute and proxy usage is charged to the user separately from the Actor event price.

Example: 1,000 product rows cost approximately `$0.005` start + `$2.00` result events, plus Apify platform usage.

### How to scrape Shopee search results

1. Open the Actor on Apify.
2. Enter a `keyword`.
3. Select the target `market`.
4. Set `limit`.
5. Keep `fetchMode=playwright_browser` for live scraping.
6. Run the Actor.
7. Export the dataset as JSON, CSV, Excel, XML, RSS, or HTML.

#### Free Apify plan limits (set by this Actor's developer)

| Limit | Free Apify plan | Paid Apify plan |
| --- | --- | --- |
| Runs of this Actor | **10 runs total** | Unlimited |
| Results per run | **Up to 200** | Up to schema max (200) |

When the run cap is hit, the run finishes with a clear status message — not an Apify platform error.

> **Worker URL is config, not code:** the Actor reads `WORKER_BASE_URL` from Actor environment variables (plus optional per-run `workerBaseUrl`). If you migrate the worker to a new host, update `WORKER_BASE_URL` (and `WORKER_AUTH` if the API key changes) in Apify Console — no Actor code change required. Set `WORKER_PROVIDES_PROXY=1` when the worker supplies its own proxy / Bright Data stack.

### Notes and limitations

- Shopee may show traffic verification, CAPTCHA, or other anti-bot pages depending on session state and IP reputation.
- Residential proxies are strongly recommended for live runs and are automatically selected on Apify.
- Some markets may return fewer visible results for certain keywords.
- The Actor extracts public search-result information; use the data responsibly and respect applicable laws and Shopee terms.

### FAQ

#### Why did my free-plan run stop with a limit message?

Free Apify plan users can run this Actor up to **10 times**, with up to **200 results per run**. These caps are set by the **Actor developer, not Apify**. Upgrade to a paid Apify plan for unlimited runs (schema `limit` still applies).

#### Which Shopee countries are supported?

Philippines, Singapore, Malaysia, Thailand, Taiwan, Vietnam, Indonesia, Brazil, Mexico, Colombia, and Chile.

#### Do I need to choose a proxy country?

No. Select the Shopee market and the Actor automatically chooses the matching Apify residential proxy country. If you pass an explicit proxy country that does not match the market, the Actor fails fast to prevent wrong-region results.

#### Can I run it on a schedule?

Yes. Use Apify schedules to monitor keywords over time for price tracking, competitor monitoring, or product research.

#### Can I use it from code?

Yes. You can run the Actor from the Apify API, the Apify JavaScript/Python clients, CLI, integrations, or MCP tools.

#### Is this a Shopee API?

It is not an official Shopee API. It is an Apify Actor that provides structured Shopee search-result data and can be used as a practical Shopee product search API alternative for many workflows.

# Actor input Schema

## `keyword` (type: `string`):

Shopee search keyword to query.

## `limit` (type: `integer`):

Maximum number of normalized result rows to output (1–200). Free Apify plan users: also limited to 10 total runs of this Actor (Actor developer policy).

## `market` (type: `string`):

Target Shopee country/region. The Actor automatically routes live browser traffic through Apify RESIDENTIAL proxy IPs for the selected market country.

## `fetchMode` (type: `string`):

playwright\_browser is the default live path (browser-assisted Shopee search API capture + DOM fallback). fixture is for deterministic local QA only.

## `fixtureHtmlPath` (type: `string`):

Local fixture HTML path used when fetchMode=fixture.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy settings for rare Playwright failover. Ignored when Actor env WORKER\_PROVIDES\_PROXY=1 (worker uses Bright Data / PROXY\_URL). When omitted, live runs use the worker's own proxy stack.

## `proxyUrl` (type: `string`):

Optional full proxy URL override for playwright\_browser mode, e.g. http://user:pass@host:port.

## `proxyServer` (type: `string`):

Optional proxy server override for playwright\_browser mode, e.g. http://host:port.

## `proxyUsername` (type: `string`):

Optional proxy username override for playwright\_browser mode.

## `proxyPassword` (type: `string`):

Optional proxy password override for playwright\_browser mode.

## `proxyCountry` (type: `string`):

Optional country-code assertion for proxy routing. If provided, it must match the selected market country; otherwise the Actor fails fast to prevent cross-market proxy mistakes.

## `browserHeadless` (type: `boolean`):

Run the Playwright browser in headless mode when fetchMode=playwright\_browser.

## `browserStorageStateFile` (type: `string`):

Optional local Playwright storage-state JSON file to inject a pre-existing human browser session. Can also be combined with browserUserDataDir so cookies/localStorage are overlaid on top of a persistent Chrome profile replay.

## `browserLoadChromeCookies` (type: `boolean`):

Load local Google Chrome cookies into the Playwright context before navigation.

## `browserChromeProfile` (type: `string`):

Local Google Chrome profile name used when browserLoadChromeCookies=true.

## `browserChromeDomain` (type: `string`):

Cookie domain filter used when browserLoadChromeCookies=true. Defaults to the selected market host (e.g. shopee.ph).

## `browserUserDataDir` (type: `string`):

Optional Chromium/Chrome user-data-dir path for persistent profile replay in local/browser-assisted runs. Can be combined with browserStorageStateFile to overlay stronger cookies/localStorage onto the copied profile before navigation.

## `browserUseNativeChromeCdp` (type: `boolean`):

When true, launch the local Chrome app separately with remote debugging enabled and attach Playwright over CDP. Requires browserUserDataDir and currently does not support authenticated proxy credentials. Can be paired with browserStorageStateFile to overlay a stronger replayed session onto the attached Chrome context.

## `browserWaitAfterLoadMs` (type: `integer`):

How long to wait after initial page load before scrolling/extraction in playwright\_browser mode.

## `browserScrollRounds` (type: `integer`):

How many scroll rounds to perform before extracting items in playwright\_browser mode.

## `browserScrollPauseMs` (type: `integer`):

Pause duration between scroll rounds in playwright\_browser mode.

## `browserCaptureApiPayload` (type: `boolean`):

When enabled, playwright\_browser listens for Shopee search API responses and uses them as the primary live extraction path.

## `browserUseDomFallback` (type: `boolean`):

If API payload capture does not yield items, allow fallback to browser DOM card extraction.

## `debugSaveHtml` (type: `boolean`):

Store a truncated HTML snippet in key-value store for debugging.

## `debugSaveApiPayload` (type: `boolean`):

Store a summarized DEBUG\_API\_CAPTURE artifact for playwright\_browser runs.

## `debugMaxHtmlChars` (type: `integer`):

Maximum HTML characters to save in DEBUG\_HTML\_SNIPPET.txt.

## `debugMaxApiItems` (type: `integer`):

Maximum number of matched API captures to summarize in DEBUG\_API\_CAPTURE.

## `workerBaseUrl` (type: `string`):

Optional per-run override of the Cloud Run worker origin. Production runs should leave this empty and use Actor env WORKER\_BASE\_URL.

## Actor input object example

```json
{
  "limit": 30,
  "market": "PH",
  "fetchMode": "playwright_browser",
  "fixtureHtmlPath": "fixtures/shopee_ph_search_phone_case.html",
  "browserHeadless": true,
  "browserLoadChromeCookies": false,
  "browserChromeProfile": "Default",
  "browserUseNativeChromeCdp": false,
  "browserWaitAfterLoadMs": 12000,
  "browserScrollRounds": 5,
  "browserScrollPauseMs": 1200,
  "browserCaptureApiPayload": true,
  "browserUseDomFallback": true,
  "debugSaveHtml": true,
  "debugSaveApiPayload": true,
  "debugMaxHtmlChars": 12000,
  "debugMaxApiItems": 5
}
```

# Actor output Schema

## `results` (type: `string`):

Normalized Shopee search result items from the default dataset.

## `runSummary` (type: `string`):

Structured run outcome and aggregate metrics stored in the default key-value store.

## `debugFetchResult` (type: `string`):

Fetch metadata snapshot (final URL, status, provider, capture metadata).

## `debugApiCapture` (type: `string`):

Raw search\_items API capture debug payload when debugSaveApiPayload is enabled.

## `debugHtmlSnippet` (type: `string`):

Truncated HTML snippet when debugSaveHtml is enabled.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/shopee-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("lentic_clockss/shopee-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call lentic_clockss/shopee-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lentic_clockss/shopee-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Shopee Scraper: Search Products Across All Shopee Markets",
        "description": "Scrape Shopee product search results across all supported Shopee country markets with automatic market-matched residential proxies, browser-assisted API capture, clean product data, and SEO-ready ecommerce price monitoring outputs.",
        "version": "0.2",
        "x-build-id": "SUVfXfUr5WpfLUBYs"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lentic_clockss~shopee-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lentic_clockss-shopee-search-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/lentic_clockss~shopee-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lentic_clockss-shopee-search-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/lentic_clockss~shopee-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lentic_clockss-shopee-search-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": [
                    "keyword"
                ],
                "properties": {
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Shopee search keyword to query."
                    },
                    "limit": {
                        "title": "Limit (max 200; free users capped at 200/run)",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of normalized result rows to output (1–200). Free Apify plan users: also limited to 10 total runs of this Actor (Actor developer policy).",
                        "default": 30
                    },
                    "market": {
                        "title": "Shopee market / country or region",
                        "enum": [
                            "PH",
                            "SG",
                            "MY",
                            "TH",
                            "TW",
                            "VN",
                            "ID",
                            "BR",
                            "MX",
                            "CO",
                            "CL"
                        ],
                        "type": "string",
                        "description": "Target Shopee country/region. The Actor automatically routes live browser traffic through Apify RESIDENTIAL proxy IPs for the selected market country.",
                        "default": "PH"
                    },
                    "fetchMode": {
                        "title": "Fetch mode",
                        "enum": [
                            "fixture",
                            "playwright_browser"
                        ],
                        "type": "string",
                        "description": "playwright_browser is the default live path (browser-assisted Shopee search API capture + DOM fallback). fixture is for deterministic local QA only.",
                        "default": "playwright_browser"
                    },
                    "fixtureHtmlPath": {
                        "title": "Fixture HTML path",
                        "type": "string",
                        "description": "Local fixture HTML path used when fetchMode=fixture.",
                        "default": "fixtures/shopee_ph_search_phone_case.html"
                    },
                    "proxyConfiguration": {
                        "title": "Apify proxy configuration",
                        "type": "object",
                        "description": "Optional Apify Proxy settings for rare Playwright failover. Ignored when Actor env WORKER_PROVIDES_PROXY=1 (worker uses Bright Data / PROXY_URL). When omitted, live runs use the worker's own proxy stack."
                    },
                    "proxyUrl": {
                        "title": "Proxy URL",
                        "type": "string",
                        "description": "Optional full proxy URL override for playwright_browser mode, e.g. http://user:pass@host:port."
                    },
                    "proxyServer": {
                        "title": "Proxy server",
                        "type": "string",
                        "description": "Optional proxy server override for playwright_browser mode, e.g. http://host:port."
                    },
                    "proxyUsername": {
                        "title": "Proxy username",
                        "type": "string",
                        "description": "Optional proxy username override for playwright_browser mode."
                    },
                    "proxyPassword": {
                        "title": "Proxy password",
                        "type": "string",
                        "description": "Optional proxy password override for playwright_browser mode."
                    },
                    "proxyCountry": {
                        "title": "Proxy country",
                        "enum": [
                            "PH",
                            "SG",
                            "MY",
                            "TH",
                            "TW",
                            "VN",
                            "ID",
                            "BR",
                            "MX",
                            "CO",
                            "CL"
                        ],
                        "type": "string",
                        "description": "Optional country-code assertion for proxy routing. If provided, it must match the selected market country; otherwise the Actor fails fast to prevent cross-market proxy mistakes."
                    },
                    "browserHeadless": {
                        "title": "Browser headless",
                        "type": "boolean",
                        "description": "Run the Playwright browser in headless mode when fetchMode=playwright_browser.",
                        "default": true
                    },
                    "browserStorageStateFile": {
                        "title": "Browser storage-state file",
                        "type": "string",
                        "description": "Optional local Playwright storage-state JSON file to inject a pre-existing human browser session. Can also be combined with browserUserDataDir so cookies/localStorage are overlaid on top of a persistent Chrome profile replay."
                    },
                    "browserLoadChromeCookies": {
                        "title": "Load local Chrome cookies",
                        "type": "boolean",
                        "description": "Load local Google Chrome cookies into the Playwright context before navigation.",
                        "default": false
                    },
                    "browserChromeProfile": {
                        "title": "Chrome profile",
                        "type": "string",
                        "description": "Local Google Chrome profile name used when browserLoadChromeCookies=true.",
                        "default": "Default"
                    },
                    "browserChromeDomain": {
                        "title": "Chrome cookie domain",
                        "type": "string",
                        "description": "Cookie domain filter used when browserLoadChromeCookies=true. Defaults to the selected market host (e.g. shopee.ph)."
                    },
                    "browserUserDataDir": {
                        "title": "Browser user data dir",
                        "type": "string",
                        "description": "Optional Chromium/Chrome user-data-dir path for persistent profile replay in local/browser-assisted runs. Can be combined with browserStorageStateFile to overlay stronger cookies/localStorage onto the copied profile before navigation."
                    },
                    "browserUseNativeChromeCdp": {
                        "title": "Use native Chrome CDP attach",
                        "type": "boolean",
                        "description": "When true, launch the local Chrome app separately with remote debugging enabled and attach Playwright over CDP. Requires browserUserDataDir and currently does not support authenticated proxy credentials. Can be paired with browserStorageStateFile to overlay a stronger replayed session onto the attached Chrome context.",
                        "default": false
                    },
                    "browserWaitAfterLoadMs": {
                        "title": "Browser wait after load (ms)",
                        "minimum": 0,
                        "maximum": 60000,
                        "type": "integer",
                        "description": "How long to wait after initial page load before scrolling/extraction in playwright_browser mode.",
                        "default": 12000
                    },
                    "browserScrollRounds": {
                        "title": "Browser scroll rounds",
                        "minimum": 0,
                        "maximum": 20,
                        "type": "integer",
                        "description": "How many scroll rounds to perform before extracting items in playwright_browser mode.",
                        "default": 5
                    },
                    "browserScrollPauseMs": {
                        "title": "Browser scroll pause (ms)",
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Pause duration between scroll rounds in playwright_browser mode.",
                        "default": 1200
                    },
                    "browserCaptureApiPayload": {
                        "title": "Capture Shopee API payload",
                        "type": "boolean",
                        "description": "When enabled, playwright_browser listens for Shopee search API responses and uses them as the primary live extraction path.",
                        "default": true
                    },
                    "browserUseDomFallback": {
                        "title": "Allow DOM fallback",
                        "type": "boolean",
                        "description": "If API payload capture does not yield items, allow fallback to browser DOM card extraction.",
                        "default": true
                    },
                    "debugSaveHtml": {
                        "title": "Save debug HTML snippet",
                        "type": "boolean",
                        "description": "Store a truncated HTML snippet in key-value store for debugging.",
                        "default": true
                    },
                    "debugSaveApiPayload": {
                        "title": "Save debug API capture",
                        "type": "boolean",
                        "description": "Store a summarized DEBUG_API_CAPTURE artifact for playwright_browser runs.",
                        "default": true
                    },
                    "debugMaxHtmlChars": {
                        "title": "Debug HTML max chars",
                        "minimum": 1000,
                        "maximum": 200000,
                        "type": "integer",
                        "description": "Maximum HTML characters to save in DEBUG_HTML_SNIPPET.txt.",
                        "default": 12000
                    },
                    "debugMaxApiItems": {
                        "title": "Debug API capture max entries",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of matched API captures to summarize in DEBUG_API_CAPTURE.",
                        "default": 5
                    },
                    "workerBaseUrl": {
                        "title": "Worker base URL (Advanced)",
                        "type": "string",
                        "description": "Optional per-run override of the Cloud Run worker origin. Production runs should leave this empty and use Actor env WORKER_BASE_URL."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
