# Tokopedia Scraper — Indonesia Products, Prices, Sold Counts (`hexagone-data/tokopedia-product-scraper`) Actor

Scrape Tokopedia (Indonesia) by keyword, filtered search, category, shop or product page: price, struck price, real discount, sold count, rating, shop, city, Mall or Power Shop, TikTok Shop ids; optional product details (stock, variants). Each product charged once.

- **URL**: https://apify.com/hexagone-data/tokopedia-product-scraper.md
- **Developed by:** [Hexagone Data](https://apify.com/hexagone-data) (community)
- **Categories:** E-commerce, Automation, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 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 Scraper — Indonesia Products, Prices, Sold Counts & Shops

Scrape **tokopedia.com** (Indonesia) by keyword, or paste a Tokopedia address: a search with all its filters, a category, a shop or a
product page. Every row has the price, the struck price, **the discount the card really shows**, the sold count ("9rb+ terjual" and
its number), the rating, the shop (name, city, Mall / Power Shop), the category and the TikTok Shop ids. Add `includeDetails` for the
product page: description, specifications, stock, exact sold count, review count, variants with their price and stock.

### Why this one: every filter of the site, the real discount, and no duplicate ever charged

- **Every filter of Tokopedia's search is kept**: paste the address of a filtered search and the Actor reads exactly that list:
  price range (`pmin`, `pmax`), seller location (`fcity`), shop type Mall or Power Shop (`shop_tier`), rating (`rt=4,5`), condition
  new or used (`condition`), cash on delivery (`cod`), discounted only (`is_discount`), pre-order (`preorder`) and the sort (`ob`).
  Measured on "kemeja batik pria" (148,083 results): Jakarta sellers only 31,132, Mall only 5,627, used only 336, each filter answered
  by the site itself.
- **The discount the card shows, not a field that is always 0**: Tokopedia's own `discountPercentage` field was 0 on all of the
  2,318 product rows (2,084 distinct products) we measured, while 1,126 of these rows showed a red percentage on the card. `discountPercent` is read from that label; the struck
  price (`originalPrice`) is the one the card shows.
- **Sold count as shown, and as a number**: `soldText` is the card's text ("9rb+ terjual"), `soldCount` its lower bound as a number
  (9rb+ = 9,000; 1,5rb = 1,500; 2jt = 2,000,000), on 1,963 of the 2,318 rows measured (the others show no sold count: null).
- **TikTok Shop ids** on every row (`ttsProductId`, `ttsSkuId`), with shop type `mall`, `power_shop` or `regular`.
- **No duplicate charged, and the site's unstable order corrected**: in its default order Tokopedia shows some products twice from one
  page to the next and never shows others. Measured on a search of 2,743 results read to the end, twice: 2,743 rows read for 2,716 to
  2,719 distinct products. Each product is delivered and charged once (deduplicated by `productId` before writing, across pages,
  keywords and addresses), and when a list ends short of its announced total, a second pass in another order (by price) adds the
  products the first order never showed (`foundBy: completion_pass`).
- **An honest status per keyword or address**: announced total, distinct products found, missing, pages read, the second pass and what
  it added, products delivered. A list is `done` only when what was found matches what Tokopedia announced; otherwise the summary says
  `partial_collection` and why (for example Tokopedia's 6,000-products window). A refused or unreadable answer is never reported as
  "no results".

### Try it (20 products)

Run the prefilled input: keyword `sepatu lari` (running shoes), `maxItems` 20. You get 20 rows (one page of the site's API), and the
run summary (key-value store, `SUMMARY`) shows the total the search announces (98,380 results on 18 November 2026) and that the run
stopped at your `maxItems`.

### What to paste

- **Keywords** (`searchQueries`), one per line, in Indonesian or English: `sepatu lari`, `kopi arabika`, `laptop thinkpad`; with
  `sort`: most relevant (Tokopedia's default), newest, price low to high, price high to low.
- **Tokopedia addresses** (`startUrls`), copied from your browser:
  - a search with its filters: `https://www.tokopedia.com/search?st=product&q=serum%20wajah&shop_tier=2&ob=3`,
    `https://www.tokopedia.com/search?st=product&q=beras%205%20kg&pmin=60000&pmax=90000&rt=4%2C5`,
    `https://www.tokopedia.com/search?st=product&q=kemeja%20batik%20pria&fcity=174%2C175%2C176%2C177%2C178%2C179` (Jakarta);
  - a category: `https://www.tokopedia.com/p/handphone-tablet/handphone` (up to 3 levels, with its filters);
  - a shop: `https://www.tokopedia.com/jacksonofficial` (all its products);
  - a product page: `https://www.tokopedia.com/<shop>/<product>` (one row with the product page details; `m.tokopedia.com` works too).
- `page=` in an address is ignored and said in the summary: every list is read from page 1.
- Each address is checked alone: an address of another site, a short `tk.tokopedia.com` / `vt.tokopedia.com` link, a shop showcase
  (`/etalase/`) or a shop search (`st=shop`) is refused with its reason (`invalid_url`), the other addresses are read.

### Output

One row per product. Fields marked "product page" are filled with `includeDetails` (and for a pasted product page); without it they are
`null`, as is any value Tokopedia does not show (never a guessed 0 or empty text). A row of keyword `sepatu lari` (rank 2), read
from the pages saved on 18 November 2026:

```json
{
  "productId": "103325892444",
  "parentProductId": "103325892443",
  "title": "SPOTEC Running Epic 978 Sepatu Olahraga Lari Pria Wanita - 0182",
  "url": "https://www.tokopedia.com/spotec/spotec-running-epic-978-sepatu-olahraga-lari-pria-wanita-0182-1735375374927890409-1735375734223570921",
  "price": 376105,
  "priceText": "Rp376.105",
  "originalPrice": 439900,
  "discountPercent": 15,
  "currency": "IDR",
  "rating": 5.0,
  "soldText": "30+ terjual",
  "soldCount": 30,
  "isPreorder": false,
  "cashOnDelivery": true,
  "offers": [
    "Hemat s.d 8% Pakai Bonus",
    "Bisa COD"
  ],
  "promotionLabel": "Harga Diskon",
  "isLocalProduct": true,
  "shopId": "11162592",
  "shopName": "Spotec",
  "shopUrl": "https://www.tokopedia.com/spotec",
  "shopCity": "Kab. Sidoarjo",
  "shopTier": 2,
  "shopType": "mall",
  "categoryId": "62",
  "categoryName": "Olahraga",
  "categoryPath": "olahraga/perlengkapan-lari/sepatu-lari-pria",
  "image": "https://p16-images-comn-sg.tokopedia-static.net/tos-alisg-i-aphluv4xwc-sg/50ba995293ba4dc38219b562daccf173~tplv-aphluv4xwc-white-pad-v1:300:300.jpeg",
  "imageExpiresAt": null,
  "videoUrl": "https://vod-stream.tokopedia.net/view/ttvideo?source=QeEaKL&ttvid=v10c21g50000d2ns38nog65rj38v45t0",
  "ttsProductId": "1735375374927890409",
  "ttsSkuId": "1735375734223570921",
  "rank": 2,
  "page": 1,
  "search": "sepatu lari",
  "sourceUrl": "https://www.tokopedia.com/search?st=product&q=sepatu%20lari",
  "sourceType": "keyword",
  "foundBy": "main",
  "scrapedAt": "2026-11-18T10:34:47+00:00",
  "description": null,
  "specifications": null,
  "stock": null,
  "soldCountExact": null,
  "reviewCount": null,
  "ratingExact": null,
  "condition": null,
  "weight": null,
  "weightUnit": null,
  "minOrder": null,
  "createdAt": null,
  "categoryNames": null,
  "images": null,
  "imagesExpireAt": null,
  "variantOptions": null,
  "variants": null,
  "detailsStatus": null
}
```

`rank` is the position in the list as Tokopedia ordered it (1, 2, ...), `page` the page of the site's API where the product was first
seen; both are `null` for products added by the second pass and for product pages. For a category, `rank` is the order of this
Actor's reading, not always the position shown on the category page (measured: 57 of the first 60 products in common, 9 at the same
position). A row from a pasted product page has the fields the product page shows (price, struck price and discount, rating, shop,
category, TikTok ids, all detail fields); the card-only fields (`soldText`, `offers`, `shopCity`, `shopTier`, `isLocalProduct`,
`promotionLabel`, `videoUrl`) are `null` there, and so is `cashOnDelivery` (the product page data says "no" for products whose page
shows "Bisa COD": 26 of 40 measured); `shopType` there is `mall` or `null` (the product page does not tell a Power Shop from a regular
shop reliably). Every field is described in the dataset schema of the Actor.

**Pictures**: Tokopedia serves signed picture addresses that stop working about 1 hour after they are read. When the same picture
exists at a stable address (measured: 1,812 of 2,084 card pictures, 258 of 323 product page pictures), `image` and `images` give that
stable address and `imageExpiresAt` /
`imagesExpireAt` are `null`. Otherwise the address is given as Tokopedia served it, and `imageExpiresAt` (or `imagesExpireAt`, the
earliest of the gallery) says when it expires (UTC): download those pictures within the hour, or run the Actor again for fresh ones.

### Run summary

The `OUTPUT` record (JSON) and the `SUMMARY` page give, for each keyword or address: `status`, `reason`, a message in plain words,
`totalAnnounced` (the largest total Tokopedia showed for the list), `productsDistinct`, `missing` (and `missingVsAnnounced`, the same gap as a whole number), `pagesRead`, `rowsRead`,
`repeatsBetweenPages`, `alreadyDelivered` (found by an earlier input of the run, not delivered twice), `completionPass` (done or not,
order used, products found and added), `delivered`, `detailsRead`, `detailsFailed`, `detailsSkipped` (product pages not requested
because the run's time limit was near), `rereads` (empty pages read again on a fresh connection), `ignoredParameters`. The run totals
give `detailsRead`, `detailsFailed`, `detailsCharged` and `detailsSkippedForTime`.

Statuses: `done` (found = announced, within 1 product or 1.5 %), `partial_collection`, `max_items_reached`, `max_charge_reached`,
`no_results` (Tokopedia shows 0 results, read twice on fresh connections), `not_found` (no such product, shop or category: 410 Gone),
`invalid_url`, `failed` (Tokopedia refused or could not be read: not an empty result, your input is not the cause), `duplicate` (same
list as an earlier line, read once), `not_processed` (a limit was reached first).

Reasons: `site_window_cap` (more than 6,000 products: Tokopedia shows no more; narrow with a price, location or shop-type filter),
`site_list_end` (the list ended before its total, even after the second pass), `site_page_empty` (Tokopedia answered an empty page
before its total, twice), `requests_failed`, `blocked`, `throttled`, `unreadable_answer`, `maxItems`, `maxItemsPerSearch`, `maxCharge`,
`run_time_limit`, `input_limit`, `stopped`, `interrupted`, `checkpoint_too_large`, `same_input`, `already_delivered`, `product_not_found`,
`product_redirected`, `shop_not_found`, `category_not_found`, `list_not_found`; refused addresses: `not_tokopedia`, `short_link`,
`shop_search`, `not_supported`, `not_a_list`, `invalid_url`. Warnings (`anomalies`): `REQUESTS_FAILED`, `UNREADABLE_ANSWER`,
`SITE_PAGE_EMPTY`, `DETAILS_NOT_READ`, `UNEXPECTED_DATA`. A run that delivers nothing ends FAILED with its cause, except a real 0-result
search.

### Pricing

Pay per event, prices of the free plan; subscribers pay less (Bronze -10 %, Silver -20 %, Gold to Diamond -30 %).

- **Product**: **$0.0015 per product** delivered ($1.50 per 1,000 products).
- **Product details**: $0.0025 per delivered product whose product page was read (`detailsStatus` = `ok`), $2.50 per 1,000;
  with `includeDetails`, and for every pasted product page. A product page that could not be read (`error`) or is gone (`not_found`)
  pays no product details.
- **Start**: $0.005 per run (Apify's start fee, one per GB of memory: the default 512 MB is one start).

| Run | Without product page details | With product page details |
|---|---|---|
| 20 products | $0.035 | $0.085 |
| 1,000 products | $1.505 | $4.005 |

Repeated products, refused requests, searches without products and invalid addresses are never charged. `maxItems` caps what a run can
cost. Your maximum charge per run is respected on both events: no product page is read for a product the remaining budget cannot pay,
and the run stops cleanly at it (`max_charge_reached`).

### Known limits

- **6,000 products at most per list**: Tokopedia shows no more for one search, category or shop (`start` 6,000 answers 0 products).
  The summary says `site_window_cap` with the numbers; split a big list with a price, location or shop-type filter in the address
  (measured: 4 price ranges of a 2,743-result search add up to 2,743).
- **A shop is read through Tokopedia's search of that shop**: all its products (388 of 388 for the shop of the example), but not in the
  order of the shop page (another API), and the shop page can show a discount label the search does not show (8 of 84 cards measured).
- **Categories** are read 60 products per page (Tokopedia's maximum there), and Tokopedia repeats products between pages there too:
  a filtered category of 818 products gave 804 to 817 distinct products depending on the order, 818 with a second order; the second
  pass is made for that.
- A shop with several warehouses can show another city on the page than in the data (9 cards of 688 measured).
- **Picture addresses that are not stable expire about 1 hour after the run** (about 1 card picture in 8 measured, 1 product page
  picture in 5; `imageExpiresAt` and `imagesExpireAt` give the time): see Output.
- **Product pages take time**: with `includeDetails`, about 1 product page per second (measured on Apify: 400 products with their
  product page in 472 s), so about 3,000 products with details per hour. The run's default timeout is set for about 12,000 products
  with details; for bigger runs, raise the run timeout (Run options > Timeout). When the timeout comes near, the Actor stops asking for
  product pages, writes the rows it has (those without their product page get `detailsStatus` `error`, `detailsSkipped` in the
  summary, and no product-details charge), then ends cleanly with its summary and the reason `run_time_limit`.
- No customer reviews, no shop search (`st=shop`), no short `tk.tokopedia.com` / `vt.tokopedia.com` links (open them and paste the
  address they lead to), no shop showcases (`/etalase/`).
- Prices are those of an anonymous visitor in Jakarta Pusat (Tokopedia's default location without an account).

### Support

Questions, a list that does not come out right, a field you need: open an issue in the Issues tab with the run link; we answer there.
This Actor is not affiliated with Tokopedia, TikTok or ByteDance; it reads the public pages any visitor sees, without an account.

If this actor saves you time, please leave a review.

# Actor input Schema

## `searchQueries` (type: `array`):

One keyword per line (Indonesian or English), searched on Tokopedia like its search bar, in the sort below. Up to 6,000 products per keyword (Tokopedia's own window: paste a search address with a price or location filter to split a bigger list).

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

Order of the results for your keywords; rank follows it. An address of startUrls keeps its own sort (ob=).

## `startUrls` (type: `array`):

tokopedia.com pages copied from your browser: a search with its filters (/search?st=product\&q=...\&pmin=...\&fcity=...\&shop_tier=2\&rt=4,5\&condition=1\&ob=3...), a category (/p/handphone-tablet/handphone), a shop (/jacksonofficial), or a product page (/<shop>/<product>). Each address keeps all its filters; page= is ignored (read from page 1). Not read: shop search (st=shop), short tk.tokopedia.com links, shop showcases (/etalase/).

## `includeDetails` (type: `boolean`):

Also read each product's page during the run: description, specifications, stock, exact sold count, review count, exact rating, condition, weight, minimum order, images, variants with their price and stock. Slower (one more request per product, 4 at a time) and charged as one Product details event per product whose page was read. A product page that cannot be read leaves those fields null (detailsStatus not_found or error) and the run summary says how many.

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

Stop after this many products in the dataset, all keywords and addresses together. 0 = no limit.

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

Stop each keyword or address after this many products. 0 = no limit (up to 6,000 per list, Tokopedia's own window).

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

Leave empty: direct connection, and the Apify datacenter proxy only if Tokopedia refuses it (measured: direct and datacenter both answer). Pick a proxy to use it when the direct connection is refused; 'No proxy' never uses one.

## Actor input object example

```json
{
  "searchQueries": [
    "sepatu lari"
  ],
  "sort": "relevance",
  "includeDetails": false,
  "maxItems": 20,
  "maxItemsPerSearch": 0
}
```

# Actor output Schema

## `rows` (type: `string`):

One row per product, every field.

## `overview` (type: `string`):

Search, rank, title, price, struck price, discount, sold, rating, shop, city, link, picture.

## `summary` (type: `string`):

Readable per-search summary: status, delivered, found, announced, missing, pages, reason for anything missing.

## `summaryJson` (type: `string`):

The same summary as JSON (OUTPUT record): perUrl with totalAnnounced, productsDistinct, missing, pagesRead, completionPass, delivered.

# 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 = {
    "searchQueries": [
        "sepatu lari"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("hexagone-data/tokopedia-product-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["sepatu lari"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("hexagone-data/tokopedia-product-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "sepatu lari"
  ],
  "maxItems": 20
}' |
apify call hexagone-data/tokopedia-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hexagone-data/tokopedia-product-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/7VuLFZX8FDbJwrQIV/builds/ErDeFqRnkOLW9mq05/openapi.json
