# Shopee Taiwan Product Scraper 💰$50/1K — raw get_pc + shop (`blueskyscraper/shopee-tw-product-scraper`) Actor

Scrapes Shopee Taiwan products and returns the raw get_pc PDP payload plus shop data, wrapped in the client envelope: item_id, raw.get_pc, raw.shop, shop_id, status.

- **URL**: https://apify.com/blueskyscraper/shopee-tw-product-scraper.md
- **Developed by:** [BlueskyScraper](https://apify.com/blueskyscraper) (community)
- **Categories:** E-commerce, Agents, MCP servers
- **Features:** Limited permissions
- **Stats:** 32 total users, 11 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 product (full)s

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

## Shopee Taiwan Product Scraper (get_pc raw + shop)

Scrapes Shopee **Taiwan** product pages and returns exactly the payload the
client asked for: the **raw `get_pc` PDP response** plus the **shop object**,
wrapped in one envelope.

### Output (per product)

```json
{
  "billable": true,
  "http_status": {},
  "item_id": 45717231076,
  "raw": {
    "get_pc": { "bff_meta": null, "data": { "item": { … }, "shop": { … }, … }, "error": 0, "error_msg": null },
    "shop": { "ab_test_info": { … }, "account": { … }, "follower_count": 290389, … }
  },
  "result_status": "success",
  "retriable": false,
  "shop_id": 188277742,
  "status": "completed",
  "voucher_source": "cache"
}
```

- `raw.get_pc` — the `get_pc` record: title, description, brand, attributes, variants, gallery, shipping and more.
- `raw.shop` — the shop object: followers, rating, response rate, location, …
- **Without cookies** (default): `result_status: "partial"`. No browser is used. Shopee blanks price, stock and sold
  inside `raw.get_pc` for visitors who are not logged in, so `price`, `original_price` and `price_source` are added
  from the product's search card. Billed as `product_partial`.
- **With cookies**: the raw response as your logged-in session sees it, billed as `product_full`.
- If nothing could be read: `status: "failed"`, `raw.get_pc: null`. Failed rows are free.

> Prices in `get_pc` are raw Shopee units (×10^5 TWD), e.g. `4990000000` = 49,900 TWD.

### Input

| Field | Meaning |
|---|---|
| `itemUrls` | Shopee TW product URLs, e.g. `https://shopee.tw/product/188277742/45717231076` (also `…-i.188277742.45717231076`, `i.188277742.45717231076`) |
| `cookies` | Optional. Cookies from a logged-in shopee.tw browser (JSON / cookie string / "Copy as cURL"); needed only for price, stock and sold inside `raw.get_pc` |
| `useApifyProxy` | Default true |
| `residentialProxy` | Default true — residential (TW) proxy is the only reliable way against Shopee |
| `apifyProxyCountry` | Default `TW` |
| `saveSnapshots` | Save screenshot when `get_pc` is not captured |

### How it works

Without cookies: reads the product and shop pages over plain HTTP from a Taiwanese residential address, takes the
records they embed, and adds the price from the search card. With cookies: opens Chromium with your session and calls
`get_pc` and `get_shop_base`. Either way the result goes into the same envelope.

### Limitations (honest)

- Stock and units sold are only available with cookies.
- With cookies, Shopee may still refuse a session; then `status: failed`, free of charge.
- The raw payload is saved as-is (including large `voucher` blocks) — your client asked for exactly this.

### Run / publish

```bash
npm install -g apify-cli
apify login
apify push          # builds and publishes to YOUR account
```

Then Run → paste product URLs → export dataset (JSON/CSV).

### Tests

```bash
node --test test/
```

# Actor input Schema

## `itemUrls` (type: `array`):

Shopee TW product URLs, e.g. https://shopee.tw/product/188277742/45717231076 — or plain i.188277742.45717231076

## `cookies` (type: `string`):

Cookies from your logged-in shopee.tw browser (JSON object/array, cookie string, or 'Copy as cURL'). Without them the run needs no browser and returns the public record: everything in raw.get_pc except price, stock and sold, with the price taken from the search card.

## `useApifyProxy` (type: `boolean`):

Route through Apify proxy. Recommended for Shopee.

## `residentialProxy` (type: `boolean`):

Use residential (home IP) proxy instead of datacenter — much better success rate on Shopee.

## `apifyProxyCountry` (type: `string`):

Country code for the proxy exit (TW recommended).

## `saveSnapshots` (type: `boolean`):

Save a screenshot when the response could not be captured.

## `mode` (type: `string`):

partial = public record, no cookies needed (default). full = raw get_pc with price, stock and sold, needs cookies; without cookies it falls back to partial.

## `parallelism` (type: `integer`):

How many API requests run at once on the same session (1-12).

## Actor input object example

```json
{
  "itemUrls": [
    "https://shopee.tw/product/188277742/45717231076"
  ],
  "useApifyProxy": true,
  "residentialProxy": true,
  "apifyProxyCountry": "TW",
  "saveSnapshots": true,
  "mode": "partial",
  "parallelism": 4
}
```

# Actor output Schema

## `dataset` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("blueskyscraper/shopee-tw-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("blueskyscraper/shopee-tw-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 '{}' |
apify call blueskyscraper/shopee-tw-product-scraper --silent --output-dataset

```

## MCP server setup

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