> ## 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.

# Lazada Products API

> Lazada products with title, URL, marketplace, price, list price and currency. Search by keyword or country.

`POST /v1/data/lazada/products/run`

**Pricing:** $0.0025 per product ($2.50 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*

Lazada marketplace to search. Lazada runs in six Southeast Asian countries. Example: Singapore (sg) searches lazada.sg.

Allowed values: `id` (Indonesia), `my` (Malaysia), `ph` (Philippines), `sg` (Singapore), `th` (Thailand), `vn` (Vietnam).

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

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

**sortBy** `string` (default: popularity)

Sort By to use. Best match by default.

Allowed values: `popularity` (Best match), `priceasc` (Price: low to high), `pricedesc` (Price: high to low).

**minPrice** `integer`

Min Price as a whole number.

Min `0`.

**maxPrice** `integer`

Max Price as a whole number.

Min `0`.

## Example

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

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

r = requests.post(
    "https://api.mindcase.co/v1/data/lazada/products/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "query": "anker power bank",
    "country": "sg",
    "sortBy": "popularity",
    "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/lazada/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",
  "sortBy": "popularity",
  "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 |
| - | - | - |
| `productId` | Product ID | text |
| `title` | Title | text |
| `productUrl` | Product URL | url |
| `marketplace` | Marketplace | text |
| `price` | Price | number |
| `currency` | Currency | text |
| `listPrice` | List Price | number |
| `discountPercent` | Discount Percent | number |
| `rating` | Rating | rating |
| `ratingsCount` | Ratings Count | number |
| `soldCount` | Sold Count | number |
| `soldBy` | Sold By | text |
| `sellerId` | Seller ID | text |
| `sellerLocation` | Seller Location | text |
| `brand` | Brand | text |
| `inStock` | In Stock | boolean |
| `searchRank` | Search Rank | number |
| `skuId` | SKU ID | text |
| `mainImage` | Main Image | url |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "lazada/products",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "rating": 4.937062937062937,
      "productId": "3452164376",
      "soldCount": 1500,
      "discountPercent": 11,
      "marketplace": "SG",
      "brand": "Anker",
      "sellerLocation": "Singapore",
      "mainImage": "https://sg-test-11.slatic.net/p/9d360dd097665edba2c4882f540dfbfc.jpg",
      "ratingsCount": 429,
      "inStock": true,
      "skuId": "22928377330",
      "searchRank": 1,
      "sellerId": "1143267064",
      "soldBy": "Anker Official Shop",
      "title": "[CCC Certified!] [Free Cables!] Anker Laptop Power Bank 25000mAh 165W Portable with Triple USB-C Ports for Multi-Device Charging Built-in and Retractable Cab...",
      "productUrl": "https://www.lazada.sg/products/pdp-i3452164376.html",
      "currency": "SGD",
      "listPrice": 152.9,
      "price": 135.9
    }
  ]
}
```


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