# TikTok Shop Product Scraper (`piotrv1001/tiktok-shop-product-scraper`) Actor

The TikTok Shop Product Scraper extracts product pages and seller storefronts across 8 country markets, capturing titles, live prices, discounts, variants, stock, sold counts, ratings, images, and full shop metadata — ideal for resellers, market research, and competitive price tracking.

- **URL**: https://apify.com/piotrv1001/tiktok-shop-product-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** E-commerce, Automation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.

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

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

### 🛍️ TikTok Shop Product Scraper

Extract structured product data from **TikTok Shop** at scale — product detail pages, seller storefronts, full variant breakdowns, and live pricing. Built for resellers, market researchers, dropshippers, and brand-monitoring teams who need clean, ready-to-use TikTok Shop data without fighting anti-bot protection.

### ✨ Features

-   🏷️ **Full product detail**: title, description, brand, 4-level category path, images, videos, SKUs/variants, available stock, sold count, and promotion labels.
-   💸 **Live pricing**: current sale price, original price, discount percent, and currency — extracted from the rendered page so the numbers always match what shoppers see.
-   ⭐ **Reviews & ratings**: overall rating score, review count, and 1–5 star distribution.
-   🏪 **Shop / seller metadata**: shop name, rating, followers, total products on sale, total sold, video count, and region.
-   🌍 **Multi-country**: United States, United Kingdom, Indonesia, Malaysia, Thailand, Singapore, Vietnam, Philippines — each in its native currency.
-   🔗 **Three discovery modes**: paste product URLs, drop in numeric product IDs, or point at seller storefronts to enumerate their catalogue.
-   🌱 **Optional related-product fan-out**: from any seed product, follow alternative-product and top-reviewed-product links to expand coverage automatically.

### 🛠️ How It Works

1. **Pick an input mode**
    - `startUrls` — paste TikTok Shop product or storefront URLs (`https://www.tiktok.com/shop/pdp/...` or `https://www.tiktok.com/shop/store/...`).
    - `productIds` — bulk-paste numeric product IDs and let the actor resolve each one.
    - `sellerIds` — provide a seller ID (with optional slug) and the actor harvests every product on that storefront.
2. **Choose your countries** — `us` is the default; add others to fetch the same product in multiple regions / currencies.
3. **Run the actor** — results stream into the dataset as JSON, one record per product. Failed pages are retried automatically and don't pollute the output.

### ⚙️ Input

All inputs are optional, but you must provide at least one of `startUrls`, `productIds`, or `sellerIds` so the actor has something to scrape.

| Field            | Type      | Default | Description                                                                                                                                                                                                                                          |
| ---------------- | --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `startUrls`      | `array`   | —       | TikTok Shop URLs to scrape. Accepts product pages (`/shop/pdp/<slug>/<productId>`), the alt product path (`/view/product/<productId>`), and seller storefronts (`/shop/store/<slug>/<sellerId>`).                                                    |
| `productIds`     | `array`   | —       | Bulk list of numeric TikTok Shop product IDs. The actor resolves each to its product detail page automatically.                                                                                                                                      |
| `sellerIds`      | `array`   | —       | Seller storefronts to enumerate. Each entry needs at least `{ "sellerId": "..." }`; an optional `slug` produces a prettier canonical URL. The actor harvests every product on the storefront's first page.                                           |
| `countries`      | `array`   | `["us"]`| Country codes for the TikTok Shop region. One of `us`, `gb`, `id`, `my`, `th`, `sg`, `vn`, `ph`. Each product/storefront is fetched once per country, and prices come back in the matching currency (USD, GBP, IDR, MYR, THB, SGD, VND, PHP).        |
| `expandRelated`  | `boolean` | `false` | After scraping each product, enqueue its alternative-product and top-reviewed-product entries. Each related product is scraped and saved to the dataset (billed accordingly). Combine with `maxProducts` to cap the budget.                          |
| `maxProducts`    | `integer` | `0`     | Stop after this many products have been saved. `0` means no cap. Useful as a safety ceiling when `expandRelated` is enabled.                                                                                                                         |

#### Example input

```json
{
    "startUrls": [
        { "url": "https://www.tiktok.com/shop/pdp/x/1729587769570529799" }
    ],
    "productIds": ["1729587769570529799", "1730946689312002567"],
    "sellerIds": [
        { "sellerId": "7495794203056835079", "slug": "goli-nutrition" }
    ],
    "countries": ["us", "gb"],
    "expandRelated": false,
    "maxProducts": 100
}
````

### 📊 Sample Output Data

```json
[
    {
        "productId": "1729587769570529799",
        "sellerId": "7495794203056835079",
        "url": "https://www.tiktok.com/shop/pdp/x/1729587769570529799",
        "countryCode": "us",
        "title": "3 Bottles of Goli Ashwagandha & Vitamin D Gummy - Mixed Berry, KSM-66, Vegan, Plant Based, Non-GMO, Gluten & Gelatin Free",
        "brand": "Goli Nutrition",
        "categoryPath": [
            "Health",
            "Nutrition & Wellness",
            "Vitamins, Minerals & Wellness Supplements",
            "Vitamins Supplements"
        ],
        "price": 14.98,
        "originalPrice": 24.99,
        "discountPercent": 40,
        "currency": "USD",
        "currencySymbol": "$",
        "soldCount": 853744,
        "availableQuantity": 247869,
        "ratingScore": 4.7,
        "ratingCount": 71077,
        "ratingDistribution": { "1": 3225, "2": 762, "3": 1815, "4": 4656, "5": 60619 },
        "images": [
            "https://p16-oec-general-useast5.ttcdn-us.com/.../image-1.jpeg",
            "https://p16-oec-general-useast5.ttcdn-us.com/.../image-2.jpeg"
        ],
        "variants": [
            {
                "skuId": "1729587788239049223",
                "skuName": "ASW03",
                "propertyPairs": [{ "name": "Pack", "value": "3 Bottles" }],
                "availableQuantity": 247869,
                "isPreOrder": false
            }
        ],
        "shop": {
            "sellerId": "7495794203056835079",
            "shopName": "Goli Nutrition",
            "shopLink": "https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079",
            "shopRating": 4.6,
            "soldCount": 5310325,
            "onSellProductCount": 57,
            "reviewCount": 382362,
            "followersCount": 541437,
            "videoCount": 2479,
            "region": "US"
        },
        "source": "input",
        "scrapedAt": "2026-05-16T09:34:00.000Z"
    }
]
```

### 💡 Tips

- **Discovery is storefront-driven**: TikTok does not expose keyword search or category browse to scrapers. Seed the actor with product URLs/IDs you already know, or with seller IDs to enumerate full storefronts.
- **Enable `expandRelated`** to grow a small seed list into a much larger dataset — each PDP exposes alternative-product and top-reviewed-product links that the actor will follow. Each related product is scraped and saved (and billed) just like a seed.
- **Use `maxProducts`** as a hard ceiling when fan-out is enabled, so you never overshoot your budget.
- **Multi-country runs** fetch the same product once per country code in `countries[]` — useful for cross-region price monitoring.

Optimise your TikTok Shop research with the **TikTok Shop Product Scraper** today! 🚀

# Actor input Schema

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

TikTok Shop URLs to scrape. Accepted patterns:
• Product page: `https://www.tiktok.com/shop/pdp/<slug>/<productId>`
• Alt product: `https://www.tiktok.com/view/product/<productId>`
• Storefront: `https://www.tiktok.com/shop/store/<slug>/<sellerId>`

## `productIds` (type: `array`):

Bulk list of numeric TikTok Shop product IDs. The actor will resolve each to its product detail page.

## `sellerIds` (type: `array`):

Seller storefronts to enumerate. Each entry needs at least `sellerId`; `slug` is optional (passing it produces a prettier canonical URL).

## `countries` (type: `array`):

Country codes for the TikTok Shop region. Each product/storefront is fetched once per country.

## `expandRelated` (type: `boolean`):

After scraping each product, enqueue its alternative-product and top-reviewed-product entries. Each related product is scraped and saved to the dataset (billed accordingly).

## `maxProducts` (type: `integer`):

Stop after this many products have been saved (0 = no cap).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/shop/pdp/x/1729587769570529799"
    }
  ],
  "sellerIds": [],
  "countries": [
    "us"
  ],
  "expandRelated": false,
  "maxProducts": 0
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://www.tiktok.com/shop/pdp/x/1729587769570529799"
        }
    ],
    "sellerIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/tiktok-shop-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 = {
    "startUrls": [{ "url": "https://www.tiktok.com/shop/pdp/x/1729587769570529799" }],
    "sellerIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/tiktok-shop-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 '{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/shop/pdp/x/1729587769570529799"
    }
  ],
  "sellerIds": []
}' |
apify call piotrv1001/tiktok-shop-product-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Shop Product Scraper",
        "description": "The TikTok Shop Product Scraper extracts product pages and seller storefronts across 8 country markets, capturing titles, live prices, discounts, variants, stock, sold counts, ratings, images, and full shop metadata — ideal for resellers, market research, and competitive price tracking.",
        "version": "0.0",
        "x-build-id": "rFCPs0UA102BWlwV1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/piotrv1001~tiktok-shop-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-piotrv1001-tiktok-shop-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/piotrv1001~tiktok-shop-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-piotrv1001-tiktok-shop-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/piotrv1001~tiktok-shop-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-piotrv1001-tiktok-shop-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",
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "TikTok Shop URLs to scrape. Accepted patterns:\n• Product page: `https://www.tiktok.com/shop/pdp/<slug>/<productId>`\n• Alt product: `https://www.tiktok.com/view/product/<productId>`\n• Storefront: `https://www.tiktok.com/shop/store/<slug>/<sellerId>`",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "productIds": {
                        "title": "Product IDs",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Bulk list of numeric TikTok Shop product IDs. The actor will resolve each to its product detail page.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sellerIds": {
                        "title": "Seller IDs (storefronts)",
                        "type": "array",
                        "description": "Seller storefronts to enumerate. Each entry needs at least `sellerId`; `slug` is optional (passing it produces a prettier canonical URL)."
                    },
                    "countries": {
                        "title": "Countries",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Country codes for the TikTok Shop region. Each product/storefront is fetched once per country.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "us",
                                "gb",
                                "id",
                                "my",
                                "th",
                                "sg",
                                "vn",
                                "ph"
                            ],
                            "enumTitles": [
                                "United States (USD)",
                                "United Kingdom (GBP)",
                                "Indonesia (IDR)",
                                "Malaysia (MYR)",
                                "Thailand (THB)",
                                "Singapore (SGD)",
                                "Vietnam (VND)",
                                "Philippines (PHP)"
                            ]
                        },
                        "default": [
                            "us"
                        ]
                    },
                    "expandRelated": {
                        "title": "Expand related products",
                        "type": "boolean",
                        "description": "After scraping each product, enqueue its alternative-product and top-reviewed-product entries. Each related product is scraped and saved to the dataset (billed accordingly).",
                        "default": false
                    },
                    "maxProducts": {
                        "title": "Max products",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Stop after this many products have been saved (0 = no cap).",
                        "default": 0
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
