# Shopee Scraper API - Products, Prices, Discounts & Images (`makework36/shopee-scraper-api`) Actor

Scrape Shopee products across 11 countries. HTTP only, no browser, pay per result. Full category tree, AggregateOffer price range, seller rating, discount captured.

- **URL**: https://apify.com/makework36/shopee-scraper-api.md
- **Developed by:** [deusex machine](https://apify.com/makework36) (community)
- **Categories:** E-commerce, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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 API — Products, Prices, Discounts & 11 Countries

Production-ready Shopee scraper built on Shopee's server-side rendered HTML (Googlebot SSR). Extracts rich product data from [shopee.com.br](https://shopee.com.br), [shopee.sg](https://shopee.sg), [shopee.com.my](https://shopee.com.my), [shopee.co.th](https://shopee.co.th), [shopee.ph](https://shopee.ph), [shopee.vn](https://shopee.vn), [shopee.co.id](https://shopee.co.id), [shopee.tw](https://shopee.tw), [shopee.com.mx](https://shopee.com.mx), [shopee.com.co](https://shopee.com.co), and [shopee.cl](https://shopee.cl) — without browser automation, without residential proxies, and without the encrypted `x-sap-sec` token that blocks API access to other scrapers.

**Jump to:** [Why use this](#what-this-shopee-scraper-does) · [Output fields](#data-fields-the-shopee-scraper-extracts) · [Use cases](#use-cases-for-this-shopee-data-api) · [Quick start](#step-by-step-tutorial--your-first-shopee-scraper-run-in-3-minutes) · [Code examples](#how-to-call-this-shopee-scraper-from-your-code) · [Pricing](#pricing) · [FAQ](#faq)

### What this Shopee scraper does

Shopee has no public API. The internal `/api/v4/` endpoints are protected by an encrypted anti-fraud token (`x-sap-sec` / `af-ac-enc-dat`) that nobody has reversed publicly — you can see competitors on this Store using Playwright + residential proxies to bypass it. That path is slow, brittle, and expensive.

This actor takes a different route. Shopee serves fully pre-rendered HTML with structured [JSON-LD](https://json-ld.org/) to search engine crawlers so Google can index product pages. By requesting the same pages with a Googlebot User-Agent, the actor gets the full product payload — price, rating, seller, category tree, images — parses the [`Product`](https://schema.org/Product) and [`BreadcrumbList`](https://schema.org/BreadcrumbList) JSON-LD blocks, and writes one clean row per product to the dataset.

Because it is pure HTTP, the actor runs on tiny compute (1 CPU, 512MB) and costs you a fraction of what browser-based Shopee scrapers consume. Typical run: 2,000 products in ~6 minutes.

### Data fields the Shopee scraper extracts

Each dataset item contains **31 fields** — more than any other Shopee actor on the Apify Store. Fields are flat, typed, and consistently populated across all 11 countries:

**Product identifiers**

- `country` — ISO code of the Shopee domain (`br`, `sg`, `my`, `th`, `ph`, `vn`, `id`, `tw`, `mx`, `co`, `cl`)
- `item_id` — numeric product ID
- `shop_id` — numeric seller/shop ID
- `url` — full product URL

**Product content**

- `title` — product name (≤250 chars)
- `description` — full product description (≤2000 chars) — **not extracted by any other Shopee scraper**
- `brand` — brand/manufacturer name, falls back to seller name when missing
- `images` — array of image URLs
- `image_url` — first image for convenience

**Pricing (AggregateOffer aware)**

- `price` — current price (lowest when the product has variants)
- `price_max` — highest variant price (null for single-variant products)
- `full_price` — pre-discount price, equal to `price_max` when present
- `currency` — `BRL`, `SGD`, `MYR`, `THB`, `PHP`, `VND`, `IDR`, `TWD`, `MXN`, `COP`, `CLP`
- `has_variants` — `true` when the offer is an `AggregateOffer` (sizes, colors, packs)
- `discount_pct` — computed from `price` vs `full_price`

**Category tree (unique)**

Three levels from the product's `BreadcrumbList`:

- `category_1` — top category, e.g. `Celulares e Dispositivos`
- `category_2` — mid category, e.g. `Acessórios`
- `category_3` — leaf category, e.g. `Capas`

No other Shopee actor exposes the full 3-level taxonomy.

**Rating**

- `rating` — average rating (0.0 – 5.0)
- `rating_count` — number of ratings (often in the hundreds of thousands)
- `rating_best` / `rating_worst` — rating scale endpoints from schema.org

**Availability**

- `availability` — `InStock` or `OutOfStock`
- `item_condition` — `New` or `Used`

**Seller**

- `seller_name` — store display name
- `seller_url` — store page URL
- `seller_image` — store logo URL
- `seller_rating` — seller's average rating
- `seller_rating_count` — total ratings across all seller's products
- `is_official_seller` — heuristic flag (`true` when the seller name contains "oficial"/"official")

**Meta**

- `scraped_at` — ISO 8601 UTC timestamp

### Use cases for this Shopee data API

**Price monitoring** — Track price changes on thousands of products weekly across multiple Shopee countries. `price`, `price_max`, and `discount_pct` are stable, structured, comparable across runs.

**Competitive intelligence** — Pull full category trees in Brazil, Mexico, or Southeast Asia to measure assortment depth, share of shelf, and new entrants. The 3-level category tree lets you slice by granular subcategory.

**Seller lead generation** — `seller_name`, `seller_url`, `seller_rating`, and `seller_rating_count` give you a ready-made list of active sellers to filter by size and reputation. Ideal for B2B outreach (payment processors, fulfillment services, wholesalers).

**Dataset resale on DataBoutique** — Output fields map directly to the E0001 "product prices" schema used on DataBoutique. Run weekly, transform to `data_file.txt`, upload to S3, deliver.

**Market research & BI** — Feed the rows into BigQuery/Snowflake, join with your own catalog, and produce dashboards on category growth, pricing dynamics, and seller concentration per country.

**AI pricing & demand models** — 31 structured fields are enough signal for simple regression/ML models on product virality, seasonality, or category-level price elasticity.

### How to use this Shopee scraper

The actor supports three input modes. All three write one row per product to the default dataset.

#### Mode 1 — discover (recommended for first-time use)

Auto-scrape the homepage to find every top-level category on the target country, then iterate through them. Best for full-catalog snapshots.

```json
{
  "country": "br",
  "mode": "discover",
  "maxProductsPerCategory": 200,
  "maxTotalProducts": 5000,
  "sortOrders": ["relevancy", "sales", "price_desc"]
}
````

Typical yield: **6,000 – 10,000 unique products per run** when `maxTotalProducts` is high enough. Shopee BR alone exposes 30+ main categories.

#### Mode 2 — categories (targeted scraping)

Scrape specific categories by slug. Use this when you only care about a subset of the catalog, or when you want to refresh high-priority categories more often than others.

```json
{
  "country": "br",
  "mode": "categories",
  "categories": [
    "Celulares-e-Dispositivos-cat.11059988",
    "Beleza-cat.11059974",
    "Relógios-cat.11059996"
  ],
  "maxProductsPerCategory": 200
}
```

Find category slugs by visiting the Shopee site and copying the URL path (everything after the domain). The slug must end with `-cat.NNN`.

#### Mode 3 — urls (ad-hoc)

Scrape a specific list of product or category URLs. Use this when you already have a curated list of SKUs to refresh.

```json
{
  "country": "br",
  "mode": "urls",
  "urls": [
    "https://shopee.com.br/iPhone-15-128GB-i.1234.5678",
    "https://shopee.com.br/Celulares-cat.11059988"
  ]
}
```

The country is auto-detected from the URL domain, but you still need to set `country` so the actor uses the right `Accept-Language` header.

### Input parameters

| Field | Type | Default | Notes |
|-------|------|---------|-------|
| `country` | select (11 values) | `br` | Target Shopee domain. |
| `mode` | select | `discover` | `discover`, `categories`, or `urls`. |
| `categories` | string\[] | `[]` | Category slugs (with `-cat.NNN`). Required when `mode=categories`. |
| `urls` | array | `[]` | Required when `mode=urls`. Product or category URLs. |
| `maxProductsPerCategory` | integer | `200` | Hard cap per category. Shopee SSR serves ~40 per sort variant per page; combined you can reach ~250 unique. |
| `maxTotalProducts` | integer | `2000` | Hard cap across the whole run. |
| `sortOrders` | string\[] | `["relevancy","sales","price_desc"]` | Any subset of `relevancy`, `sales`, `ctime`, `price`, `price_desc`. |
| `workers` | integer | `8` | Concurrent HTTP workers for the product-detail fetch phase. |
| `delayMs` | integer | `300` | Min delay per request (ms). Raise if you see redirects. |

### Output example (JSON)

One row from a `discover` run against `country=br`:

```json
{
  "country": "br",
  "item_id": "22097308942",
  "shop_id": "1072624004",
  "url": "https://shopee.com.br/Kit-Tapete-para-Banheiro-i.1072624004.22097308942",
  "title": "Kit Tapete para Banheiro de Secagem Rápida e Super Absorvente",
  "description": "Tapete de Banheiro Super Absorvente Secagem Rápida Chuveiro Cozinha Varanda Anti-derrapante 40x60cm 50x80cm...",
  "brand": "HH IMPORTADORA",
  "images": ["https://down-br.img.susercontent.com/file/br-11134207-7r98o-lqnow85afhun2a"],
  "image_url": "https://down-br.img.susercontent.com/file/br-11134207-7r98o-lqnow85afhun2a",
  "price": 11.49,
  "price_max": 24.99,
  "full_price": 24.99,
  "currency": "BRL",
  "has_variants": true,
  "discount_pct": 54.02,
  "category_1": "Casa e Construção",
  "category_2": "Decoração",
  "category_3": "Capachos",
  "rating": 4.49,
  "rating_count": 117550,
  "rating_best": 5,
  "rating_worst": 1,
  "availability": "InStock",
  "item_condition": "New",
  "seller_name": "HH IMPORTADORA",
  "seller_url": "https://shopee.com.br/hh_impotadora",
  "seller_image": "https://down-br.img.susercontent.com/file/br-11134216-7r98p-lluyu7i4fhti98",
  "seller_rating": 4.85,
  "seller_rating_count": 571318,
  "is_official_seller": false,
  "scraped_at": "2026-04-22T18:30:00+00:00"
}
```

### How to call this Shopee scraper from your code

#### From the Apify API (curl)

```bash
curl -X POST "https://api.apify.com/v2/acts/makework36~shopee-scraper-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "br",
    "mode": "categories",
    "categories": ["Celulares-e-Dispositivos-cat.11059988"],
    "maxProductsPerCategory": 100
  }'
```

#### From Python (apify-client)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("makework36/shopee-scraper-api").call(run_input={
    "country": "br",
    "mode": "discover",
    "maxTotalProducts": 2000,
    "workers": 8,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["price"], item["currency"])
```

#### From Node.js (apify-client)

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('makework36/shopee-scraper-api').call({
    country: 'mx',
    mode: 'discover',
    maxTotalProducts: 1000,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.table(items.slice(0, 10));
```

#### Export to CSV

From the Apify console or via API, convert the default dataset to CSV in one line:

```bash
curl "https://api.apify.com/v2/datasets/YOUR_DATASET_ID/items?format=csv" > shopee_products.csv
```

### Performance & cost

A typical `discover` run on `shopee.com.br` with default settings:

- **Phase 1 — discover categories**: ~1s (one HTTP request to the homepage)
- **Phase 2 — collect IDs**: ~3 min for 30 categories × 10 URL variants
- **Phase 3 — fetch products**: ~10 min for 7,000 products at 8 workers
- **Total**: ~13 min, ~1 GB memory, ~7,000 results

At $0.005/result this costs you **~$35** for 7,000 products — less than a third of what Playwright-based scrapers cost per run.

### Shopee scraper comparison — how this compares to other actors on the Store

| Approach | Fields | HTTP only | No proxy | Category tree | Countries | Price / 1K (FREE) |
|----------|:------:|:---------:|:--------:|:-------------:|:---------:|:-----------------:|
| **This actor (Googlebot SSR)** | **31** | ✅ | ✅ | ✅ 3-level | 11 | **$5** |
| Shopee scraper (browser + residential proxy) | 15 | ❌ | ❌ residential required | ❌ | 8 | $1 + proxy ~$30/mo |
| Shopee scraper (HTTP, premium-priced) | 14 | ✅ | ✅ | ❌ | 11 | $20 |
| Shopee scraper (browser, session cookie required) | 15 | ❌ | Partial | ❌ | 8 | $5 – $8 |

Numbers reflect the public state of the Shopee category on Apify Store as of the last update of this README. For low-to-medium volume (under 20,000 products/month) this actor is the cheapest **total-cost** option because you do not need to buy residential proxy bandwidth.

### Step-by-step tutorial — your first Shopee scraper run in 3 minutes

1. Open the actor page on Apify and click **Try for free**.
2. In the **Input** tab, pick `country = br` and `mode = categories`.
3. Set `categories` to `["Relógios-cat.11059996"]`.
4. Set `maxProductsPerCategory = 20` (keeps the run cheap while you learn the schema).
5. Click **Start**. The run takes ~40 seconds.
6. Open the **Dataset** tab — you will see ~20 rows with all 31 fields populated.
7. Click **Export** → `CSV` or `JSON` to download.

That is it — you just scraped Shopee Brazil without a proxy or a browser.

### Advanced usage patterns

#### Pattern 1 — weekly price monitor on one country

Schedule the actor to run every Monday at 09:00 with `mode=discover` and `maxTotalProducts=5000`. Each run overwrites a BigQuery table via Apify's integration. Track `price`, `discount_pct`, and `rating` week-over-week.

#### Pattern 2 — multi-country snapshot

Run 11 independent scheduled tasks, one per country, into 11 datasets. Join them on `country` + `category_1` for cross-market price comparisons.

#### Pattern 3 — seller intelligence for B2B leads

Use `mode=discover`, filter the output to `seller_rating_count > 10000` and `is_official_seller = false`. You get mid-sized, high-reputation sellers — the ideal prospects for payment processors, 3PL, or wholesale platforms.

#### Pattern 4 — category-specific catalog

For vertical use cases (e.g. beauty-only, electronics-only), run `mode=categories` with a curated list of slugs. More cost-efficient than `discover`.

#### Pattern 5 — deal-finder for affiliate content

Filter `discount_pct > 50` and `rating_count > 500`. Result: high-quality discounted products suitable for deal newsletters or affiliate feeds.

### Troubleshooting

**Empty or partial results** — Raise `delayMs` to 800 and drop `workers` to 4. Shopee returns 302 redirects when too many Googlebot-UA requests hit from the same IP window.

**Only one category showing up in the output** — Your `categories` slug likely points to a wrong ID. Category IDs differ across countries (`11059988` = Celulares on `.br`, not on other Shopees). Use `mode=discover` to get the correct slugs from the homepage.

**Some products are missing a `price` value** — Shopee occasionally renders a product as `Offer` instead of `AggregateOffer` with missing `price`. These are typically out-of-stock listings. Filter with `if availability == "InStock"` to avoid them.

**Rating count returned as `null`** — A handful of newly-listed products have no reviews yet. This is not a bug; treat `null` ratings as "not enough data".

**Category tree field empty** — The product's BreadcrumbList JSON-LD was missing. Rare, but happens on malformed product pages. Fallbacks to empty string.

### Pricing

Pay-per-event model, consistent with the rest of makework36's scrapers.

| Tier | Per product | Per start |
|------|:-----------:|:---------:|
| FREE | $0.005 | $0.05 |
| BRONZE | $0.0045 | $0.05 |
| SILVER | $0.004 | $0.05 |
| GOLD | $0.0035 | $0.05 |
| PLATINUM | $0.003 | $0.05 |
| DIAMOND | $0.003 | $0.05 |

Examples:

- 1,000 products on FREE = **$5.05**
- 10,000 products on SILVER = **$40.05**
- 50,000 products on GOLD = **$175.05**

### FAQ

**Is it legal to scrape Shopee?** Scraping public product pages is a legal grey area in most jurisdictions. The actor only requests pages that Shopee itself serves to Googlebot for SEO indexing — no login, no paywall bypass, no captcha evasion. Follow your own legal review and Shopee's [terms of service](https://shopee.com.br/docs/3603). This actor is for research, competitive intelligence, and catalog sync.

**Do I need a residential proxy?** No. For Brazil, Mexico, and most other supported countries the actor works from Apify's default IPs. If your runs start failing (rare), you can plug in any Apify proxy group in the actor settings.

**How fresh is the data?** The data reflects exactly what Shopee shows on the product page at the moment of the request. Typical round-trip is ~1–2 seconds per product.

**Can I scrape more than 200 products from one category?** No — 200 is the practical ceiling using SSR + sort-variant iteration. Beyond that you would need the protected `/api/v4/search_items` endpoint, which requires the encrypted `x-sap-sec` token.

**Do you support Shopee PH / VN / TH?** Yes, all 11 live countries. Locale headers are set automatically per country.

**What happens when Shopee changes its HTML?** The JSON-LD schema has been stable for years because Google's crawler relies on it. When Shopee changes a field shape, we patch the actor and ship a new build.

**Can I scrape product reviews?** Not yet — reviews live on the protected `/api/v4/item/get_ratings` endpoint. Roadmap item.

**Does the scraper respect `robots.txt`?** Partially. The actor behaves like Googlebot, which Shopee explicitly allows in `robots.txt`. We do not hit `/cart/`, `/checkout/`, `/user/`, or any Disallow path.

**Can I integrate this into Zapier or Make?** Yes — Apify has native connectors. Schedule the actor from Zapier, pipe the dataset into Airtable or Google Sheets.

**Why are prices so low in some rows?** Shopee BR has many low-ticket SKUs (R$1–R$10). That is real data, not a bug. Filter with `price > X` in your downstream pipeline if you only want premium SKUs.

### Changelog

**0.1.3 — 2026-04-22** — Initial public release. 31 fields, 11 countries, three input modes.

### Related scrapers from the same author

- [Amazon Mexico Scraper](https://apify.com/makework36/amazon-mexico-scraper) — Amazon.com.mx prices and listings, same HTTP-only philosophy.
- [Target Product Scraper](https://apify.com/makework36/target-scraper) — Target.com products via official RedSky API.
- [Vinted Product Scraper](https://apify.com/makework36/vinted-product-scraper) — Second-hand fashion listings from Vinted.
- [VRBO Scraper](https://apify.com/makework36/vrbo-scraper) — Vacation rentals + Expedia hotels API.
- [Booking.com Scraper API](https://apify.com/makework36/fast-booking-scraper) — Hotels, prices, ratings & rooms.
- [Airbnb Scraper](https://apify.com/makework36/fast-airbnb-price-scraper) — Listings, prices, photos & hosts API.

### Legal & ethics note

This actor scrapes public HTML that Shopee itself serves to search-engine crawlers. It does not bypass authentication, captchas, rate-limiting intended for end users, or any paid-API restriction. You remain responsible for how you use the extracted data — respect copyright, trademarks, and applicable data protection regulation (LGPD in Brazil, GDPR in Europe, etc.) when storing, transforming, or redistributing.

# Actor input Schema

## `country` (type: `string`):

Shopee country/domain to scrape.

## `mode` (type: `string`):

Scraping mode. `discover` auto-finds all categories; `categories` uses your list; `urls` scrapes specific product/category URLs.

## `categories` (type: `array`):

Category slugs (with -cat.NNN suffix). Used only when mode=categories. Example: \["Celulares-e-Dispositivos-cat.11059988"].

## `urls` (type: `array`):

Shopee URLs (product pages or category pages). Used only when mode=urls.

## `maxProductsPerCategory` (type: `integer`):

Hard cap of unique products to extract from each category. Shopee SSR returns ~40 per sort variant — actor cycles 5 sorts + 3 pages = up to ~200 unique.

## `maxTotalProducts` (type: `integer`):

Hard cap for the whole run across all categories.

## `sortOrders` (type: `array`):

Which sort orders to iterate to maximize unique IDs. More sorts = more unique products per category (up to ~200 with all 5).

## `workers` (type: `integer`):

Parallel HTTP workers for product fetching.

## `delayMs` (type: `integer`):

Throttle delay to reduce rate-limit risk. Increase if seeing 302 redirects.

## Actor input object example

```json
{
  "country": "br",
  "mode": "discover",
  "categories": [],
  "urls": [],
  "maxProductsPerCategory": 200,
  "maxTotalProducts": 2000,
  "sortOrders": [
    "relevancy",
    "sales",
    "price_desc"
  ],
  "workers": 8,
  "delayMs": 300
}
```

# Actor output Schema

## `dataset` (type: `string`):

All scraped items in the default dataset (JSON).

## `csv` (type: `string`):

Default dataset formatted as CSV for spreadsheets (Google Sheets, Excel).

# 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("makework36/shopee-scraper-api").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("makework36/shopee-scraper-api").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 makework36/shopee-scraper-api --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Shopee Scraper API - Products, Prices, Discounts & Images",
        "description": "Scrape Shopee products across 11 countries. HTTP only, no browser, pay per result. Full category tree, AggregateOffer price range, seller rating, discount captured.",
        "version": "0.1",
        "x-build-id": "UVnjg2HnPI39N4uNV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/makework36~shopee-scraper-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-makework36-shopee-scraper-api",
                "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/makework36~shopee-scraper-api/runs": {
            "post": {
                "operationId": "runs-sync-makework36-shopee-scraper-api",
                "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/makework36~shopee-scraper-api/run-sync": {
            "post": {
                "operationId": "run-sync-makework36-shopee-scraper-api",
                "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": [
                    "country",
                    "mode"
                ],
                "properties": {
                    "country": {
                        "title": "Country",
                        "enum": [
                            "br",
                            "sg",
                            "my",
                            "th",
                            "ph",
                            "vn",
                            "id",
                            "tw",
                            "mx",
                            "co",
                            "cl"
                        ],
                        "type": "string",
                        "description": "Shopee country/domain to scrape.",
                        "default": "br"
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "discover",
                            "categories",
                            "urls"
                        ],
                        "type": "string",
                        "description": "Scraping mode. `discover` auto-finds all categories; `categories` uses your list; `urls` scrapes specific product/category URLs.",
                        "default": "discover"
                    },
                    "categories": {
                        "title": "Category slugs",
                        "type": "array",
                        "description": "Category slugs (with -cat.NNN suffix). Used only when mode=categories. Example: [\"Celulares-e-Dispositivos-cat.11059988\"].",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "urls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "Shopee URLs (product pages or category pages). Used only when mode=urls.",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxProductsPerCategory": {
                        "title": "Max products per category",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Hard cap of unique products to extract from each category. Shopee SSR returns ~40 per sort variant — actor cycles 5 sorts + 3 pages = up to ~200 unique.",
                        "default": 200
                    },
                    "maxTotalProducts": {
                        "title": "Max total products",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Hard cap for the whole run across all categories.",
                        "default": 2000
                    },
                    "sortOrders": {
                        "title": "Sort orders",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Which sort orders to iterate to maximize unique IDs. More sorts = more unique products per category (up to ~200 with all 5).",
                        "items": {
                            "type": "string",
                            "enum": [
                                "relevancy",
                                "sales",
                                "ctime",
                                "price",
                                "price_desc"
                            ]
                        },
                        "default": [
                            "relevancy",
                            "sales",
                            "price_desc"
                        ]
                    },
                    "workers": {
                        "title": "Concurrent workers",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Parallel HTTP workers for product fetching.",
                        "default": 8
                    },
                    "delayMs": {
                        "title": "Min delay (ms) between requests",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Throttle delay to reduce rate-limit risk. Increase if seeing 302 redirects.",
                        "default": 300
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
