# Daraz.pk Product Scraper (`solidcode/daraz-pk-scraper`) Actor

\[💰 $0.95 / 1K] Scrape products from Daraz.pk, Pakistan's largest online marketplace — title, price, discount %, rating, reviews, brand, seller, location, stock, and image. Search by keyword or category URL, sort, and filter by price. For price monitoring, market research, and competitor analysis.

- **URL**: https://apify.com/solidcode/daraz-pk-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.95 / 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.
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

## Daraz.pk Product Scraper

Pull product listings from Daraz.pk — Pakistan's largest online marketplace — at scale, with PKR prices, original-vs-sale pricing, discount percentages, star ratings, review counts, seller names, and ship-from locations on every item. Search by keyword or paste any Daraz search or category URL, and get clean, structured rows back. Built for Pakistani e-commerce sellers, price-monitoring teams, and market researchers who need fresh Daraz catalog data without clicking through hundreds of listing pages by hand.

### Why This Scraper?

- **18 structured fields per product** — title, brand, current price, original price, discount %, rating, review count, seller name, ship-from location, stock status, image, product URL, and source metadata, all in PKR.
- **Deal-tracking built in** — every item carries `originalPrice` and `discountPercent` alongside the live price, so you can spot genuine markdowns instead of inflated "was" prices at a glance.
- **Up to ~12,000 products per search** — paginate across the full catalog depth Daraz exposes (about 100 pages), with one clean cap (`maxResults`) instead of fiddly page knobs.
- **Server-side PKR price-range filtering** — set `minPrice` and `maxPrice` in Pakistani Rupees and Daraz returns only matching products, so you never pay for rows you filter out later.
- **3 sort modes** — Best Match (popularity), Price: Low to High, and Price: High to Low, applied by Daraz before results are returned.
- **Multiple searches in one run** — pass a list of search terms and each keyword runs as its own independent search; mix in category URLs in the same run.
- **Rank position preserved** — every row records the listing page it appeared on and the exact Daraz URL it came from, so you can rebuild keyword ranking order instead of just a bag of products.
- **Seller intelligence on every row** — seller/store name plus ship-from location turn any keyword search into a ready-made list of vendors in your category.
- **URL filters respected** — paste a pre-filtered Daraz URL (brand, category, sort already applied on-site) and the scraper inherits every parameter baked into the link.

### Use Cases

**Price Monitoring**

- Track competitor pricing on identical products across Daraz daily
- Watch your own listings' price position versus rival sellers
- Detect price drops and stock-outs on high-demand items
- Build PKR price histories for any product category

**Deal & Discount Tracking**

- Surface the deepest genuine discounts by sorting on `discountPercent`
- Verify "original price" claims against the live selling price
- Monitor flash-sale and campaign pricing across categories
- Alert on markdowns crossing a target price threshold

**Market Research**

- Map the full assortment in a category by browsing a category URL
- Measure brand presence and price tiers across thousands of listings
- Compare rating and review volume to gauge product demand
- Benchmark average prices for a keyword across the marketplace

**Competitor Analysis**

- Rebuild keyword ranking order from the page number on every row
- Track where rival products rank under your target keywords
- Compare review counts and star ratings against competing SKUs
- Watch competitors' discount strategies over time

**Seller & Lead Discovery**

- Build vendor lists from seller names appearing under a keyword
- Identify top sellers and their ship-from locations by category
- Find new entrants ranking for your core search terms
- Map which sellers dominate a price band

### Getting Started

#### Single Keyword Search

The simplest way to start — one keyword, default settings:

```json
{
    "searchTerms": ["iphone"],
    "maxResults": 100
}
```

#### Multi-Keyword With Sort and Price Filter

Search several terms at once, cheapest first, within a PKR price band:

```json
{
    "searchTerms": ["air conditioner", "lawn suit", "power bank"],
    "sortBy": "priceasc",
    "minPrice": 1000,
    "maxPrice": 50000,
    "maxResults": 300
}
```

#### Browse a Category by URL

Paste a Daraz category or pre-filtered search URL — its filters and sort order are respected:

```json
{
    "startUrls": [
        "https://www.daraz.pk/smartphones/",
        "https://www.daraz.pk/catalog/?q=laptop"
    ],
    "maxResults": 500
}
```

### Input Reference

#### What to Scrape

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchTerms` | array | `["iphone"]` | Products to search for on Daraz.pk, one per line (e.g. "iphone 15", "air conditioner", "lawn suit"). Each term runs as its own search. |
| `startUrls` | array | `[]` | Paste Daraz.pk search or category URLs. Filters and sort order already in the URL are respected. Leave empty if you only use Search Terms. |

#### Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxResults` | integer | `100` | How many products to collect for each search term or URL. Products arrive in batches of 40 and a batch is never cut in half, so the final count can land slightly above your number (by up to 39). Set to 0 for no limit (up to a safety ceiling of about 12,000 products per search — Daraz caps deep pagination around page 100). Start with 40-100 to test, then increase. |
| `sortBy` | select | `Best Match (default)` | Order products are collected in: Best Match (default), Price: Low to High, or Price: High to Low. Applied by Daraz before results are returned. Ignored for URLs that already contain a sort order. |
| `minPrice` | integer | `null` | Only collect products priced at or above this amount, in Pakistani Rupees. Applied on Daraz's side. Leave empty for no minimum. |
| `maxPrice` | integer | `null` | Only collect products priced at or below this amount, in Pakistani Rupees. Applied on Daraz's side. Leave empty for no maximum. |

### Output

Each product is returned as a flat row. A representative item:

```json
{
    "productId": "112233445",
    "skuId": "112233445_PK-998877665",
    "title": "Apple iPhone 15 128GB Black",
    "brand": "Apple",
    "price": 264999,
    "originalPrice": 299999,
    "discountPercent": 12,
    "rating": 4.8,
    "reviewCount": 342,
    "sellerName": "Apple Flagship Store",
    "location": "Karachi",
    "inStock": true,
    "imageUrl": "https://static-01.daraz.pk/p/example.jpg",
    "url": "https://www.daraz.pk/products/example.html",
    "searchTerm": "iphone",
    "sourceUrl": "https://www.daraz.pk/catalog/?q=iphone&sort=popularity",
    "page": 1,
    "scrapedAt": "2026-06-03T14:30:00+00:00"
}
```

#### Core Fields

| Field | Type | Description |
|-------|------|-------------|
| `productId` | string | Daraz product/item ID |
| `skuId` | string | SKU identifier, when present |
| `title` | string | Product title |
| `brand` | string | Brand name, when present (null if absent) |
| `url` | string | Canonical product page URL |
| `imageUrl` | string | Primary product image URL |

#### Pricing

| Field | Type | Description |
|-------|------|-------------|
| `price` | number | Current selling price in PKR |
| `originalPrice` | number | Pre-discount price in PKR (null if not discounted) |
| `discountPercent` | number | Percentage off the original price (null if absent) |

#### Ratings & Availability

| Field | Type | Description |
|-------|------|-------------|
| `rating` | number | Average star rating, 0-5 (null if unrated) |
| `reviewCount` | integer | Number of ratings/reviews (null if none) |
| `inStock` | boolean | Whether the product is currently available |

#### Seller & Source

| Field | Type | Description |
|-------|------|-------------|
| `sellerName` | string | Seller / store name |
| `location` | string | Ships-from / seller location |
| `searchTerm` | string | The search term that produced this row (null for URL inputs) |
| `sourceUrl` | string | The Daraz listing page this row came from — open it in a browser to see the product in context |
| `page` | integer | Listing page number this product appeared on |
| `scrapedAt` | string | UTC timestamp of collection (ISO 8601) |

### Tips for Best Results

- **Start small to verify** — run with `maxResults` of 40-100 first to confirm the data matches what you need, then scale up.
- **Paste a filtered Daraz URL to inherit on-site filters** — apply brand, category, and sort filters directly on daraz.pk, then paste that URL into `startUrls`; every parameter baked into the link is respected, giving you precise control no input field exposes.
- **Use a price range to beat the page-100 cap** — Daraz stops paginating around page 100 (~12,000 items). For very broad keywords, split the work into `minPrice`/`maxPrice` bands so each narrower search stays well under the depth limit and you capture the full catalog.
- **Sort by Price: Low to High for budget research** — combine `priceasc` with a `maxPrice` cap to pull only the most affordable products in a category.
- **Mix keywords and URLs in one run** — `searchTerms` and `startUrls` are processed independently in the same run, so you can cover multiple angles at once.
- **Filter on `discountPercent` downstream** — every row carries the discount, so sorting your exported dataset by `discountPercent` instantly surfaces the deepest markdowns.
- **Rebuild ranking order from `page` and `sourceUrl`** — rows come back in the order Daraz served them, so grouping by `sourceUrl` and reading `page` reconstructs where each product sat under a keyword.

### Pricing

**From $0.95 per 1,000 results** — undercuts comparable Daraz extractors while returning richer per-product data. Bronze, Silver, and Gold subscribers pay progressively less; the table below shows total cost at each discount tier.

| Results | No discount | Bronze | Silver | Gold |
|---------|-------------|--------|--------|------|
| 100 | $0.110 | $0.105 | $0.100 | $0.095 |
| 1,000 | $1.10 | $1.05 | $1.00 | $0.95 |
| 10,000 | $11.00 | $10.50 | $10.00 | $9.50 |
| 100,000 | $110.00 | $105.00 | $100.00 | $95.00 |

A "result" is any product row in the output dataset. No compute or time-based charges — you pay per result, plus a small fixed per-run start fee.

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications on new results
- **Webhooks** — Trigger custom APIs on run completion
- **Apify API** — Full programmatic access

### Legal & Ethical Use

This actor is designed for legitimate price monitoring, market research, and competitive analysis on publicly available Daraz.pk product listings. Users are responsible for complying with applicable laws and Daraz's Terms of Service. Do not use extracted data for spam, harassment, or any illegal purpose, and respect any personal data you encounter.

# Actor input Schema

## `searchTerms` (type: `array`):

Products to search for on Daraz.pk, one per line (e.g. 'iphone 15', 'air conditioner', 'lawn suit'). Each term runs as its own search.

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

Paste Daraz.pk search or category URLs (e.g. https://www.daraz.pk/catalog/?q=laptop or a category page like https://www.daraz.pk/smartphones/). Filters and sort order already in the URL are respected. Leave empty if you only use Search Terms above.

## `maxResults` (type: `integer`):

How many products to collect for each search term or URL. Daraz hands back products in batches of 40 and we never cut a batch in half, so the final count can land slightly above your number (by up to 39 products). It can also land below it when a search simply runs out of products. Set to 0 for no limit (collects every product the search returns, up to a safety ceiling of about 12,000 products per search — Daraz caps deep pagination around page 100). Tip: start with 40-100 to test, then increase.

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

The order in which products are collected from each search. Applied by Daraz before results are returned, so it does not waste any extra fetches. Ignored for URLs that already contain a sort order.

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

Only collect products priced at or above this amount, in Pakistani Rupees. Daraz applies this filter on its side, so it does not waste fetches. Leave empty for no minimum.

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

Only collect products priced at or below this amount, in Pakistani Rupees. Daraz applies this filter on its side, so it does not waste fetches. Leave empty for no maximum.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "maxResults": 100,
  "sortBy": "popularity"
}
```

# Actor output Schema

## `products` (type: `string`):

Table of Daraz.pk products with title, price, discount, rating, reviews, seller, and availability.

# 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 = {
    "searchTerms": [
        "iphone"
    ],
    "startUrls": [],
    "maxResults": 100,
    "sortBy": "popularity"
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/daraz-pk-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 = {
    "searchTerms": ["iphone"],
    "startUrls": [],
    "maxResults": 100,
    "sortBy": "popularity",
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/daraz-pk-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 '{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "maxResults": 100,
  "sortBy": "popularity"
}' |
apify call solidcode/daraz-pk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solidcode/daraz-pk-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/fwft17PBPumeXS0QC/builds/NAofwhqVisLkQnepZ/openapi.json
