# Lazada Scraper + Price Monitor — SEA Search & Price Alerts (`subimpact/lazada-scraper`) Actor

Scrape Lazada search and category results across 6 SEA markets (MY/SG/TH/ID/PH/VN). Pure HTTP — no proxy, no browser. Monitor price drops, stock flips and sold-count changes with scheduled runs and webhook alerts. $0.10 start + $0.00099/product + $0.003/check + $0.01/alert.

- **URL**: https://apify.com/subimpact/lazada-scraper.md
- **Developed by:** [subimpact](https://apify.com/subimpact) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 33.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / actor start

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/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

## Lazada Scraper + Price Monitor

Scrape Lazada product search results and category pages across all 6 SEA markets. Monitor prices, stock changes, and sold counts with scheduled runs and webhook alerts.

**Pure HTTP — no browser, no proxy required.** Lazada's catalog API returns clean JSON from datacenter IPs at HTTP 200.

### Markets supported

| Country | Domain |
|---|---|
| Malaysia (MY) | www.lazada.com.my |
| Singapore (SG) | www.lazada.sg |
| Thailand (TH) | www.lazada.co.th |
| Indonesia (ID) | www.lazada.co.id |
| Philippines (PH) | www.lazada.com.ph |
| Vietnam (VN) | www.lazada.vn |

### What it scrapes

**Search mode:** Keyword search results (`/catalog/?q=iphone&ajax=true`) — up to 40 products/page, paginated to your limit.

**Category mode:** Category browse pages (`/shop-mobiles/?ajax=true`) — same JSON shape, same pagination.

**Scope — v1:** Search and category listing data only. Product detail pages, reviews, and seller storefronts are blocked by Lazada's anti-bot system (x5sec 302 redirect) and are out of scope for this version.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `country` | enum | `my` | Market: `my`, `sg`, `th`, `id`, `ph`, `vn` |
| `mode` | enum | `search` | `search` (use `queries`) or `category` (use `categoryUrls`) |
| `queries` | string\[] | — | Search keywords. Required for `mode=search`. |
| `categoryUrls` | string\[] | — | Category browse URLs. Required for `mode=category`. |
| `maxResultsPerQuery` | integer | `1000` | Max products per keyword/URL. Hard cap: 5000. |
| `sort` | enum | `popularity` | `popularity`, `priceasc`, `pricedesc` |
| `minPrice` | integer | — | Optional client-side price floor (local currency). |
| `maxPrice` | integer | — | Optional client-side price ceiling (local currency). |
| `monitor` | boolean | `false` | Enable price monitor mode. |
| `monitorWatchList` | array | `[]` | `[{"itemId":"123","targetPrice":99}]` or `[{"itemUrl":"//..."}]`. Leave empty to watch all scraped items. |
| `webhookUrl` | string | — | POST alerts JSON here when changes are detected. |
| `proxyUrls` | string\[] | — | Optional escape hatch — not needed for this endpoint. |

### Output

Each row in the default dataset:

| Field | Type | Description |
|---|---|---|
| `itemId` | string | Lazada product item ID |
| `name` | string | Listing title |
| `brandName` | string | Brand |
| `price` | number | Current price (local currency units) |
| `priceShow` | string | Price as shown (e.g. `RM5,939.00`) |
| `originalPrice` | number | Pre-discount price |
| `discount` | string | Discount label (e.g. `11% Off`) |
| `currency` | string | ISO 4217 code (`MYR`, `SGD`, `THB`, `IDR`, `PHP`, `VND`) |
| `ratingScore` | number | Average star rating |
| `reviewCount` | integer | Number of reviews |
| `soldCount` | integer | Units sold (parsed: `"1.7K sold"` → `1700`) |
| `inStock` | boolean | Availability |
| `isSponsored` | boolean | Sponsored listing |
| `location` | string | Seller location (state/region) |
| `sellerName` | string | Store display name |
| `itemUrl` | string | Full HTTPS product URL |
| `image` | string | Main product image URL |
| `country` | string | Market code |
| `query` | string | Search keyword or category label |
| `scrapedAt` | string | ISO 8601 timestamp |

**Monitor mode adds:** `previousPrice`, `priceDelta`, `priceDropPct`, `changeType` (`price_changed` / `stock_flip` / `sold_delta` / `removed`), `alerts[]`

Monitor alerts also go to a separate `alerts` dataset and — if configured — are POSTed to your `webhookUrl`.

### Example output

```json
{
  "itemId": "4754594560",
  "name": "Apple iPhone 17 Pro Max",
  "brandName": "Apple",
  "price": 5939,
  "priceShow": "RM5,939.00",
  "originalPrice": 6699,
  "discount": "11% Off",
  "currency": "MYR",
  "ratingScore": 4.97,
  "reviewCount": 548,
  "soldCount": 1700,
  "inStock": true,
  "isSponsored": false,
  "location": "Selangor",
  "sellerName": "UR bySwitch",
  "itemUrl": "https://www.lazada.com.my/products/pdp-i4754594560.html",
  "country": "my",
  "query": "iphone",
  "scrapedAt": "2026-09-08T10:00:00.000Z"
}
```

### Pricing

Pay-per-event (PPE):

| Event | Price | When |
|---|---|---|
| `apify-actor-start` | $0.10 | Once per run |
| `products-scraped` | $0.00099 per product | Every product row delivered |
| `product-checked` | $0.003 per item | Monitor mode only, per item checked |
| `alert-created` | $0.01 per alert | Monitor mode only, when a change is detected |

**Example cost:** 1,000 products scraped = $0.10 (start) + $0.99 (products) = **$1.09 total**. No proxy fees, no browser compute fees.

### Price monitor

Schedule this Actor to run on a recurring interval. On each run:

1. Products are scraped fresh from your queries.
2. Each item is compared to the snapshot saved from the previous run (stored in Apify KV store).
3. Changes in price, stock status, or sold count generate alert objects.
4. First run = baseline only (no alerts).
5. Alerts are pushed to the `alerts` dataset and optionally POSTed to your `webhookUrl`.

**Removal detection:** Items that disappear from results are flagged as `removed` — but only when the current run returned healthy full pages (guard against false positives from pagination glitches).

### Ethics and legal note

This Actor scrapes Lazada's **public** product listings — the same data visible to any visitor without logging in. No credentials are used. No personal data is collected. Rate is limited to ~5 concurrent requests with delays. Respect Lazada's terms of service and use this tool responsibly.

# Actor input Schema

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

Lazada market to scrape. Each country uses its own domain (my → lazada.com.my, sg → lazada.sg, etc.).

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

search = keyword search (use queries). category = browse a category page (use categoryUrls).

## `queries` (type: `array`):

Keywords to search for. One keyword per line. Example: \["iphone 15", "samsung galaxy"]. Required when mode=search.

## `categoryUrls` (type: `array`):

Lazada category browse URLs. Example: https://www.lazada.com.my/shop-mobiles/ Required when mode=category.

## `maxResultsPerQuery` (type: `integer`):

Maximum products to collect per keyword or category URL. This is your cost ceiling: products scraped × $0.00099. Hard cap: 5000.

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

Result sort order. Popularity = Lazada's default ranking.

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

Optional. Keep only products with price ≥ this value (in local currency units).

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

Optional. Keep only products with price ≤ this value (in local currency units).

## `monitor` (type: `boolean`):

Compare current prices/stock with the previous run's snapshot. Generates alerts for price changes, stock flips and sold-count deltas. Schedule this Actor to run regularly to get ongoing alerts.

## `monitorWatchList` (type: `array`):

Specific products to monitor. Each entry: { "itemId": "123", "targetPrice": 99 } or { "itemUrl": "//www.lazada.com.my/products/pdp-i123.html" }. Leave empty to monitor all products from your queries.

## `webhookUrl` (type: `string`):

Optional. When price/stock alerts fire, POST the alert payload (JSON) to this URL.

## `proxyUrls` (type: `array`):

Optional. Your own proxy URLs (http://user:pass@host:port). Not needed — Lazada catalog works from datacenter IPs — but available as a future escape hatch.

## Actor input object example

```json
{
  "country": "my",
  "mode": "search",
  "queries": [
    "iphone"
  ],
  "maxResultsPerQuery": 1000,
  "sort": "popularity",
  "monitor": false
}
```

# Actor output Schema

## `runId` (type: `string`):

Apify Actor run ID

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

Market code (my/sg/th/id/ph/vn)

## `sourceUrl` (type: `string`):

Catalog URL this item was scraped from

## `query` (type: `string`):

Search keyword or category label

## `page` (type: `string`):

Result page number

## `itemId` (type: `string`):

Lazada product item ID

## `skuId` (type: `string`):

Lazada cheapest SKU ID

## `itemUrl` (type: `string`):

Full HTTPS URL to the product listing page

## `name` (type: `string`):

Listing title

## `brandName` (type: `string`):

Brand name

## `price` (type: `string`):

Current price (numeric, in local currency units)

## `priceShow` (type: `string`):

Price as shown in the listing (e.g. RM5,939.00)

## `originalPrice` (type: `string`):

Pre-discount price (numeric)

## `discount` (type: `string`):

Discount label (e.g. 11% Off)

## `currency` (type: `string`):

ISO 4217 currency code (MYR/SGD/THB/IDR/PHP/VND)

## `ratingScore` (type: `string`):

Average star rating

## `reviewCount` (type: `string`):

Number of customer reviews

## `soldCount` (type: `string`):

Units sold (parsed from '1.7K sold' → 1700)

## `location` (type: `string`):

Seller location (state/region)

## `sellerName` (type: `string`):

Store display name

## `sellerId` (type: `string`):

Lazada seller/store ID

## `inStock` (type: `string`):

Whether the item is currently in stock

## `isSponsored` (type: `string`):

Whether this is a sponsored listing

## `image` (type: `string`):

Primary product image URL

## `thumbs` (type: `string`):

Array of thumbnail image objects

## `categories` (type: `string`):

Category IDs

## `description` (type: `string`):

Short product description

## `scrapedAt` (type: `string`):

ISO 8601 timestamp of when this row was collected

## `previousPrice` (type: `string`):

Monitor mode: price from the previous run snapshot

## `priceDelta` (type: `string`):

Monitor mode: current price minus previous price

## `priceDropPct` (type: `string`):

Monitor mode: percentage price change (negative = drop)

## `changeType` (type: `string`):

Monitor mode: price\_changed | stock\_flip | sold\_delta | new\_listing | removed

## `alerts` (type: `string`):

Monitor mode: list of alert objects for this item

# 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": "my",
    "mode": "search",
    "queries": [
        "iphone"
    ],
    "maxResultsPerQuery": 1000,
    "sort": "popularity"
};

// Run the Actor and wait for it to finish
const run = await client.actor("subimpact/lazada-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 = {
    "country": "my",
    "mode": "search",
    "queries": ["iphone"],
    "maxResultsPerQuery": 1000,
    "sort": "popularity",
}

# Run the Actor and wait for it to finish
run = client.actor("subimpact/lazada-scraper").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": "my",
  "mode": "search",
  "queries": [
    "iphone"
  ],
  "maxResultsPerQuery": 1000,
  "sort": "popularity"
}' |
apify call subimpact/lazada-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/XG92khmkSwNOxXYHB/builds/N4RCktmlryUbbkfq9/openapi.json
