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

Effortlessly scrape Tokopedia search results. Extract product data, prices, ratings & reviews in bulk. Perfect for market research, price tracking & competitive intelligence on Indonesia's largest e-commerce marketplace.

- **URL**: https://apify.com/shahidirfan/tokopedia-search-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Stats:** 170 total users, 28 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

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

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

### What does Tokopedia Search Scraper do?

Tokopedia Search Scraper collects product listings from Tokopedia search results and saves them as structured dataset items. Tokopedia is Indonesia's largest e-commerce marketplace, and this Actor converts a keyword search or a search URL into a clean dataset of product names, prices, ratings, seller details, and category information. Enter a keyword such as `game` or paste a Tokopedia search URL, set the number of products you want, and run the Actor to get market data without copying search pages by hand.

The Actor follows pagination automatically, removes duplicate products across pages, and returns one record per product with direct URLs for the product page and seller shop. The output is ready for analysis in a spreadsheet, for export to JSON or CSV, or for use in dashboards, price monitoring, and AI data pipelines.

### Why use Tokopedia Search Scraper?

- **Reliable dataset creation** - Collect structured Tokopedia product data without manual copy-paste or browser sessions.
- **Automation-ready output** - Download results as JSON, CSV, Excel, or XML, or push them to your own systems.
- **Market research fit** - Build datasets for price monitoring, competitor assortment research, category trend tracking, and seller benchmarking.
- **Scheduling and API access** - Run the Actor once or on a schedule, and pull datasets through the Apify API from your own tools.

### 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` | Display price such as `Rp25.000` |
| `image_urls` | All distinct product image URLs returned for the listing |
| `price_number` | Numeric price value for sorting and math |
| `original_price` | Price before discount when available |
| `discount_percentage` | Discount percentage when the listing shows one |
| `rating` | Product rating score |
| `sold_count` | Sold count text shown in the listing |
| `shop_name` | Seller name |
| `shop_city` | Seller city or region |
| `category_name` | Product category |
| `is_ad` | Whether the listing is marked as an ad |

### How to use Tokopedia Search Scraper

1. Open the Actor on Apify Store.
2. Enter a search keyword such as `game` or paste a Tokopedia search URL into the `startUrl` field.
3. Set the maximum number of products with `results_wanted`.
4. Optionally adjust `max_pages` as a safety cap for broad keywords.
5. Run the Actor and wait for the dataset to finish.
6. Download the results or connect the dataset to an integration, webhook, or API workflow.

No account on Tokopedia is required. The Actor works from public search pages, and technical users can run the same inputs through the Apify API.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | String | No | Prefilled Tokopedia `game` search URL | Tokopedia search URL to start from. Search query parameters are reused when provided. |
| `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 pages visited. |
| `proxyConfiguration` | Object | No | `{ "useApifyProxy": false }` | Optional proxy settings for request routing. |

All parameters are optional. If you provide nothing, the Actor runs a search for `game` and saves up to 20 products.

### Output Data

| Field | Type | Description |
|-------|------|-------------|
| `keyword` | String | Search keyword used for the run |
| `page` | Integer | Result page the product appeared on |
| `position` | Integer | Product position in the overall result sequence |
| `product_id` | String | Tokopedia product identifier |
| `title` | String | Product title |
| `product_url` | String | Direct product page URL |
| `image_url` | String | Primary product image URL |
| `image_urls` | Array | All distinct product image URLs returned by Tokopedia |
| `price` | String | Display price |
| `price_number` | Number | Numeric price value |
| `original_price` | String | Original price before discount when available |
| `discount_percentage` | Number | Discount percentage when available |
| `rating` | Number | Product rating score |
| `sold_count` | String | Sold count text from the listing |
| `shop_id` | String | Seller identifier |
| `shop_name` | String | Seller name |
| `shop_url` | String | Seller profile URL |
| `shop_city` | String | Seller city or region |
| `shop_tier` | Number | Seller tier when available |
| `badge_title` | String | Badge label shown in the listing when available |
| `badge_url` | String | Badge link when available |
| `category_id` | String | Category identifier |
| `category_name` | String | Product category name |
| `category_breadcrumb` | String | Category breadcrumb when available |
| `is_ad` | Boolean | Whether the listing is marked as an ad |
| `is_wishlist` | Boolean | Wishlist flag from the source |
| `source_url` | String | Search URL used for the run |
| `fetched_at` | String | ISO timestamp for when the product was collected |

Empty and null values are removed from each record so the dataset stays clean for exports.

### Usage Examples

#### Basic keyword extraction

Run a search for a single keyword with a small result limit:

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

#### Start from a search URL

Reuse the filters of a specific Tokopedia search URL, for example a `keyboard` search:

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

#### Larger collection run with proxy

Collect a broader keyword dataset and route requests through Apify Proxy for higher-volume runs:

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

### Sample Output

A single dataset item from a `game` search:

```json
{
  "keyword": "game",
  "page": 1,
  "position": 1,
  "product_id": "1755362829",
  "title": "Sticker Pack Capcom Character Game Megaman Ryu Ken Stiker Laptop Vinyl - Pack A, Doff",
  "product_url": "https://www.tokopedia.com/sutikki/sticker-pack-capcom-character-game-megaman-ryu-ken-stiker-laptop-vinyl-pack-a-glossy",
  "image_url": "https://images.tokopedia.net/img/cache/300-square/product-1/2023/1755362829/1755362829_...jpg",
  "image_urls": [
    "https://images.tokopedia.net/img/cache/300-square/product-1/2023/1755362829/1755362829_...jpg",
    "https://images.tokopedia.net/img/cache/200-square/product-1/2023/1755362829/1755362829_...jpg"
  ],
  "price": "Rp25.000",
  "price_number": 25000,
  "original_price": "Rp35.000",
  "discount_percentage": 29,
  "rating": 4.9,
  "sold_count": "1,2rb terjual",
  "shop_id": "124567",
  "shop_name": "Sutikki",
  "shop_url": "https://www.tokopedia.com/sutikki",
  "shop_city": "Jakarta Selatan",
  "shop_tier": 1,
  "category_id": "392",
  "category_name": "Komputer & Laptop",
  "category_breadcrumb": "Komputer & Laptop",
  "is_ad": false,
  "is_wishlist": false,
  "source_url": "https://www.tokopedia.com/search?st=&q=game",
  "fetched_at": "2026-07-28T10:30:00.000Z"
}
```

### Tips for Best Results

- Keep `results_wanted` close to your real need for faster runs and smaller datasets.
- Use `max_pages` as a safety cap when searching broad keywords that return many pages.
- Check the dataset preview before scheduling larger or recurring runs.
- If a broad search returns fewer products than requested, the Actor has reached the end of the available listings or the page cap.
- Search ranking and inventory change often, so ordering and availability can differ between runs.
- Some fields are empty when the listing does not publish that detail, such as a discount or a badge. Check several results before assuming a failure.
- Public pages can change over time. If extraction stops working, report it through the Issues tab so the Actor can be updated.

### Integrations

- **Google Sheets** - Export Tokopedia product data to spreadsheets for analysis.
- **Webhooks** - Trigger downstream workflows after each run completes.
- **Make or Zapier** - Connect results to no-code automations.
- **API** - Access datasets programmatically from your own systems.
- **Schedules** - Refresh data on an hourly, daily, or weekly interval.

### Frequently Asked Questions

#### Can I export Tokopedia data to CSV or Excel?

Yes. Apify datasets can be downloaded in CSV, Excel, JSON, XML, and other supported formats.

#### Can I run this Actor on a schedule?

Yes. You can schedule the Actor in Apify Console to refresh Tokopedia product data hourly, daily, weekly, or at another interval.

#### Does this Actor scrape product detail pages?

No. This Actor collects search listing data only. For individual product reviews, see the Tokopedia Reviews Scraper.

#### Can I scrape multiple keywords in one run?

No. The Actor accepts one keyword or one search URL per run. Run once per keyword, or orchestrate multiple runs from your workflow.

#### What if I get fewer results than requested?

The Actor stops when there are no more pages or items to collect, or when `max_pages` is reached. A broad keyword can also return fewer available listings than the requested limit.

#### Why are results different between runs?

Tokopedia search ranking and marketplace inventory change quickly, so product order and availability can vary between runs.

#### Is it legal to scrape Tokopedia?

Scraping public web data can be legal, but you are responsible for complying with applicable laws, Tokopedia terms, and data privacy rules. Only collect and use data for lawful purposes.

### Related Actors

- [Tokopedia Reviews Scraper](https://apify.com/shahidirfan/tokopedia-reviews-scraper) - Collect Tokopedia product reviews, ratings, and feedback.
- [Shein Product Scraper](https://apify.com/shahidirfan/shein-product-scraper) - Extract Shein product data including prices, images, and ratings.
- [Shopify Product Scraper](https://apify.com/shahidirfan/shopify-product-scraper) - Collect complete product catalogs from Shopify stores.
- [Asos Product Scraper](https://apify.com/shahidirfan/asos-product-scraper) - Gather ASOS product, price, and discount data for fashion market research.

If you need customer feedback on the products you collect, use the [Tokopedia Reviews Scraper](https://apify.com/shahidirfan/tokopedia-reviews-scraper) alongside this Actor for a fuller picture.

### Support

For issues, feature requests, or custom Actor work, use the Issues tab on the Actor page or contact the developer through Apify.

### Legal Notice

This Actor is designed for legitimate data collection from publicly available Tokopedia search pages. Users are responsible for using the data responsibly and complying with applicable laws, Tokopedia terms, and privacy rules.

# Actor input Schema

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

Tokopedia search URL. If provided, query parameters are reused.

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

Search keyword. Overrides q from Start URL when filled.

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

Maximum products to store.

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

Safety limit for pagination.

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

Optional proxy settings for request routing.

## Actor input object example

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

# Actor output Schema

## `overview` (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&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource=",
    "keyword": "game",
    "results_wanted": 20,
    "max_pages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/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&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource=",
    "keyword": "game",
    "results_wanted": 20,
    "max_pages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/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&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource=",
  "keyword": "game",
  "results_wanted": 20,
  "max_pages": 10
}' |
apify call shahidirfan/tokopedia-search-scraper --silent --output-dataset

```

## MCP server setup

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