# Tokopedia Search Scraper (`parsebird/tokopedia-search-scraper`) Actor

Search Tokopedia by keyword or search URL and extract product title, price, rating, sold count, images, shop, and category data. Export as JSON, CSV, or Excel.

- **URL**: https://apify.com/parsebird/tokopedia-search-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.79 / 1,000 products

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 Search Scraper

Scrape product search results from **[Tokopedia](https://www.tokopedia.com)**, Indonesia's largest online marketplace, by keyword or search URL. Get structured titles, prices, discounts, ratings, sold counts, images, shop info, and category data as clean JSON, CSV, or Excel — no browser or proxy required.

<table><tr>
<td style="border-left:4px solid #1C1917;padding:12px 16px;font-weight:600">
Search by keyword or paste a Tokopedia search URL and get every product's price, list price and discount, rating, sold count, all image URLs, shop name and city, category breadcrumb, and a sponsored-listing flag — ready for price monitoring or market research.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this Actor.

```
Actor: parsebird/tokopedia-search-scraper (Apify). Scrapes Tokopedia (tokopedia.com) product search results by keyword or search URL. Call it with ApifyClient.
Input (all optional): startUrl (string, a Tokopedia search URL such as "https://www.tokopedia.com/search?st=&q=game" — its "q" parameter is used as the keyword when "keyword" is not set), keyword (string, overrides the URL's "q" value, default "game"), results_wanted (integer, default 20), max_pages (integer, safety cap on result batches fetched, default 10), proxyConfiguration (object, default {"useApifyProxy": false} — a proxy is not required).
Output: one row per product — keyword, page, position, product_id, title, product_url, image_url, image_urls, price, price_number, original_price, discount_percentage, rating, sold_count, shop_id, shop_name, shop_url, shop_city, shop_tier, category_id, category_name, category_breadcrumb, is_ad, is_wishlist, source_url, fetched_at.
Pricing: pay-per-event, $0.99 per 1,000 products on the Free plan (cheaper on paid plans). API docs: https://apify.com/parsebird/tokopedia-search-scraper/api
```

### What does Tokopedia Search Scraper do?

This Actor talks to **[Tokopedia](https://www.tokopedia.com)**'s own product-search API — the same one its mobile app uses — so results come back structured and complete without rendering a single page in a browser. Give it a keyword or a search URL you copied from tokopedia.com and it returns every product's price, rating, sold count, images, shop, and category data.

- 🔍 **Keyword or URL input** — search by a plain keyword, or paste any `tokopedia.com/search?...` URL and its `q` query parameter is reused.
- 💸 **Price and discount detail** — current price, original list price, and a computed discount percentage.
- ⭐ **Rating and sold count** — rating score and the "X terjual" sold-count text shown in the listing.
- 🖼️ **Full image set** — every distinct product image URL Tokopedia returns for that listing, plus a single main `image_url`.
- 🏬 **Shop and category data** — shop name, city, an inferred merchant tier (Regular / Power Merchant / Power Merchant Pro / Official Store), and the product's category with its breadcrumb path.
- 📢 **Sponsored-listing detection** — an `is_ad` flag marks Tokopedia's own paid/sponsored placements mixed into organic results.
- 🚫 **No proxy required by default** — the Actor ships with Apify Proxy off; enable it in the input only if you start seeing blocked or empty responses.

#### How is this different from browsing Tokopedia by hand?

Tokopedia's search page renders through client-side JavaScript and only shows a handful of fields per product card. This Actor calls Tokopedia's search API directly, so every result already includes fields the search page doesn't display at all — the raw category breadcrumb, all image sizes, an inferred shop tier, and a real computed discount percentage (Tokopedia's own API always reports `0` for this field; the Actor derives it from the list vs. sale price instead).

### Input parameters

Every field is optional. With no input at all, the Actor searches for `game` and saves up to 20 products.

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| startUrl | string | No | Prefilled Tokopedia game search URL | Tokopedia search URL to start from. Its `q` query parameter is reused when `keyword` is not set. |
| keyword | string | No | game | Search keyword. When filled, it overrides the `q` value from `startUrl`. |
| results\_wanted | integer | No | 20 | Maximum number of products to save. |
| max\_pages | integer | No | 10 | Safety limit on the number of result batches fetched from Tokopedia. |
| proxyConfiguration | object | No | `{ "useApifyProxy": false }` | Optional proxy settings for request routing. Not required for Tokopedia's search API. |

#### Basic keyword example

```json
{
  "keyword": "game",
  "results_wanted": 20,
  "max_pages": 3
}
```

#### Start from a search URL

```json
{
  "startUrl": "https://www.tokopedia.com/search?st=&q=keyboard",
  "results_wanted": 50,
  "max_pages": 5
}
```

#### Larger collection run with proxy

```json
{
  "keyword": "sepatu lari",
  "results_wanted": 100,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### Output example

```json
{
  "keyword": "game",
  "page": 1,
  "position": 1,
  "product_id": "1860593611",
  "title": "Mainan Board Game Fun Snake Ladder Ular Tangga Magnet 2309",
  "product_url": "https://www.tokopedia.com/lumitoys/mainan-board-game-fun-snake-ladder-ular-tangga-magnet-2309",
  "image_url": "https://images.tokopedia.net/img/.../4c15215c.jpeg",
  "image_urls": [
    "https://images.tokopedia.net/img/.../4c15215c-700.jpeg",
    "https://images.tokopedia.net/img/.../4c15215c-500.jpeg",
    "https://images.tokopedia.net/img/.../4c15215c-300.jpeg"
  ],
  "price": "Rp29.900",
  "price_number": 29900,
  "original_price": "Rp75.000",
  "discount_percentage": 60,
  "rating": 5.0,
  "sold_count": "4rb+ terjual",
  "shop_id": "2798271",
  "shop_name": "Lumitoys",
  "shop_url": "https://www.tokopedia.com/lumitoys",
  "shop_city": "Jakarta Utara",
  "shop_tier": 2,
  "category_id": "55",
  "category_name": "Mainan & Hobi",
  "category_breadcrumb": "mainan-hobi/board-game/family-kids-games",
  "is_ad": true,
  "is_wishlist": false,
  "source_url": "https://www.tokopedia.com/search?st=&q=game",
  "fetched_at": "2026-09-16T05:26:24.816Z"
}
```

### What data can you extract from Tokopedia?

| Field | Description |
|-------|-------------|
| title | Product name from the search listing. |
| product\_url | Direct link to the product page. |
| price / price\_number | Display price (e.g. `Rp29.900`) and its numeric value. |
| original\_price | List price before discount, when Tokopedia shows one. |
| discount\_percentage | Discount percentage, computed from list price vs. sale price. |
| rating | Product rating score. |
| sold\_count | Sold-count text shown in the listing (e.g. `4rb+ terjual`). |
| image\_url / image\_urls | Main product image, and every distinct image URL for the listing. |
| shop\_name / shop\_city / shop\_url | Seller name, city, and shop page URL. |
| shop\_tier | Inferred merchant tier: `0` Regular, `1` Power Merchant, `2` Power Merchant Pro, `3` Official Store. |
| category\_name / category\_breadcrumb | Product category and its full category path. |
| is\_ad | Whether the listing is a sponsored/paid placement. |
| is\_wishlist | Whether Tokopedia marks the product as wishlisted for the request context. |
| keyword / page / position | The search keyword, result batch number, and rank position for that run. |

### How to scrape Tokopedia

1. Open **Tokopedia Search Scraper** on Apify.
2. Enter a **Keyword** (e.g. `sepatu lari`), or leave it blank and paste a **Search URL** copied from tokopedia.com instead.
3. Set **Max results** and **Max pages** — start small (e.g. 20 and 3) for a fast, cheap test run.
4. Leave **Proxy configuration** off; only turn on Apify Proxy if you start seeing blocked or empty responses.
5. Click **Start**, then download results as JSON, CSV, or Excel from the **Storage** tab, or pull them from the [API](https://apify.com/parsebird/tokopedia-search-scraper/api).

For recurring price or catalog tracking, [schedule](https://docs.apify.com/platform/schedules) the Actor to run daily or weekly.

### How much does it cost to scrape Tokopedia?

This Actor uses the **pay-per-event** model — you are charged per product saved to the dataset, with lower rates on paid Apify plans.

| Plan | Price per product | Price per 1,000 products |
|------|--------------------|----------------------------|
| Free | $0.00099 | **$0.99** |
| Bronze | $0.00089 | **$0.89** |
| Silver | $0.00079 | **$0.79** |
| Gold | $0.00079 | **$0.79** |

Scraping 1,000 products on the Free plan costs about **$0.99**. Your monthly Apify platform credits typically cover several thousand products on top of that.

### How it works

1. The Actor builds a Tokopedia search request from your `keyword` or the `q` parameter in `startUrl`.
2. It calls Tokopedia's own product-search API and requests one batch of results at a time (roughly 20–30 products per batch).
3. Each batch is deduplicated by product ID, flattened into the fields above, and pushed to the dataset immediately.
4. It keeps requesting batches until `results_wanted` is reached, `max_pages` is hit, or Tokopedia reports no further results.

### Using the Actor via API

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("parsebird/tokopedia-search-scraper").call(run_input={
    "keyword": "sepatu lari",
    "results_wanted": 50,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], "—", item.get("price"), item.get("shop_name"))
```

#### JavaScript

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

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('parsebird/tokopedia-search-scraper').call({
    keyword: 'keyboard',
    results_wanted: 50,
});

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

The Actor runs on the [Apify platform](https://apify.com), so you also get [scheduling](https://docs.apify.com/platform/schedules), a full [REST API](https://docs.apify.com/api/v2), webhooks, and native integrations with Make, Zapier, Google Sheets, and Slack. Results export as JSON, CSV, Excel, XML, or HTML.

### Use cases

- **Price monitoring** — track price and discount changes for products or a category over time.
- **Competitor research** — see which shops and listings rank for a given keyword, and which are sponsored (`is_ad`).
- **Reseller and dropship sourcing** — pull product, pricing, and shop data for sourcing decisions.
- **Market research** — analyze category mix, ratings, and sold counts across an Indonesian marketplace keyword.
- **Catalog and inventory tracking** — monitor a shop's or category's listings for new or removed products.

### FAQ

**Do I need a proxy to scrape Tokopedia?**
No. The Actor calls Tokopedia's own mobile-app search API directly, which does not require a proxy by default. The `proxyConfiguration` input is there in case you start seeing blocked or empty responses.

**Why is `discount_percentage` sometimes different from what I'd expect?**
Tokopedia's search API always returns `0` in its own discount field, so the Actor computes the percentage itself from `original_price` vs. `price_number`. It's `null` when no original (pre-discount) price is available.

**What does `is_ad` mean?**
Tokopedia mixes sponsored placements into organic search results. `is_ad: true` means that listing is a paid ad, not an organic ranking.

**How is `shop_tier` determined?**
Tokopedia's search API doesn't expose a raw tier field, so the Actor infers it from the shop's badge icon: `0` Regular seller, `1` Power Merchant, `2` Power Merchant Pro, `3` Official Store (Mall). Treat it as a best-effort signal, not an official Tokopedia value.

**Can I search using Indonesian terms?**
Yes — `keyword` and the `q` parameter in `startUrl` both accept Indonesian search terms directly (e.g. `sepatu lari`, `handphone`).

**Does this Actor scrape individual product detail pages?**
No — it scrapes Tokopedia's search results, which already include price, rating, images, shop, and category data per product without an extra page load. Full descriptions and variant options require visiting the product page itself.

**Can I schedule recurring runs?**
Yes. Use Apify's [scheduler](https://docs.apify.com/platform/schedules) to run this Actor daily or weekly and track price or catalog changes automatically. Found a problem? Open an issue on the **Issues** tab.

### Related Actors

- [Daraz.pk Ecommerce Scraper](https://apify.com/parsebird/daraz-pk-ecommerce-scraper) — product data from Daraz, Pakistan's Lazada-platform marketplace.
- [AliExpress Scraper](https://apify.com/parsebird/aliexpress-scraper) — product and seller data from AliExpress.
- [MercadoLibre Search Scraper](https://apify.com/parsebird/mercadolibre-search-scraper) — product search results from MercadoLibre's Latin American marketplaces.
- Browse the full [ParseBird publisher page](https://apify.com/parsebird) for more scrapers.

### Legal and compliance

This Actor collects only publicly available product search listings from Tokopedia — data any visitor can view without logging in. It does not access private data or bypass authentication. You are responsible for using the scraped data lawfully, including respecting Tokopedia's terms and applicable data-protection laws such as GDPR or Indonesia's PDP Law where relevant. If you plan to scrape at scale or redistribute the data commercially, seek legal advice first. See Apify's guide on [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/tokopedia-search-scraper/changelog.md

# Actor input Schema

## `startUrl` (type: `string`):

A Tokopedia search URL to start from, e.g. https://www.tokopedia.com/search?st=\&q=game. If 'Keyword' below is also filled, it overrides the 'q' value from this URL.

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

Search keyword. When filled, it overrides the 'q' query parameter parsed from Search URL.

## `results_wanted` (type: `integer`):

Maximum number of products to save.

## `max_pages` (type: `integer`):

Safety limit on the number of result batches fetched from Tokopedia per run.

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

Tokopedia's mobile search API does not require a proxy by default. Enable Apify Proxy only if you start seeing blocked or empty responses.

## Actor input object example

```json
{
  "startUrl": "https://www.tokopedia.com/search?st=&q=game",
  "keyword": "game",
  "results_wanted": 20,
  "max_pages": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "startUrl": "https://www.tokopedia.com/search?st=&q=game",
    "keyword": "game",
    "results_wanted": 20,
    "max_pages": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/tokopedia-search-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 = {
    "startUrl": "https://www.tokopedia.com/search?st=&q=game",
    "keyword": "game",
    "results_wanted": 20,
    "max_pages": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/tokopedia-search-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 '{
  "startUrl": "https://www.tokopedia.com/search?st=&q=game",
  "keyword": "game",
  "results_wanted": 20,
  "max_pages": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call parsebird/tokopedia-search-scraper --silent --output-dataset

```

## MCP server setup

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