# Tokopedia Product Scraper 🛍️ (`easyapi/tokopedia-product-scraper`) Actor

Efficiently scrape product data from Tokopedia search results. Extract detailed information including prices, shop details, sales metrics, and more. Perfect for market research, price monitoring, and competitive analysis. Built with advanced anti-blocking measures. 🛍️

- **URL**: https://apify.com/easyapi/tokopedia-product-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** E-commerce, Integrations, Other
- **Features:** Limited permissions
- **Stats:** 175 total users, 3 monthly users, 92.9% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Product Scraper 🛍️

This powerful Actor scrapes detailed product information from Tokopedia, Indonesia's largest e-commerce platform. Perfect for market research, price monitoring, and competitive analysis! 🚀

### Features ✨

- 🔍 Scrapes products from search results
- 📦 Extracts comprehensive product details including:
  - Product name, ID, and URL
  - Price information (current price, original price, discounts)
  - Product images and media
  - Shop details (name, location, tier)
  - Sales performance indicators
  - Product ratings
  - Category information
- ⚡ High-performance scraping with Puppeteer
- 🛡️ Built-in proxy support
- 🎯 Customizable maximum items limit
- 📱 Includes mobile app deep links

### Use Cases 💡

- 📊 Market research and analysis
- 💰 Price monitoring and tracking
- 🏪 Competitor analysis
- 📈 Product trend analysis
- 🎯 Lead generation for sellers

### Input Parameters 🎛️

- `searchUrls`: Array of Tokopedia search URLs to scrape
- `maxItems`: Maximum number of items to scrape (optional)
- `proxyConfiguration`: Proxy settings (optional)

### Output 📤

The Actor outputs detailed product data in JSON format, including:

- Product details (ID, name, URL, price)
- Shop information
- Media URLs
- Sales metrics
- Category data
- Rating information

### Tips 💪

- Use specific search queries for better results
- Adjust `maxItems` based on your needs
- Enable proxy support for better reliability

Need custom features or having issues? Feel free to reach out! 🤝

#### Input Example

A full explanation of an input example in JSON.

```json
{
    "searchUrls": [
        "https://www.tokopedia.com/search?st=&q=gift&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource="
    ],
    "maxItems": 100
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
    {
        "searchUrl": "https://www.tokopedia.com/search?st=&q=gift&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource=",
        "oldID": 100000290323,
        "id": "100000290323",
        "name": "MOSSDOOM Paperbag For Gift Kertas",
        "url": "https://www.tokopedia.com/mossdoom/mossdoom-paperbag-for-gift-kertas-1730264220216886630?extParam=ivf%3Dfalse%26keyword%3Dgift%26search_id%3D20250306125010822C846D2BB9B43E08TG%26src%3Dsearch",
        "applink": "tokopedia://product/100000290323?extParam=ivf%3Dfalse%26keyword%3Dgift%26search_id%3D20250306125010822C846D2BB9B43E08TG%26src%3Dsearch",
        "mediaURL": {
            "image": "https://images.tokopedia.net/img/cache/200-square/aphluv/1997/1/1/e93ff5680d254058944b03378c362f07~.jpeg",
            "image300": "https://images.tokopedia.net/img/cache/300-square/aphluv/1997/1/1/e93ff5680d254058944b03378c362f07~.jpeg",
            "videoCustom": "",
            "__typename": "SearchProductV5MediaURL"
        },
        "shop": {
            "oldID": 14767008,
            "id": "14767008",
            "name": "MOSSDOOM",
            "url": "https://www.tokopedia.com/mossdoom",
            "city": "Jakarta Utara",
            "tier": 2,
            "__typename": "SearchProductV5Shop"
        },
        "badge": {
            "oldID": 4,
            "id": "4",
            "title": "Jakarta Utara",
            "url": "https://images.tokopedia.net/img/official_store_badge.png",
            "__typename": "SearchProductV5Badge"
        },
        "price": {
            "text": "Rp29.000",
            "number": 29000,
            "range": "",
            "original": "",
            "discountPercentage": 0,
            "__typename": "SearchProductV5Price"
        },
        "freeShipping": {
            "url": "",
            "__typename": "SearchProductV5FreeShipping"
        },
        "labelGroups": [
            {
                "position": "ri_product_credibility",
                "title": "10rb+ terjual",
                "type": "",
                "url": "",
                "styles": [],
                "__typename": "SearchProductV5LabelGroups"
            },
            {
                "position": "ri_product_offer",
                "title": "Bisa COD",
                "type": "",
                "url": "",
                "styles": [
                    {
                        "key": "text-color",
                        "value": "#FF7F17",
                        "__typename": "SearchProductV5LabelGroupsStyle"
                    }
                ],
                "__typename": "SearchProductV5LabelGroups"
            }
        ],
        "labelGroupsVariant": [],
        "category": {
            "oldID": 54,
            "id": "54",
            "name": "Perlengkapan Pesta",
            "breadcrumb": "perlengkapan-pesta/bungkus-kemasan/kertas-kado",
            "gaKey": "/searchproduct/perlengkapan-pesta/bungkus-kemasan/kertas-kado/gift/mossdoom/mossdoom-paperbag-for-gift-kertas-1730264220216886630",
            "__typename": "SearchProductV5Category"
        },
        "rating": "4.8",
        "wishlist": false,
        "ads": {
            "id": "",
            "productClickURL": "",
            "productViewURL": "",
            "productWishlistURL": "",
            "tag": 0,
            "__typename": "SearchProductV5Ads"
        },
        "meta": {
            "oldParentID": 12239878272,
            "parentID": "12239878272",
            "oldWarehouseID": 14630659,
            "warehouseID": "14630659",
            "isImageBlurred": false,
            "isPortrait": false,
            "__typename": "SearchProductV5ProductMeta"
        },
        "__typename": "searchProductV5Product"
    },
    ...
]
```

### 🤝 Related Actors

Here are some other useful actors for e-commerce and social media scraping:

- 🛍️ [Shopee Product Search Scraper](https://apify.com/easyapi/shopee-product-search-scraper) - Extract detailed product data from Shopee search results
- 🎥 [TikTok Videos Scraper](https://apify.com/easyapi/tiktok-videos-scraper) - Comprehensive TikTok video data extraction
- 📱 [TikTok LIVE Scraper](https://apify.com/easyapi/tiktok-live-scraper) - Real-time TikTok live stream data extraction
- 👥 [TikTok Following Scraper](https://apify.com/easyapi/tiktok-following-scraper) - Extract TikTok following list data
- 🔵 [Facebook Following Scraper](https://apify.com/easyapi/facebook-following-scraper) - Scrape Facebook following relationships
- 📝 [Reddit Posts Search Scraper](https://apify.com/easyapi/reddit-posts-search-scraper) - Extract Reddit post data and metadata
- 👻 [Snapchat User Stories Scraper](https://apify.com/easyapi/snapchat-user-stories-scraper) - Scrape Snapchat story content
- 🎯 [Snapchat Spotlight Detail Scraper](https://apify.com/easyapi/snapchat-spotlight-detail-scraper) - Extract Snapchat Spotlight video data
- 👥 [VK Groups Scraper](https://apify.com/easyapi/vk-groups-scraper) - Comprehensive VK group data extraction
- 👤 [VK People Scraper](https://apify.com/easyapi/vk-people-scraper) - Extract VK user profile information
- 📸 [Instagram Profile Scraper](https://apify.com/easyapi/instagram-profile-scraper) - Scrape Instagram profile data and metrics
- 🖼️ [Instagram Post Detail Scraper](https://apify.com/easyapi/instagram-post-detail-scraper) - Extract Instagram post details and engagement
- 📊 [Instagram Hashtag Scraper](https://apify.com/easyapi/instagram-hashtag-scraper) - Gather Instagram hashtag posts and metrics
- 💬 [Instagram Comments Scraper](https://apify.com/easyapi/instagram-comments-scraper) - Extract Instagram post comments and replies
- 📱 [Instagram Story Scraper](https://apify.com/easyapi/instagram-story-scraper) - Scrape Instagram story content and metrics

# Actor input Schema

## `searchUrls` (type: `array`):

List of Tokopedia search URLs to scrape

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

Maximum number of products to scrape (default: 100)

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

Proxy settings for the scraper

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.tokopedia.com/search?st=&q=gift&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource="
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ID"
  }
}
```

# 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 = {
    "searchUrls": [
        "https://www.tokopedia.com/search?st=&q=gift&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource="
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ID"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/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 = {
    "searchUrls": ["https://www.tokopedia.com/search?st=&q=gift&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource="],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ID",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/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 '{
  "searchUrls": [
    "https://www.tokopedia.com/search?st=&q=gift&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource="
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ID"
  }
}' |
apify call easyapi/tokopedia-product-scraper --silent --output-dataset

```

## MCP server setup

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