> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopee Products API

> Shopee products with title, price, original price and discount. Search by keyword or country.

`POST /v1/data/shopee/products/run`

**Pricing:** $0.001 per product ($1.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**query** `string` *required*

Search Query.

**country** `string` *required*

Country to use.

Allowed values: `ID` (🇮🇩 Indonesia (shopee.co.id)), `SG` (🇸🇬 Singapore (shopee.sg)), `MY` (🇲🇾 Malaysia (shopee.com.my)), `PH` (🇵🇭 Philippines (shopee.ph)), `TH` (🇹🇭 Thailand (shopee.co.th)), `VN` (🇻🇳 Vietnam (shopee.vn)), `BR` (🇧🇷 Brazil (shopee.com.br)), `TW` (🇹🇼 Taiwan (shopee.tw)), `MX` (🇲🇽 Mexico (shopee.com.mx)), `CO` (🇨🇴 Colombia (shopee.com.co)), `CL` (🇨🇱 Chile (shopee.cl)).

**maxResults** `integer` (default: 100)

How many products to return in total. Defaults to 100; use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/shopee/products/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "query": "anker power bank",
    "country": "SG",
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/shopee/products/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "query": "anker power bank",
    "country": "SG",
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/shopee/products/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "query": "anker power bank",
  "country": "SG",
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one product, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `productUrl` | Product URL | url |
| `itemId` | Item ID | text |
| `shopId` | Shop ID | text |
| `title` | Title | text |
| `price` | Price | number |
| `originalPrice` | Original Price | number |
| `discountPercent` | Discount Percent | percentage |
| `currency` | Currency | text |
| `country` | Country | text |
| `rating` | Rating | rating |
| `ratingsCount` | Ratings Count | number |
| `location` | Location | text |
| `shopName` | Shop Name | text |
| `shopUrl` | Shop URL | url |
| `shopRating` | Shop Rating | rating |
| `shopRatingsCount` | Shop Ratings Count | number |
| `labels` | Labels | array |
| `image` | Image | url |
| `searchRank` | Search Rank | number |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "shopee/products",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "rating": 4.9,
      "shopId": "1207882859",
      "discountPercent": 23,
      "itemId": "28438208690",
      "country": "SG",
      "shopName": "Anker Official Shop",
      "ratingsCount": null,
      "shopRatingsCount": 25024,
      "shopUrl": "https://shopee.sg/ankerofficialshop.sg",
      "location": null,
      "labels": [
        "Free Gift"
      ],
      "searchRank": 1,
      "title": "[CCC Certified]Anker Laptop Power Bank 25,000mAh Portable Charger with Triple 100W USB-C Ports for Multi-Device Charging, Built-In and Retractable Cables-A1695",
      "productUrl": "https://shopee.sg/product/1207882859/28438208690",
      "originalPrice": null,
      "image": "https://down-sg.img.susercontent.com/file/cn-11134207-820l4-mqmsuldc8wsu8b",
      "currency": "SGD",
      "price": 116.98,
      "shopRating": 4.92
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.