# Shopee Search & Category Scraper - Cheapest (`xtracto/shopee-search`) Actor

Search Shopee products by keyword, category URL, or any Shopee listing URL. Optionally enrich each result with full product detail (price variants, stock, images, attributes, seller info) across multiple countries. Fast, lightweight, and no browser or account required.

- **URL**: https://apify.com/xtracto/shopee-search.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** E-commerce, Automation, Lead generation
- **Stats:** 981 total users, 223 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $5.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Search & Category Scraper

Search Shopee products by keyword, browse a category page, or auto-detect
any Shopee listing URL. Returns lightweight product cards by default, or
fully enriched product detail when `fetchDetail: true`.

***

### Related Actors

<table>
  <tr>
    <td colspan="4"><strong>Shopee Scraper Suite</strong> &nbsp;·&nbsp; Search, browse, get full product detail, and extract entire shop catalogs across 11 Shopee countries</td>
  </tr>
  <tr valign="top">
    <td width="25%"><a href="https://apify.com/xtracto/shopee-scraper"><strong>All-in-One</strong></a><br/><sub>Every mode in one actor</sub></td>
    <td width="25%"><strong>Search &amp; Category</strong><br/><strong>&#9656; You are here</strong><br/><sub>Keyword &amp; category listings</sub></td>
    <td width="25%"><a href="https://apify.com/xtracto/shopee-product-detail"><strong>Product Detail</strong></a><br/><sub>Full single-product data</sub></td>
    <td width="25%"><a href="https://apify.com/xtracto/shopee-shop-scraper"><strong>Shop Scraper</strong></a><br/><sub>Every product from a shop</sub></td>
  </tr>
</table>

***

### Modes

| Mode | Input | What you get |
|------|-------|--------------|
| `keyword` | Search term | A list of product cards matching the keyword |
| `category` | Category path or URL | All products listed under that category |
| `url` | Any Shopee URL | Auto-detected: search, category, or shop listing |

***

### Supported Countries

| Code | Domain |
|------|--------|
| `id` | shopee.co.id (Indonesia) |
| `sg` | shopee.sg (Singapore) |
| `my` | shopee.com.my (Malaysia) |
| `th` | shopee.co.th (Thailand) |
| `ph` | shopee.ph (Philippines) |
| `vn` | shopee.vn (Vietnam) |
| `br` | shopee.com.br (Brazil) |
| `tw` | shopee.tw (Taiwan) |
| `mx` | shopee.com.mx (Mexico) |
| `co` | shopee.com.co (Colombia) |
| `cl` | shopee.cl (Chile) |

***

### Where the request comes from matters

Search and shop listing pages work for every country regardless of where
your request comes from. Two specific cases need attention:

- **`category` mode for `co` (Colombia) and `cl` (Chile)** — these regions
  do not expose category pages publicly. The actor will stop early with a
  clear message. Use `keyword` or `shop` mode instead, or pick a different
  country.
- **`fetchDetail: true`** — to enrich each product with full information
  (description, brand, variants, attributes, image gallery), the request
  must originate inside the target country. On Apify Cloud this is handled
  automatically for `id`/`sg`/`my`/`th`/`ph` via residential proxy. From
  outside, or for `vn`/`br`/`tw`/`mx`/`co`/`cl`, enrichment returns a
  lighter set (title, price, primary image, rating, sold count, seller
  info).

#### What you get per country × mode

| Country | `keyword` | `category` | `url` | `fetchDetail: true` on Apify Cloud | `fetchDetail: true` running locally |
|---------|:---------:|:----------:|:-----:|:-----------------------------------:|:------------------------------------:|
| `id` | ✅ | ✅ | ✅ | ✅ Full | ✅ Full |
| `sg` | ✅ | ✅ | ✅ | ✅ Full (residential proxy used) | ⚠️ Light |
| `my` | ✅ | ✅ | ✅ | ✅ Full (residential proxy used) | ⚠️ Light |
| `th` | ✅ | ✅ | ✅ | ✅ Full (residential proxy used) | ⚠️ Light |
| `ph` | ✅ | ✅ | ✅ | ✅ Full (residential proxy used) | ⚠️ Light |
| `vn` | ✅ | ✅ | ✅ | ⚠️ Light | ⚠️ Light |
| `br` | ✅ | ✅ | ✅ | ⚠️ Light | ⚠️ Light |
| `tw` | ✅ | ✅ | ✅ | ⚠️ Light | ⚠️ Light |
| `mx` | ✅ (60–70% have a price) | ✅ | ✅ | ⚠️ Light | ⚠️ Light |
| `co` | ✅ | ❌ Not available | ✅ (except category URLs) | ⚠️ Light | ⚠️ Light |
| `cl` | ✅ | ❌ Not available | ✅ (except category URLs) | ⚠️ Light | ⚠️ Light |

**Full** = title, price range, description, brand, all variant names, all
attributes, all images, full categories, breadcrumb, seller info.

**Light** = title, price, primary image, rating, sold count, seller info.

***

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country` | select | No (default: `id`) | Country site |
| `mode` | select | **Yes** | `keyword` / `category` / `url` |
| `keyword` | string | When `mode=keyword` | Search term |
| `category` | string | When `mode=category` | Slug or full category URL |
| `url` | string | When `mode=url` | Any Shopee URL |
| `sort` | select | No | `relevancy` / `sales` / `newest` / `price_asc` / `price_desc` |
| `maxProducts` | integer | No (default: `40`) | Maximum number of products to return |
| `minPrice` / `maxPrice` | integer | No | Price filter (keyword mode only) |
| `fetchDetail` | boolean | No (default: `false`) | Enrich each card with full product detail |
| `delay` | number | No (default: `1.0`) | Delay between requests (seconds) |

***

### Sample Input

#### Keyword search

```json
{
  "country": "sg",
  "mode": "keyword",
  "keyword": "laptop gaming",
  "sort": "sales",
  "maxProducts": 40
}
```

#### Category page

```json
{
  "country": "id",
  "mode": "category",
  "category": "/Laptop-cat.11044364.11044440",
  "maxProducts": 40
}
```

#### Auto-detect from any URL

```json
{
  "mode": "url",
  "url": "https://shopee.sg/search?keyword=mouse+wireless"
}
```

***

### Sample Output

#### Default — one product card per row

Each item in the dataset looks like this:

```json
{
  "shop_id": 12345678,
  "item_id": 98765432100,
  "name": "Laptop Gaming ASUS ROG Strix G15 Ryzen 7 16GB 512GB RTX3060",
  "url": "https://shopee.co.id/Laptop-Gaming-ASUS-ROG-i.12345678.98765432100",
  "image_url": "https://down-id.img.susercontent.com/file/id-11134207-xxx",
  "price": 14999000,
  "original_price": 17500000,
  "discount_pct": 14,
  "rating": 4.9,
  "rating_count": 312,
  "sold_count": 1200,
  "location": "Jakarta Barat",
  "is_mall": false,
  "currency": "IDR"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `shop_id` / `item_id` | integer | Shopee internal IDs (combine to rebuild the product URL) |
| `name` | string | Product title |
| `url` | string | Full product URL |
| `image_url` | string | Primary thumbnail |
| `price` | number | Current displayed price in local currency |
| `original_price` | number | Price before discount (if on sale) |
| `discount_pct` | integer | Discount percentage (e.g. `14` = 14% off) |
| `rating` | number | Average star rating (0–5) |
| `rating_count` | integer | Number of reviews |
| `sold_count` | integer | Best-effort sold count (may be `null`) |
| `location` | string | Seller location (city / province) |
| `is_mall` | boolean | `true` if seller is a Shopee Mall verified shop |
| `currency` | string | Local currency code (IDR, SGD, MYR, etc.) |

#### When `fetchDetail: true` — full product detail per row

```json
{
  "shop_id": 196846900,
  "item_id": 11089699432,
  "title": "Laptop Lenovo Thinkpad X1 Carbon 6th Intel Core i5 Gen8 16GB 256GB",
  "currency": "IDR",
  "description": "Laptop bekas berkualitas premium, sudah dicek dan bersih...",
  "brand": "Lenovo",
  "brand_id": 52756,
  "condition": 4,
  "cat_id": 11044440,
  "price": 3570000.0,
  "price_min": 3200000.0,
  "price_max": 8370000.0,
  "price_before_discount": null,
  "discount_pct": null,
  "availability": "InStock",
  "stock": 31,
  "is_hide_stock": false,
  "rating_star": 4.87,
  "rating_count": [55, 0, 0, 1, 5, 49],
  "total_ratings": 55,
  "images": [
    "https://down-id.img.susercontent.com/file/id-11134207-7ra0n-xxx",
    "https://down-id.img.susercontent.com/file/id-11134207-7ra0n-yyy"
  ],
  "attributes": [
    { "name": "Screen Size", "value": "14 inches" },
    { "name": "Operating System", "value": "Windows" },
    { "name": "Processor Type", "value": "Intel Core i5" }
  ],
  "models": [
    {
      "model_id": 227787022248,
      "name": "i5 Gen8 RAM 16GB / 256GB SSD",
      "price": null,
      "stock": null,
      "has_stock": true
    }
  ],
  "tier_variations": [
    { "name": "Configuration", "options": ["i5 Gen8 16GB/256GB", "i7 Gen8 16GB/512GB"] }
  ],
  "categories": [
    { "catid": 11044364, "name": "Computers & Accessories" },
    { "catid": 11044440, "name": "Laptops" }
  ],
  "breadcrumb": [
    { "position": 1, "name": "Shopee" },
    { "position": 2, "name": "Computers & Accessories" },
    { "position": 3, "name": "Laptops" }
  ],
  "shop": {
    "shopid": 196846900,
    "name": "RASYIDJAYA COMPUTER",
    "username": "rasyidjaya_computer",
    "location": "KOTA BANDUNG",
    "rating_star": 4.84,
    "item_count": 120,
    "follower_count": 2248,
    "response_rate": 98,
    "response_time": 2
  }
}
```

> Fields available depend on the country and where the request comes from
> — see the support matrix above. For countries marked **Light**, only
> `shop_id`, `item_id`, `title`, `currency`, `price`, `images` (primary),
> `rating_star`, `sold`, `shop_location`, and `shop` are returned.

***

### Known Limitations

- **Roughly 40 products per search page.** The actor pages through
  additional sort orders to surface more unique results, but the total can
  fall short of `maxProducts` for narrow queries.
  > **Tip — to collect more varied results, run several related keywords**
  > instead of relying on one broad term. For example, rather than only
  > `laptop`, run separate searches for `laptop`, `laptop gaming`,
  > `laptop bekas`, `laptop asus`, `notebook`, etc., then merge the
  > datasets. Each keyword surfaces a different slice of Shopee's catalog,
  > so combining them yields far broader coverage than a single search.
- **`category` mode is not available for Colombia and Chile.** These
  regions do not expose category pages publicly. Use `keyword` or `shop`
  mode for those countries.
- **Mexico shows fewer prices.** Roughly 30–40% of products on Shopee
  Mexico do not have a public price — those will come back with
  `price: null`.
- **`fetchDetail: true` returns a lighter data set** for `vn`, `br`, `tw`,
  `mx`, `co`, `cl`, even on Apify Cloud. Description, brand, variant list,
  attributes, and the full image gallery are not available for these
  countries.
- **"Sold count" is missing for most products.** Shopee hides this number;
  the actor recovers it on a best-effort basis (~30–50% of products)

# Actor input Schema

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

Shopee regional site. Notes: (1) mode=category is NOT available for Colombia (co) and Chile (cl) — these regions do not expose category pages publicly; the actor will stop early with a clear message. (2) fetchDetail=true returns full product data (description, brand, all variants, attributes, image gallery) only for id/sg/my/th/ph when running on Apify Cloud (residential proxy is used automatically); for other countries you receive a lighter set: title, price, primary image, rating, sold count, seller info.

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

How to search for products.

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

Search keyword. Required for mode=keyword. Example: 'laptop gaming'

## `category` (type: `string`):

Category slug or full URL. Required for mode=category. Example: /Laptop-cat.11044364.11044440

## `url` (type: `string`):

Any Shopee search/category URL. Required for mode=url. Country is auto-detected. Example: https://shopee.co.id/search?keyword=laptop

## `sort` (type: `string`):

Sort order for search results.

## `maxProducts` (type: `integer`):

Maximum number of products to return.

## `minPrice` (type: `integer`):

Minimum price in local currency. Only for mode=keyword.

## `maxPrice` (type: `integer`):

Maximum price in local currency. Only for mode=keyword.

## `fetchDetail` (type: `boolean`):

If enabled, each product card is enriched with full detail: description, brand, all variants, attributes, image gallery, seller info, and more. Uses more requests and takes longer — recommended for small batches (≤20 products). Detail richness varies by country (see the country field for details).

## `delay` (type: `number`):

Delay between HTTP requests.

## Actor input object example

```json
{
  "country": "id",
  "mode": "keyword",
  "keyword": "laptop gaming",
  "category": "/Laptop-cat.11044364.11044440",
  "url": "https://shopee.co.id/search?keyword=laptop",
  "sort": "relevancy",
  "maxProducts": 40,
  "fetchDetail": false,
  "delay": 1
}
```

# 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 = {
    "country": "id",
    "mode": "keyword",
    "keyword": "laptop gaming",
    "category": "/Laptop-cat.11044364.11044440",
    "url": "https://shopee.co.id/search?keyword=laptop",
    "sort": "relevancy",
    "maxProducts": 40,
    "fetchDetail": false,
    "delay": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/shopee-search").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 = {
    "country": "id",
    "mode": "keyword",
    "keyword": "laptop gaming",
    "category": "/Laptop-cat.11044364.11044440",
    "url": "https://shopee.co.id/search?keyword=laptop",
    "sort": "relevancy",
    "maxProducts": 40,
    "fetchDetail": False,
    "delay": 1,
}

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

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

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

```

## CLI example

```bash
echo '{
  "country": "id",
  "mode": "keyword",
  "keyword": "laptop gaming",
  "category": "/Laptop-cat.11044364.11044440",
  "url": "https://shopee.co.id/search?keyword=laptop",
  "sort": "relevancy",
  "maxProducts": 40,
  "fetchDetail": false,
  "delay": 1
}' |
apify call xtracto/shopee-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/shopee-search"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4nhvc7lTKzkDrk7bD/builds/fgeIoRFguP1Iu7Deh/openapi.json
