# Tokopedia Product Scraper — Prices, Sold & Sellers (`crawloop/tokopedia-product-scraper`) Actor

Search Tokopedia by keyword or search URL and save product cards with IDR price, old price, discount, rating, units sold, shop name, and city. HTTP search API, no browser. Built for price checks and catalog research in Indonesia.

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

## Pricing

from $2.60 / 1,000 product listings

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?

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

## Tokopedia Product Scraper — Prices, Sold & Sellers

> **Disclaimer:** Unofficial tool — not affiliated with, sponsored by, or endorsed by PT Tokopedia or its affiliates. Data is read from publicly accessible search results only. No login. You are responsible for complying with applicable law (including GDPR where personal data appears) and the site’s terms. No warranty on accuracy or availability. Provided for informational and research use.

Search Tokopedia by **keyword** or **search URL** and extract **product cards** with **IDR price**, **old price**, **discount**, **rating**, **units sold**, **shop name**, and **city**. This **Tokopedia scraper** is an **API alternative** for **price checks** and **catalog research** on Indonesia’s marketplace. Run it from **Python**, **Node.js**, or **MCP**; export JSON / CSV / dataset. **HTTP** only — no headless browser.

> **Crawloop Marketplace & E-commerce Suite** — Tokopedia search cards, then AliExpress, Amazon, Flipkart, or Walmart for the same product outside Indonesia.

| **Tokopedia Product Scraper** ◄── *you are here* | [AliExpress Search Scraper](https://apify.com/crawloop/aliexpress-search-scraper) | [Amazon Search Scraper](https://apify.com/crawloop/amazon-search-scraper) | [Flipkart Scraper](https://apify.com/crawloop/flipkart-scraper) | [Walmart Scraper](https://apify.com/crawloop/walmart-scraper) |
| :---: | :---: | :---: | :---: | :---: |
| Tokopedia keyword cards, IDR price, sold count, shop | AliExpress prices, sold count, Choice | Amazon keyword SERP, badges, sponsored | Flipkart INR price, MRP, Assured | Walmart ZIP-local prices |

***

### When to use this Actor

- **Indonesia price checks** — selling price, old price, and percent off on a keyword
- **Catalog pulls** — product id, title, rating, sold count, and image from search
- **Seller shortlists** — shop name, city, and cash-on-delivery label from the card
- **Scheduled refresh** — same query, compare `price` and `soldCount` over time

### When not to use this Actor

- **Product-page specs, variants, or review text** — search cards only
- **Shop review monitoring** — this Actor does not walk shop or product review pages
- **AliExpress, Amazon, Flipkart, or Walmart** — use the sibling Actors in the table above

***

### Key Features

- **Keyword search** — `query` or batch `queries` (up to 4 in parallel)
- **Paste search URLs** — URLs must include `q=`. Product page URLs are rejected
- **Sort** — relevance, price low to high, price high to low, newest
- **Pagination + caps** — up to **20 pages** per query, or stop at `maxItems`
- **Filters** — `minPrice`, `maxPrice` in IDR, `minRating`, `minSold`
- **HTTP** — Chrome TLS impersonation, 256 MB. No proxy by default

***

### How to scrape Tokopedia search results

1. Set a keyword in `query`, or paste search URLs in `searchUrls`.
2. Cap volume with `maxItems` and `maxPages`.
3. Run the Actor. Download the default dataset as JSON, CSV, or Excel — or call it from Python, Node.js, or MCP.

***

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `query` | String | — | Primary search keyword |
| `queries` | Array | — | Extra keywords (same filters and page cap) |
| `searchUrls` | Array | — | Search URLs with `q=`. Product pages are rejected |
| `sort` | String | `relevance` | `relevance`, `price_asc`, `price_desc`, `newest` |
| `maxPages` | Integer | `1` | Pages per query/URL (1–20) |
| `maxItems` | Integer | — | Product cap **per** query or URL |
| `startPage` | Integer | `1` | First page |
| `minPrice` / `maxPrice` | Number | — | Drop cards outside this IDR range |
| `minRating` | Number | — | Minimum rating (0–5) |
| `minSold` | Integer | — | Minimum units sold from the card label |
| `deduplicateIds` | Boolean | `true` | One row per `productId` in the run |
| `maxConcurrency` | Integer | `2` | Parallel queries (1–4) |
| `proxyConfiguration` | Object | off | Apify Proxy. Leave off unless a run returns no cards |

#### Input example

```json
{
  "query": "sepatu",
  "sort": "relevance",
  "maxPages": 1,
  "maxItems": 40
}
```

***

### Output

Each dataset item is one search card.

| Field | Description |
| :--- | :--- |
| `productId` | Tokopedia product id |
| `title` | Card title |
| `price`, `oldPrice`, `priceText` | Selling price and previous price in rupiah |
| `discountPercent` | Percent off from the ribbon, or computed from the old price |
| `currency` | Always `IDR` |
| `rating` | Star rating on the card |
| `soldCount`, `soldLabel` | Units sold. `soldCountMinimum` is true when the label is `N+` |
| `shopName`, `shopCity`, `shopTier` | Seller shop from the card |
| `cashOnDelivery` | True when the card says Bisa COD |
| `category`, `categoryPath` | Category name and breadcrumb |
| `imageUrl`, `productUrl` | Image and product link. Image URLs can expire |
| `page`, `position`, `searchQuery` | Where the card was found |
| `scrapedAt` | UTC timestamp |

#### Output example

```json
{
  "source": "tokopedia_search",
  "searchQuery": "sepatu",
  "page": 1,
  "position": 1,
  "productId": "11311819274",
  "title": "COPPER Hybrid Case",
  "price": 119900,
  "oldPrice": 300000,
  "discountPercent": 60,
  "currency": "IDR",
  "rating": 5.0,
  "soldCount": 18,
  "soldCountMinimum": false,
  "soldLabel": "18 terjual",
  "shopName": "Copper Shop",
  "shopCity": "Medan",
  "cashOnDelivery": true,
  "productUrl": "https://www.tokopedia.com/copper/hybrid-case",
  "scrapedAt": "2026-10-08T08:00:00Z"
}
```

***

### Use Cases

| Use case | What you get | Why it helps |
| :--- | :--- | :--- |
| **Price monitoring** | `price`, `oldPrice`, `discountPercent` | Track promo depth on a keyword |
| **Catalog build** | Product id, title, image, URL | Seed a sheet without opening each product page |
| **Demand signal** | `soldCount`, `rating` | Prefer cards that already sell |
| **Cross-border check** | Same keyword on AliExpress or Amazon | Compare an Indonesia card with another catalog |

***

### Integration examples

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('crawloop/tokopedia-product-scraper').call({
  query: 'sepatu',
  maxPages: 1,
  maxItems: 40
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.slice(0, 5));
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient(token)
run = client.actor("crawloop/tokopedia-product-scraper").call(
    run_input={"query": "sepatu", "maxPages": 1, "maxItems": 40}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("productId"), item.get("title"), item.get("price"), item.get("soldCount"))
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/crawloop~tokopedia-product-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"sepatu","maxPages":1,"maxItems":40}'
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp). Connect your Apify account, then call this Actor by Store ID `crawloop/tokopedia-product-scraper`.

Example prompts:

- "Run Tokopedia Product Scraper for sepatu, 1 page, return productId, title, price, soldCount, and shopName"
- "Scrape Tokopedia for iphone case, keep cards rated 4 and up with at least 10 sold, summarize the cheapest 20"
- "Chain Tokopedia Product Scraper then AliExpress Search Scraper for the same keyword and compare IDR cards with the cross-border SERP"

### Suite next step

After a Tokopedia keyword pull, compare the same products on [AliExpress Search Scraper](https://apify.com/crawloop/aliexpress-search-scraper). For a US SERP, use [Amazon Search Scraper](https://apify.com/crawloop/amazon-search-scraper). For India catalog cards, use [Flipkart Scraper](https://apify.com/crawloop/flipkart-scraper).

***

### FAQ

**Does this open product pages?**
No. One search request per page. Specs, variants, and review text that are not on the card are not collected.

**What does sold count mean?**
It is the card label (`18 terjual`, `70+ terjual`). `soldCountMinimum` is true when the label uses a plus. `1rb` is stored as 1000.

**What if the run saves nothing?**
An empty keyword finishes without rows and without a crash. A blocked search API does the same and sets a status message. If that happens, turn on a residential proxy for the next run.

**Can I schedule it?**
Yes. Save a task with the same keyword and run it on a schedule. Compare `price` and `soldCount` across runs.

# Actor input Schema

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

Tokopedia keyword, for example sepatu or iphone.

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

Optional extra keywords. Each query uses the same page cap and filters.

## `searchUrls` (type: `array`):

Search URLs that include q=. Product page URLs are rejected.

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

Result order on Tokopedia search.

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

Search pages per query or URL (1–20). Stops earlier when maxItems is reached.

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

Cap on products saved per keyword or search URL.

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

First results page (1-based).

## `minPrice` (type: `number`):

Drop cards cheaper than this amount in Indonesian rupiah.

## `maxPrice` (type: `number`):

Drop cards more expensive than this amount in Indonesian rupiah.

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

Keep cards with at least this rating (0–5). Cards without a rating are dropped when this is set.

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

Keep cards whose sold label is at least this number. Cards without a sold label are dropped when this is set.

## `deduplicateIds` (type: `boolean`):

Save each productId once across the whole run.

## `maxConcurrency` (type: `integer`):

How many keywords or URLs to fetch in parallel (1–4).

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

Leave off. The search API answers from the platform IP. Turn on a residential proxy only if a run returns no cards.

## Actor input object example

```json
{
  "query": "sepatu",
  "sort": "relevance",
  "maxPages": 1,
  "maxItems": 60,
  "startPage": 1,
  "deduplicateIds": true,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Default dataset items.

# 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 = {
    "query": "sepatu",
    "maxItems": 60
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/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 = {
    "query": "sepatu",
    "maxItems": 60,
}

# Run the Actor and wait for it to finish
run = client.actor("crawloop/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 '{
  "query": "sepatu",
  "maxItems": 60
}' |
apify call crawloop/tokopedia-product-scraper --silent --output-dataset

```

## MCP server setup

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