# Tokopedia Listings Scraper (`piotrv1001/tokopedia-listings-scraper`) Actor

The Tokopedia Listings Scraper extracts product listings from Tokopedia search results, capturing names, prices, discounts, ratings, images, shop details, categories, and promo labels — ideal for price monitoring, market research, and competitor analysis on Indonesia's largest marketplace.

- **URL**: https://apify.com/piotrv1001/tokopedia-listings-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

## 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 Listings Scraper

Easily extract product listings from [Tokopedia](https://www.tokopedia.com), Indonesia's largest online marketplace. The **Tokopedia Listings Scraper** lets you turn any search keyword into clean, structured product data — perfect for price monitoring, market research, and competitor analysis. Run it on the Apify platform to get API access, scheduling, integrations, and automatic data exports.

### ✨ Features

- 🏷️ **Comprehensive product data**: Get product names, prices, discounts, ratings, images, shop details (name, city, tier), categories, and promo labels.
- 🔍 **Keyword-based extraction**: Enter one or more search terms — each is searched separately, just like on the Tokopedia website.
- 🔃 **Flexible sorting**: Sort results by relevance, newest, price (low → high or high → low), or rating.
- 📣 **Ad detection**: Sponsored results are clearly flagged with an `isAd` field.
- ⚡ **Fast & efficient**: Collects dozens of products per second without loading heavy pages — ideal for large keyword lists.

### 🛠️ How It Works

1. **Enter search terms** – Provide one or more keywords, e.g. `iphone` or `laptop gaming`.
2. **Set the limit** – Choose how many products to collect per search term (default: 50).
3. **Run the scraper** – Start the run and download structured product data in JSON, CSV, Excel, or HTML.

### ⚙️ Input

| Field                | Type    | Description                                                                         |
| -------------------- | ------- | ----------------------------------------------------------------------------------- |
| `searchTerms`        | array   | Keywords to search for. Each term is searched separately.                           |
| `maxItemsPerSearch`  | integer | Maximum number of products per search term (default: `50`).                         |
| `sortBy`             | string  | `relevance` (default), `latest`, `cheapest`, `most_expensive`, or `highest_rating`. |
| `proxyConfiguration` | object  | Optional proxy settings. Works without a proxy by default.                          |

```json
{
    "searchTerms": ["iphone", "laptop gaming"],
    "maxItemsPerSearch": 50,
    "sortBy": "relevance"
}
````

### 📊 Sample Output Data

The scraper provides structured JSON output with key product details. Example:

```json
[
    {
        "id": "1543434631",
        "name": "Kabel Hippo Caby 2 Lightning / Iphone 100cm ( 5 pcs ) Garansi Resmi",
        "url": "https://www.tokopedia.com/miooz/kabel-hippo-caby-2-lightning-iphone-100cm-5-pcs-garansi-resmi-blue",
        "price": 159000,
        "priceText": "Rp159.000",
        "originalPrice": null,
        "discountPercentage": null,
        "rating": 5,
        "imageUrl": "https://images.tokopedia.net/img/cache/300-square/product.jpg",
        "shopName": "Miooz_NEW",
        "shopCity": "Jakarta Barat",
        "shopTier": "official_store",
        "shopUrl": "https://www.tokopedia.com/miooz",
        "categoryName": "Handphone & Tablet",
        "categoryBreadcrumb": "handphone-tablet/aksesoris-handphone/kabel-data",
        "labels": ["1 terjual", "Bisa COD"],
        "isAd": false,
        "searchTerm": "iphone",
        "position": 1
    }
]
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### 📋 Data Fields

| Field                                            | Description                                                                  |
| ------------------------------------------------ | ---------------------------------------------------------------------------- |
| `id`                                             | Tokopedia product ID                                                         |
| `name`                                           | Product name                                                                 |
| `url`                                            | Link to the product page                                                     |
| `price` / `priceText`                            | Current price as a number and formatted text (IDR)                           |
| `originalPrice` / `discountPercentage`           | Pre-discount price and discount percentage, if on sale                       |
| `rating`                                         | Average product rating (0–5)                                                 |
| `imageUrl`                                       | Product image                                                                |
| `shopName` / `shopCity` / `shopTier` / `shopUrl` | Seller name, location, tier (`official_store`, `power_merchant`, …) and link |
| `categoryName` / `categoryBreadcrumb`            | Product category                                                             |
| `labels`                                         | Promo and info labels shown on the listing (e.g. sold count, COD)            |
| `isAd`                                           | Whether the listing is a sponsored result                                    |
| `searchTerm` / `position`                        | The keyword that produced the result and its rank                            |

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

The Actor uses a simple **pay-per-result** model: **$1.00 per 1,000 products** ($0.001 per product). There are no startup fees and no platform usage charges on top — you only pay for the data you receive. A default run (50 products) costs just **$0.05**, and Apify's free plan credit is enough to scrape thousands of products every month.

### 💡 Tips

- Keep `maxItemsPerSearch` close to what you actually need — you pay per result.
- Use specific keywords (e.g. `iphone 15 pro 256gb`) for more targeted datasets.
- Schedule the Actor on Apify to track prices and new listings over time.
- Use `sortBy: "latest"` to monitor newly listed products.

### ❓ FAQ

**Is it legal to scrape Tokopedia?**
This scraper only collects publicly available product data and does not extract any personal information. However, you are responsible for using the data in compliance with applicable laws and Tokopedia's Terms of Service.

**How many results can I get?**
Popular keywords on Tokopedia have hundreds of thousands of results. The scraper paginates automatically until it reaches your `maxItemsPerSearch` limit or runs out of results.

**Something not working?**
Please report any issues via the **Issues** tab of this Actor — we actively monitor and fix them. Custom solutions are available on request.

Optimize your e-commerce strategy with **Tokopedia Listings Scraper** today! 🚀

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search for on Tokopedia, e.g. <code>iphone</code> or <code>laptop gaming</code>. Each term is searched separately.

## `maxItemsPerSearch` (type: `integer`):

Maximum number of products to scrape for each search term.

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

How to sort the search results.

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

Proxy settings. The scraper works without a proxy by default; enable one only if you experience blocking.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "maxItemsPerSearch": 50,
  "sortBy": "relevance",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "searchTerms": [
        "iphone"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/tokopedia-listings-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 = { "searchTerms": ["iphone"] }

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/tokopedia-listings-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 '{
  "searchTerms": [
    "iphone"
  ]
}' |
apify call piotrv1001/tokopedia-listings-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tokopedia Listings Scraper",
        "description": "The Tokopedia Listings Scraper extracts product listings from Tokopedia search results, capturing names, prices, discounts, ratings, images, shop details, categories, and promo labels — ideal for price monitoring, market research, and competitor analysis on Indonesia's largest marketplace.",
        "version": "0.0",
        "x-build-id": "KSxbvtODaCNRjvyLw"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/piotrv1001~tokopedia-listings-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-piotrv1001-tokopedia-listings-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/piotrv1001~tokopedia-listings-scraper/runs": {
            "post": {
                "operationId": "runs-sync-piotrv1001-tokopedia-listings-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/piotrv1001~tokopedia-listings-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-piotrv1001-tokopedia-listings-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",
                "required": [
                    "searchTerms"
                ],
                "properties": {
                    "searchTerms": {
                        "title": "Search terms",
                        "type": "array",
                        "description": "Keywords to search for on Tokopedia, e.g. <code>iphone</code> or <code>laptop gaming</code>. Each term is searched separately.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItemsPerSearch": {
                        "title": "Max items per search term",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of products to scrape for each search term.",
                        "default": 50
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "relevance",
                            "latest",
                            "cheapest",
                            "most_expensive",
                            "highest_rating"
                        ],
                        "type": "string",
                        "description": "How to sort the search results.",
                        "default": "relevance"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The scraper works without a proxy by default; enable one only if you experience blocking.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
