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

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://beta-securitybyobscurity.apify.com/easyapi/tokopedia-product-scraper.md
- **Developed by:** [EasyApi](https://beta-securitybyobscurity.apify.com/easyapi) (community)
- **Categories:** E-commerce, Integrations, Other
- **Stats:** 25 total users, 4 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$19.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.
You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

# 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": 100,
  "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 = {};

// 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 = {}

# 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("💾 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 '{}' |
apify call easyapi/tokopedia-product-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tokopedia Product Scraper 🛍️",
        "description": "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. 🛍️",
        "version": "0.0",
        "x-build-id": "CrtewElgA1JSb3QRV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/easyapi~tokopedia-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-easyapi-tokopedia-product-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/easyapi~tokopedia-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-easyapi-tokopedia-product-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/easyapi~tokopedia-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-easyapi-tokopedia-product-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": [
                    "searchUrls"
                ],
                "properties": {
                    "searchUrls": {
                        "title": "Search URLs",
                        "type": "array",
                        "description": "List of Tokopedia search URLs to scrape",
                        "default": [
                            "https://www.tokopedia.com/search?st=&q=gift&srp_component_id=02.01.00.00&srp_page_id=&srp_page_title=&navsource="
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Maximum Items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of products to scrape (default: 100)",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for the scraper",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "ID"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
