# Tokopedia Reviews Scraper ⭐ (`shahidirfan/tokopedia-reviews-scraper`) Actor

Scrape Tokopedia product reviews and ratings at scale. Extract customer feedback for competitive intelligence, sentiment analysis, and market research. Capture review data instantly for ecommerce insights and data-driven strategy.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

Extract Tokopedia product reviews quickly and turn them into structured, analysis-ready datasets. Collect reviewer feedback, ratings, variants, media counts, and timestamps in one run. Great for product research, seller monitoring, and customer sentiment analysis.

### Features

- **Review Collection** — Gather reviews from Tokopedia product pages with consistent structured output.
- **Simple Inputs** — Run with a product URL or direct product ID.
- **Pagination Controls** — Control volume using `results_wanted` and `max_pages`.
- **Sorting Options** — Choose newest, most helpful, highest rating, or lowest rating.
- **Clean Dataset Output** — Null and empty values are removed for cleaner exports.

### Use Cases

#### Product Quality Research
Analyze what buyers consistently praise or complain about before deciding inventory or marketing angles. Review data helps identify recurring quality signals fast.

#### Competitor Monitoring
Track review trends on competitor products over time. Spot shifts in satisfaction, common issues, and review momentum.

#### Customer Sentiment Analysis
Build datasets for sentiment scoring and theme extraction. Use ratings, review text, and variants to map buyer experience.

#### Marketplace Reporting
Create periodic reports for teams that need clear review KPIs. Export data to BI dashboards, spreadsheets, or internal tools.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `product_url` | String | No | Jasmine sample URL | Tokopedia product URL (recommended input). |
| `product_id` | String | No | — | Direct product ID. If filled, it takes priority over `product_url`. |
| `results_wanted` | Integer | No | `50` | Maximum number of reviews to save. |
| `max_pages` | Integer | No | `10` | Maximum number of pages to fetch. |
| `sort_by` | String | No | `informative_score desc` | Review sort order. |
| `proxyConfiguration` | Object | No | `{ "useApifyProxy": false }` | Optional proxy settings. |

Input priority:

1. `product_id`
2. `product_url`
3. Fallback to `INPUT.json` only when user input is empty

---

### Output Data

Each dataset item contains flattened review fields:

| Field | Type | Description |
|-------|------|-------------|
| `product_id` | String | Product identifier. |
| `product_url` | String | Product page URL. |
| `product_name` | String | Product name when available. |
| `shop_name` | String | Shop name when available. |
| `review_id` | String | Review identifier. |
| `page` | Integer | Review page number. |
| `position` | Integer | Review position in collected sequence. |
| `rating` | Number | Review rating. |
| `variant_name` | String | Purchased variant label. |
| `review_text` | String | Review message content. |
| `buyer_name` | String | Reviewer display name. |
| `likes_count` | Integer | Number of likes on review. |
| `images_count` | Integer | Number of attached images. |
| `videos_count` | Integer | Number of attached videos. |
| `review_time_relative` | String | Relative review time label. |
| `review_time_iso` | String | Review timestamp in ISO format when available. |
| `sort_by` | String | Sort option used in run. |
| `source_type` | String | Input source used (`product_id`, `product_url`, `default_url`). |
| `fetched_at` | String | Data collection timestamp. |

---

### Usage Examples

#### Product URL Run

```json
{
  "product_url": "https://www.tokopedia.com/toko-hijab-jasmine/pashmina-kaos-bahan-cotton-rayon-bahan-adem-ringan-dan-lembut-pashmina-kaos-jasmine-1729666273262209327",
  "results_wanted": 30,
  "max_pages": 5,
  "sort_by": "create_time desc"
}
````

#### Product ID Run

```json
{
  "product_id": "100018999468",
  "results_wanted": 20,
  "max_pages": 2,
  "sort_by": "informative_score desc"
}
```

#### Rating-Based Sorting

```json
{
  "product_url": "https://www.tokopedia.com/toko-hijab-jasmine/pashmina-kaos-bahan-cotton-rayon-bahan-adem-ringan-dan-lembut-pashmina-kaos-jasmine-1729666273262209327",
  "results_wanted": 50,
  "max_pages": 10,
  "sort_by": "rating desc"
}
```

***

### Sample Output

```json
{
  "product_id": "100018999468",
  "product_url": "https://www.tokopedia.com/toko-hijab-jasmine/pashmina-kaos-bahan-cotton-rayon-bahan-adem-ringan-dan-lembut-pashmina-kaos-jasmine-1729666273262209327",
  "product_name": "Jasmine Pashmina Kaos Bahan Cotton Rayon Adem Ringan Lembut Ukuran 175x60 cm - Black",
  "shop_name": "Toko hijab jasmine",
  "review_id": "1469897442",
  "page": 1,
  "position": 1,
  "rating": 5,
  "variant_name": "Brownie",
  "review_text": "Bagus banget sesuai ekspektasi...",
  "buyer_name": "R***u",
  "likes_count": 1,
  "images_count": 4,
  "videos_count": 0,
  "review_time_relative": "12 bulan lalu",
  "review_time_iso": "2025-05-20T17:39:41.000Z",
  "sort_by": "informative_score desc",
  "source_type": "product_url",
  "fetched_at": "2026-05-16T08:23:33.387Z"
}
```

***

### Tips for Best Results

#### Start With Focused Limits

- Begin with `results_wanted` between 20 and 50 for validation.
- Increase limits only after confirming output quality.

#### Use Stable Product Targets

- Use product URLs that already have visible customer reviews.
- For automation pipelines, use `product_id` for consistent targeting.

#### Use Proxies for Scale

- Enable proxies for higher run stability in larger or repeated jobs.
- Combine scheduled runs with sensible pagination limits.

***

### Integrations

Connect your review dataset with:

- **Google Sheets** — Share review summaries with teams.
- **Airtable** — Build searchable product feedback databases.
- **Looker Studio / BI tools** — Visualize trends and sentiment metrics.
- **Webhooks** — Trigger downstream automations after each run.

#### Export Formats

- **JSON** — For APIs and developer workflows.
- **CSV** — For spreadsheets and quick analysis.
- **Excel** — For stakeholder reporting.

***

### Frequently Asked Questions

#### Why do some runs return fewer reviews than requested?

The actor stops when no more pages or reviews are available for that product and sort combination.

#### Can I run with only product ID?

Yes. `product_id` is supported and takes priority when both ID and URL are provided.

#### Are empty fields included in output?

No. Null and empty values are removed before saving dataset items.

#### Does sorting change the review list?

Yes. Different `sort_by` options can produce different review order and selections.

#### Can I schedule recurring runs?

Yes. You can schedule daily or hourly runs to track changes over time.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [Apify API Reference](https://docs.apify.com/api/v2)

***

### Legal Notice

Use this actor responsibly and ensure compliance with Tokopedia terms and applicable laws. You are responsible for lawful and ethical data usage.

# Actor input Schema

## `product_url` (type: `string`):

Tokopedia product URL. Recommended input.

## `product_id` (type: `string`):

Direct Tokopedia product ID. If provided, this takes priority over Product URL.

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

Maximum number of reviews to save.

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

Maximum number of review pages to fetch.

## `sort_by` (type: `string`):

Review sorting order.

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

Optional proxy settings for request routing.

## Actor input object example

```json
{
  "product_url": "https://www.tokopedia.com/toko-hijab-jasmine/pashmina-kaos-bahan-cotton-rayon-bahan-adem-ringan-dan-lembut-pashmina-kaos-jasmine-1729666273262209327",
  "results_wanted": 20,
  "max_pages": 5,
  "sort_by": "informative_score desc",
  "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 = {
    "product_url": "https://www.tokopedia.com/toko-hijab-jasmine/pashmina-kaos-bahan-cotton-rayon-bahan-adem-ringan-dan-lembut-pashmina-kaos-jasmine-1729666273262209327",
    "product_id": "",
    "results_wanted": 20,
    "max_pages": 5,
    "sort_by": "informative_score desc"
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/tokopedia-reviews-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 = {
    "product_url": "https://www.tokopedia.com/toko-hijab-jasmine/pashmina-kaos-bahan-cotton-rayon-bahan-adem-ringan-dan-lembut-pashmina-kaos-jasmine-1729666273262209327",
    "product_id": "",
    "results_wanted": 20,
    "max_pages": 5,
    "sort_by": "informative_score desc",
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/tokopedia-reviews-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 '{
  "product_url": "https://www.tokopedia.com/toko-hijab-jasmine/pashmina-kaos-bahan-cotton-rayon-bahan-adem-ringan-dan-lembut-pashmina-kaos-jasmine-1729666273262209327",
  "product_id": "",
  "results_wanted": 20,
  "max_pages": 5,
  "sort_by": "informative_score desc"
}' |
apify call shahidirfan/tokopedia-reviews-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tokopedia Reviews Scraper ⭐",
        "description": "Scrape Tokopedia product reviews and ratings at scale. Extract customer feedback for competitive intelligence, sentiment analysis, and market research. Capture review data instantly for ecommerce insights and data-driven strategy.",
        "version": "0.0",
        "x-build-id": "JudfQ3NoVUhm5SpoV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~tokopedia-reviews-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-tokopedia-reviews-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/shahidirfan~tokopedia-reviews-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-tokopedia-reviews-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/shahidirfan~tokopedia-reviews-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-tokopedia-reviews-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",
                "properties": {
                    "product_url": {
                        "title": "Product URL",
                        "type": "string",
                        "description": "Tokopedia product URL. Recommended input."
                    },
                    "product_id": {
                        "title": "Product ID",
                        "type": "string",
                        "description": "Direct Tokopedia product ID. If provided, this takes priority over Product URL."
                    },
                    "results_wanted": {
                        "title": "Maximum reviews",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of reviews to save.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of review pages to fetch.",
                        "default": 5
                    },
                    "sort_by": {
                        "title": "Sort by",
                        "enum": [
                            "informative_score desc",
                            "create_time desc",
                            "rating desc",
                            "rating asc"
                        ],
                        "type": "string",
                        "description": "Review sorting order.",
                        "default": "informative_score desc"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional proxy settings for request routing.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
