# Tokopedia Product Scraper - Deal Hunter (`puzzlenut/tokopedia-deal-hunter-product-scraper`) Actor

Tokopedia scraper for product research, price monitoring, and competitor intelligence with structured dataset and keyword summary outputs.

- **URL**: https://apify.com/puzzlenut/tokopedia-deal-hunter-product-scraper.md
- **Developed by:** [puzzlenut](https://apify.com/puzzlenut) (community)
- **Categories:** E-commerce, Integrations
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Tokopedia Product Scraper - Deal Hunter

🚀 Production-ready Tokopedia scraping with clean input/output contracts and practical data you can use right away.

### Why this Actor
If your goal is to sell smarter on Tokopedia, this Actor gives you the exact signals that matter: price, sold trends, rating strength, sponsored exposure, and top sellers.
You can run it in minutes, export clean data, and feed it into spreadsheets, BI dashboards, alerts, or internal tools.

### What you get
- ⚡ Fast product discovery from one or many keywords in a single run
- 📉 Better pricing decisions with current price, original price, and real discount detection
- 🛒 Demand signals from sold labels normalized into usable numeric insights
- 🏪 Seller and location visibility to identify strong competitors and market hotspots
- 🧠 Keyword summary output for quick market snapshots (avg price, sponsored share, top stores)
- 🔍 Optional deep crawl mode for richer detail fields when you need premium analysis

### Run configuration (Build, Memory, Timeout)
You can run this Actor from Console, API, schedule, or another Actor.

- **Build:** use `latest` for newest improvements, or pin a specific build number for stable production behavior
- **Memory:** standard runs work well on default memory; increase memory for heavy keywords or deep crawl mode
- **Timeout:** use higher timeout for bigger keyword sets or deep crawl runs

For reliable automation, pin build + set explicit timeout and memory in your task/schedule.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `keyword` | `string` | `null` | Single keyword (optional if `keywords` is provided). |
| `keywords` | `string[]` | `[]` | Multiple keywords in one run; at least one non-empty keyword is required from `keyword` or `keywords`. |
| `maxProducts` | `integer` | `20` | Maximum number of products to collect across the full run (1-200). |
| `sortBy` | `"harga_termurah" \| "terlaris" \| "rating_tertinggi"` | `"terlaris"` | Sorting strategy for search result processing. |
| `minSold` | `integer` | `0` | Minimum sold threshold after sold-label normalization (`1rb+`, `10rb+`, `>100`, etc.). |
| `minPrice` | `integer` | `null` | Minimum price filter in IDR (must be positive if set). |
| `maxPrice` | `integer` | `null` | Maximum price filter in IDR (must be positive and greater than `minPrice` if both set). |
| `onlyDiscounted` | `boolean` | `false` | Keep only products with a real discount. |
| `deepCrawl` | `boolean` | `false` | Open product detail pages to extract extra fields. Slower but richer output. |
| `includeKeywordSummary` | `boolean` | `true` | Save per-keyword analytics to key-value store under `KEYWORD_SUMMARY`. |
| `useApifyProxy` | `boolean` | `true` (when APIFY token exists) | Use Apify Residential Proxy for better reliability against blocking. |

### Output Example

```json
{
  "searchKeyword": "sepatu lari pria",
  "productName": "Sepatu Lari Pria Ultraboost Daily Trainer - Hitam Putih",
  "price": 429000,
  "originalPrice": 599000,
  "discountPct": 28,
  "rating": 4.9,
  "soldCount": "1,2rb+",
  "storeName": "SportHub Official",
  "location": "Kota Bandung",
  "productUrl": "https://www.tokopedia.com/sporthubofficial/sepatu-lari-pria-ultraboost-daily-trainer-hitam-putih",
  "storeUrl": "https://www.tokopedia.com/sporthubofficial",
  "storeFollowers": 187540,
  "isMallOfficial": true,
  "resultPage": 2,
  "rank": 15,
  "organicRank": 11,
  "isSponsored": false,
  "reviewCount": 324,
  "variantCount": 6,
  "stockStatus": "in_stock",
  "descriptionSnippet": "Sepatu lari harian dengan upper breathable mesh, midsole empuk, dan outsole anti-slip untuk jogging, gym, dan aktivitas harian.",
  "scrapedAt": "2026-04-07T10:23:41.512Z"
}
````

### Keyword Summary Example

```json
[
  {
    "recordType": "keyword_summary",
    "keyword": "sepatu lari pria",
    "productCount": 120,
    "avgPrice": 382450,
    "minPrice": 89000,
    "maxPrice": 1299000,
    "avgRating": 4.82,
    "discountedShare": 41.67,
    "avgDiscountPct": 23.4,
    "avgSoldCount": 1463,
    "sponsoredShare": 18.33,
    "topStores": [
      "SportHub Official",
      "RunSpace Indonesia",
      "SepatuAktif Store",
      "Urban Sneakers ID",
      "GearLari Official"
    ],
    "topLocations": [
      "Kota Bandung",
      "Jakarta Barat",
      "Kota Surabaya",
      "Kab. Tangerang",
      "Kota Semarang"
    ],
    "generatedAt": "2026-04-07T10:29:04.771Z"
  }
]
```

### Output Links (Output Schema)

- `results` -> `{{links.apiDefaultDatasetUrl}}/items`
- `keywordSummary` -> `{{links.apiDefaultKeyValueStoreUrl}}/records/KEYWORD_SUMMARY`
- `runDetail` -> `{{links.apiRunUrl}}`

### Storage & run behavior

- Dataset: product records (plus optional keyword summary rows)
- Key-value store: input record and `KEYWORD_SUMMARY` JSON
- Request queue: managed internally by crawler for search and deep crawl requests
- Run origin is visible in run metadata (`WEB`, `API`, `CLI`, `SCHEDULER`, etc.) for traceability
- You can resurrect failed or timed-out runs in Console if needed

### Best use cases

- Product sourcing and dropshipping validation
- Competitor price tracking
- Promo and discount benchmarking
- Assortment gap analysis
- Data feed for alert apps and automation workflows

### Performance snapshot

- Standard mode: ~60-120 products/minute
- Deep crawl mode: ~20-45 products/minute
- Recommended concurrency: 3-5 (standard), 2-3 (deep crawl)
- Daily automated quality check: actor is expected to finish with non-empty dataset within 5 minutes

### Pro tips for high ROI

- Use specific buyer-intent keywords instead of broad terms
- Start with 50-150 products per run for balanced speed and signal quality
- Use deep crawl only for shortlisted products to optimize cost
- Schedule runs daily or hourly for trend monitoring and rapid reaction

# Actor input Schema

## `keyword` (type: `string`):

Single product search keyword (optional if keywords is provided)

## `keywords` (type: `array`):

Multiple keywords in one run (e.g. \['topi bucket', 'topi snapback'])

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

Maximum number of products to scrape

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

Sorting preference for search results

## `minSold` (type: `integer`):

Minimum sold count threshold (e.g. 100)

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

Minimum product price (Rupiah)

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

Maximum product price (Rupiah)

## `onlyDiscounted` (type: `boolean`):

Only include discounted products

## `deepCrawl` (type: `boolean`):

Open each product detail page for extra fields (reviewCount, variantCount, stockStatus, descriptionSnippet)

## `includeKeywordSummary` (type: `boolean`):

Generate per-keyword analytics summary in KEY\_VALUE\_STORE (KEYWORD\_SUMMARY)

## `useApifyProxy` (type: `boolean`):

Enable Apify residential proxy. Disable for local no-Apify mode.

## Actor input object example

```json
{
  "keyword": "sepatu lari pria",
  "keywords": [
    "sepatu futsal",
    "jersey bola original"
  ],
  "maxProducts": 80,
  "sortBy": "terlaris",
  "minSold": 100,
  "minPrice": 50000,
  "maxPrice": 500000,
  "onlyDiscounted": false,
  "deepCrawl": false,
  "includeKeywordSummary": true,
  "useApifyProxy": true
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped Tokopedia product records from the default dataset.

## `keywordSummary` (type: `string`):

Per-keyword summary JSON saved under KEYWORD\_SUMMARY in default key-value store.

## `runDetail` (type: `string`):

Run API endpoint with full run metadata and output references.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("puzzlenut/tokopedia-deal-hunter-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("puzzlenut/tokopedia-deal-hunter-product-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call puzzlenut/tokopedia-deal-hunter-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=puzzlenut/tokopedia-deal-hunter-product-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tokopedia Product Scraper - Deal Hunter",
        "description": "Tokopedia scraper for product research, price monitoring, and competitor intelligence with structured dataset and keyword summary outputs.",
        "version": "0.0",
        "x-build-id": "5R6YRfSy3aj6dfdgT"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/puzzlenut~tokopedia-deal-hunter-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-puzzlenut-tokopedia-deal-hunter-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/puzzlenut~tokopedia-deal-hunter-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-puzzlenut-tokopedia-deal-hunter-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/puzzlenut~tokopedia-deal-hunter-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-puzzlenut-tokopedia-deal-hunter-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Single product search keyword (optional if keywords is provided)"
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Multiple keywords in one run (e.g. ['topi bucket', 'topi snapback'])",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxProducts": {
                        "title": "Max Products",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of products to scrape",
                        "default": 20
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "harga_termurah",
                            "terlaris",
                            "rating_tertinggi"
                        ],
                        "type": "string",
                        "description": "Sorting preference for search results",
                        "default": "terlaris"
                    },
                    "minSold": {
                        "title": "Minimum Sold",
                        "minimum": 0,
                        "maximum": 10000000,
                        "type": "integer",
                        "description": "Minimum sold count threshold (e.g. 100)",
                        "default": 0
                    },
                    "minPrice": {
                        "title": "Minimum Price",
                        "minimum": 1,
                        "maximum": 1000000000,
                        "type": "integer",
                        "description": "Minimum product price (Rupiah)"
                    },
                    "maxPrice": {
                        "title": "Maximum Price",
                        "minimum": 1,
                        "maximum": 1000000000,
                        "type": "integer",
                        "description": "Maximum product price (Rupiah)"
                    },
                    "onlyDiscounted": {
                        "title": "Discount Only Mode",
                        "type": "boolean",
                        "description": "Only include discounted products",
                        "default": false
                    },
                    "deepCrawl": {
                        "title": "Deep Crawl Product Page",
                        "type": "boolean",
                        "description": "Open each product detail page for extra fields (reviewCount, variantCount, stockStatus, descriptionSnippet)",
                        "default": false
                    },
                    "includeKeywordSummary": {
                        "title": "Include Keyword Summary",
                        "type": "boolean",
                        "description": "Generate per-keyword analytics summary in KEY_VALUE_STORE (KEYWORD_SUMMARY)",
                        "default": true
                    },
                    "useApifyProxy": {
                        "title": "Use Apify Residential Proxy",
                        "type": "boolean",
                        "description": "Enable Apify residential proxy. Disable for local no-Apify mode.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
