# Daraz Product Scraper (`powerbox/daraz-product-scraper`) Actor

Scrape Daraz products by keyword or category across PK, BD, NP, LK, and MM

- **URL**: https://apify.com/powerbox/daraz-product-scraper.md
- **Developed by:** [PowerBox](https://apify.com/powerbox) (community)
- **Categories:** Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Daraz Product Scraper

Turn Daraz search and category pages into clean, structured JSON product data across **Pakistan**, **Bangladesh**, **Nepal**, **Sri Lanka**, and **Myanmar**.

`Prices` · `Discounts` · `Sellers` · `Ratings` · `Stock` · `Badges` · `Images` · `URLs`

### Features

- **Multi-keyword search** — each term runs independently; results merge into one Dataset
- **Category / catalog / search URLs** — crawl listing pages with automatic pagination
- **Filters** — sort by popularity or price, min/max price, min rating, in-stock only
- **Deduplication** — the same product across pages, keywords, and categories is stored once
- **Normalized fields** — numeric prices, ISO currency codes, seller, rating, sold count, badges

### Supported marketplaces

| Code | Country | Domain | Currency |
| --- | --- | --- | --- |
| `pk` | Pakistan | daraz.pk | PKR |
| `bd` | Bangladesh | daraz.com.bd | BDT |
| `np` | Nepal | daraz.com.np | NPR |
| `lk` | Sri Lanka | daraz.lk | LKR |
| `mm` | Myanmar | shop.com.mm | MMK |

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `country_domain` | string | `pk` | Marketplace code |
| `search_keywords` | array | — | Search terms |
| `startUrls` | array | — | Category / catalog / search URLs (not product-detail pages) |
| `limitType` | string | `maxProducts` | Cap by product count or page count (per source) |
| `maxProducts` | integer | `100` | Products per keyword / URL (`0` = unlimited within page hard cap) |
| `maxPages` | integer | `3` | Pages per keyword / URL |
| `sortBy` | string | — | `popularity` · `priceasc` · `pricedesc` |
| `minPrice` / `maxPrice` | integer | — | Local-currency price band |
| `minRating` | integer | — | 1–5 stars |
| `includeOutOfStock` | boolean | `true` | Set `false` to skip unavailable listings |
| `proxyConfiguration` | object | Apify Proxy on | Optional proxy settings |

Provide at least one of `search_keywords` or `startUrls`.

#### Example

```json
{
  "country_domain": "pk",
  "search_keywords": ["wireless headphones"],
  "sortBy": "priceasc",
  "minRating": 4,
  "maxPrice": 60000,
  "includeOutOfStock": false,
  "limitType": "maxProducts",
  "maxProducts": 100
}
```

### Output

One Dataset item per product, including:

- Identity: `title`, `productId`, `sku` / `skuId`, `brand`, `categoryIds`, `description`
- Pricing: `price`, `priceFormatted`, `originalPrice`, `discountPct`, `currency`
- Seller / social: `sellerName`, `sellerId`, `location`, `rating`, `reviewCount`, `soldCount`
- Status: `inStock`, `isSponsored`, `badges`, `badgeText`
- Links: `imageUrl`, `productUrl`, `country`, `scrapedAt`

### Tips

- Start with `maxProducts: 20` before a large run
- Prices and filters use **local currency** (do not convert to USD)
- Each run targets one `country_domain` — run once per country and merge Datasets if needed
- Prefer residential proxies for reliable production runs
- Product-detail pages are not accepted as Start URLs — use category, catalog, or search result pages

### Pricing

Pay-per-event: low run-start fee plus about **$1.00 per 1,000 product results**.

# Actor input Schema

## `country_domain` (type: `string`):

Which Daraz marketplace to scrape. All Start URLs must match this market.

## `search_keywords` (type: `array`):

One or more product keywords. Each keyword is scraped independently; results are merged and deduplicated. Required unless you supply Start URLs.

## `startUrls` (type: `array`):

Daraz category, catalog, or search URLs on the selected marketplace (not product-detail pages). Filters already in the URL are preserved.

## `limitType` (type: `string`):

Which cap applies per keyword / per Start URL. The other limit field is ignored.

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

Used when Limit by = Product count. Products per keyword / per Start URL. Set 0 for no product cap (still bounded by a 100-page hard limit).

## `maxPages` (type: `integer`):

Used when Limit by = Page count. Result pages per keyword / per Start URL (~40 products per page).

## `sortBy` (type: `string`):

Result ordering. Omit for marketplace default (or to keep a sort already present in a Start URL).

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

Minimum price in the marketplace local currency. Leave empty for no minimum.

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

Maximum price in the marketplace local currency. Leave empty for no maximum.

## `minRating` (type: `integer`):

Minimum average stars (1–5). Applied by the marketplace; products with no rating yet are typically excluded. Leave empty for no rating filter.

## `includeOutOfStock` (type: `boolean`):

When disabled, listings reported as unavailable are skipped.

## `requestDelayMs` (type: `integer`):

Optional pause between page requests.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy settings. Residential proxies recommended for production.

## Actor input object example

```json
{
  "country_domain": "pk",
  "search_keywords": [
    "wireless headphones"
  ],
  "limitType": "maxProducts",
  "maxProducts": 100,
  "maxPages": 3,
  "includeOutOfStock": true,
  "requestDelayMs": 250,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "search_keywords": [
        "wireless headphones"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerbox/daraz-product-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 = { "search_keywords": ["wireless headphones"] }

# Run the Actor and wait for it to finish
run = client.actor("powerbox/daraz-product-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 '{
  "search_keywords": [
    "wireless headphones"
  ]
}' |
apify call powerbox/daraz-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerbox/daraz-product-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/pdJ1YiYJd0HArT0pK/builds/0JqWYkzwnLiBH6B39/openapi.json
