# Tokopedia Product Search Scraper (`rawrzn/tokopedia-product-scraper`) Actor

Scrape Tokopedia product search results into structured data including prices, discounts, ratings, sold counts, sellers, categories, SKUs, images, videos, and product URLs.

- **URL**: https://apify.com/rawrzn/tokopedia-product-scraper.md
- **Developed by:** [Rauzzan Muhamad Fikri](https://apify.com/rawrzn) (community)
- **Categories:**
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 product scrapeds

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?

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

> **Unofficial project.** This Actor is not affiliated with, endorsed by, or sponsored by Tokopedia or its affiliates.

## Tokopedia Product Search Scraper

Scrape structured **Tokopedia product search data** by keyword without running a browser.

This Actor extracts prices, discounts, ratings, sold counts, seller information, categories, SKU identifiers, product images, promotional labels, and product URLs into a clean Apify Dataset.

It uses lightweight HTTP requests and is designed for marketplace research, price monitoring, product discovery, seller analysis, and e-commerce datasets.

### What can you use this scraper for?

- Product and price research
- Competitor monitoring
- Seller and shop discovery
- Discount analysis
- Product sourcing
- Marketplace trend research
- Academic and data science projects
- Price-monitoring workflows
- Exporting Tokopedia search results to JSON, CSV, Excel, and other Apify-supported formats

### Features

The Actor supports keyword-based Tokopedia product search with pagination and duplicate protection.

#### Sorting

- **Most relevant**
- **Newest**
- **Top sales**

#### Filters

- Minimum price
- Maximum price
- Minimum rating
- Starting search page
- Maximum number of results

Price and rating filters are validated before products are saved to the Dataset.

`maxItems` is a maximum result limit, not a guaranteed result count. A run may return fewer products when Tokopedia has fewer matching listings or when filters remove results.

### Input

Example:

```json
{
    "keyword": "poco f6",
    "maxItems": 50,
    "sort": "relevance",
    "minPrice": 100000,
    "minRating": 4
}
```

#### Input parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `keyword` | string | `poco f6` | Product keyword to search for |
| `maxItems` | integer | `50` | Maximum number of unique products, up to 1,000 |
| `sort` | string | `relevance` | `relevance`, `newest`, or `topSales` |
| `minPrice` | integer | — | Minimum price in IDR |
| `maxPrice` | integer | — | Maximum price in IDR |
| `minRating` | number | — | Minimum product rating from 0 to 5 |
| `startPage` | integer | `1` | Search page to start from |

### Output

Each saved product can include:

| Field | Description |
| --- | --- |
| `productId` | Tokopedia product identifier |
| `name` | Product title |
| `price` | Current numeric price in IDR |
| `priceText` | Formatted current price |
| `originalPrice` | Numeric original price when available |
| `originalPriceText` | Formatted original price |
| `discountPercent` | Calculated discount percentage |
| `currency` | Currency code (`IDR`) |
| `rating` | Product rating |
| `soldText` | Tokopedia sales label |
| `soldCount` | Structured sold count |
| `skuId` | Product/SKU identifier when available |
| `imageUrl` | Preferred product image URL |
| `image300` | 300px product image |
| `image500` | 500px product image |
| `image700` | 700px product image |
| `imageExpiresAt` | Expiration time of signed image URL when available |
| `videoUrl` | Product video URL when available |
| `shopId` | Seller/shop identifier |
| `shopName` | Seller name |
| `shopUrl` | Seller page URL |
| `shopCity` | Seller location |
| `shopTier` | Raw shop tier value returned by the source |
| `categoryName` | Product category |
| `categoryBreadcrumb` | Category path |
| `promoLabels` | Promotional labels attached to the listing |
| `url` | Clean product URL |
| `keyword` | Search keyword |
| `page` | Search page |
| `scrapedAt` | ISO extraction timestamp |

`shopTier` is intentionally returned as the raw source value and is not presented as an Official Store indicator.

### Example output

```json
{
    "productId": "103277451752",
    "name": "Example product compatible with Poco F6",
    "price": 147420,
    "priceText": "Rp147.420",
    "originalPrice": 195000,
    "originalPriceText": "Rp195.000",
    "discountPercent": 24,
    "currency": "IDR",
    "rating": 4.4,
    "soldText": "17 terjual",
    "soldCount": 17,
    "skuId": "1735186653076424260",
    "imageUrl": "https://...",
    "image300": "https://...",
    "image500": "https://...",
    "image700": "https://...",
    "imageExpiresAt": "2026-09-03T22:14:23.000Z",
    "videoUrl": null,
    "shopName": "Example Seller",
    "shopCity": "Jakarta Barat",
    "categoryName": "Handphone & Tablet",
    "categoryBreadcrumb": "handphone-tablet/aksesoris-handphone/soft-case-handphone",
    "promoLabels": [
        "Harga Diskon",
        "Bisa COD"
    ],
    "url": "https://www.tokopedia.com/example/product",
    "keyword": "poco f6",
    "page": 1,
    "scrapedAt": "2026-09-03T21:14:23.651Z"
}
```

### Product images

Tokopedia search results may return signed image URLs.

When an image URL includes an expiration timestamp, the Actor exposes it as `imageExpiresAt`.

Save or process images before the signed URL expires if your workflow requires long-term image storage.

Not every product includes every media field. For example, `videoUrl` can be `null` when a listing has no video.

### Performance

This Actor does not launch Chromium, Playwright, or Puppeteer.

Product search data is retrieved with direct HTTP requests and processed as structured data.

The production Actor has been tested successfully on Apify Cloud with **128 MB memory**.

Actual speed and source availability may vary depending on Tokopedia and current network conditions.

### JavaScript API example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
    token: process.env.APIFY_TOKEN,
});

const run = await client
    .actor('rawrzn/tokopedia-product-scraper')
    .call({
        keyword: 'iphone',
        maxItems: 100,
        sort: 'topSales',
        minRating: 4.5,
    });

const { items } = await client
    .dataset(run.defaultDatasetId)
    .listItems();

console.log(items);
```

### Python API example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor(
    "rawrzn/tokopedia-product-scraper"
).call(
    run_input={
        "keyword": "iphone",
        "maxItems": 100,
        "sort": "topSales",
        "minRating": 4.5,
    }
)

items = client.dataset(
    run["defaultDatasetId"]
).list_items().items

for item in items:
    print(item["name"], item["price"])
```

### Limitations

Tokopedia is an external service and can change its search API, ranking, response fields, signed URLs, or access behavior at any time.

Search ranking is controlled by Tokopedia. The Actor exposes only sorting modes tested against the active search interface.

The Actor extracts publicly accessible product search information. It does not log in to Tokopedia, access private account information, or collect private user data.

Use the Actor in accordance with applicable laws and policies relevant to your use case.

### Support

If a run fails, output fields change, or Tokopedia changes its search behavior, open an Issue on this Actor's Apify page and include a shareable failed run when possible.

Feedback and feature requests are welcome.

# Actor input Schema

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

Product keyword to search on Tokopedia.

## `maxItems` (type: `integer`):

Maximum unique products to return.

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

Tokopedia search ordering. Only sorting modes verified against the current search API are exposed.

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

Only return products at or above this price.

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

Only return products at or below this price.

## `minRating` (type: `number`):

Minimum Tokopedia product rating.

## `startPage` (type: `integer`):

Tokopedia search page to start from.

## Actor input object example

```json
{
  "keyword": "poco f6",
  "maxItems": 50,
  "sort": "relevance",
  "startPage": 1
}
```

# Actor output Schema

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

Tokopedia products collected during this run.

# 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("rawrzn/tokopedia-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("rawrzn/tokopedia-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 '{}' |
apify call rawrzn/tokopedia-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rawrzn/tokopedia-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/R41xUdhske0Yj1rsY/builds/zrFk7hfplHOHnL0h0/openapi.json
