# TikTok Shop Product Scraper (`receptional_blender/tiktok-shop-products`) Actor

Pull TikTok Shop products from keyword searches or shop/product URLs. Get title, price, discounts, units sold, ratings, reviews, seller and images for product research, sourcing and competitor tracking.

- **URL**: https://apify.com/receptional\_blender/tiktok-shop-products.md
- **Developed by:** [Assia Fadli](https://apify.com/receptional_blender) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

Turn TikTok Shop into a structured product feed. Give the actor a few **keywords**
or paste **shop / product URLs**, and it returns one clean JSON record per product
— price, discount, units sold, rating, review count, seller, images, category and
(optionally) recent reviews. Built for sourcing, price tracking, catalog research
and competitor monitoring.

> **Heads-up — read [Limitations](#limitations) first.** TikTok Shop is a
> JavaScript-heavy storefront with strong bot protection. Extraction is fully
> defensive, but the CSS selectors are best-effort and may need re-tuning against
> the live site. Use residential proxies.

***

### What you get

- **Keyword search** — one search per keyword, across the region you choose.
- **Direct URLs** — drop in shop pages, category/listing pages, or single product
  links. Product links are scraped immediately; listing links are crawled for the
  product cards they contain.
- **Infinite scroll** handling on listing grids.
- **Optional reviews** — up to ~10 recent reviews per product.
- **Region targeting** (US, GB, ID, MY, TH, VN, …) for the right storefront and
  currency.
- **Human-like browsing** — rotating user-agents, randomized viewport and delays,
  overlay/consent dismissal.

***

### Input

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `searchKeywords` | string\[] | `[]` | Keywords to search on TikTok Shop; each becomes its own search. |
| `shopUrls` | string\[] | `[]` | Shop / listing / product URLs to scrape directly. |
| `region` | string | `"US"` | Marketplace to target. Affects storefront and currency. |
| `includeReviews` | boolean | `false` | Open each product page and capture up to ~10 recent reviews. Slower. |
| `maxItems` | integer | `100` | Hard cap on products collected per run. |
| `proxyConfiguration` | object | Apify residential | Proxy applied to every request. Residential strongly recommended. |

Provide at least one of `searchKeywords` or `shopUrls`. Common alternative field
names (`keywords`, `productUrls`, `urls`, `startUrls`, `maxProducts`, `country`,
`withReviews`, `proxyConfig`) are also accepted.

#### Example input

```json
{
    "searchKeywords": ["wireless earbuds", "phone case"],
    "shopUrls": [],
    "region": "US",
    "includeReviews": true,
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

***

### Output

Each dataset item is one product:

```json
{
    "title": "Wireless Bluetooth Earbuds Noise Cancelling",
    "price": 19.99,
    "currency": "$",
    "originalPrice": 39.99,
    "soldCount": 12000,
    "rating": 4.8,
    "reviewCount": 3405,
    "sellerName": "SoundGear Official",
    "sellerUrl": "https://www.tiktok.com/shop/...",
    "productUrl": "https://www.tiktok.com/view/product/...",
    "images": [
        "https://p16-.../image1.jpeg",
        "https://p16-.../image2.jpeg"
    ],
    "category": "Electronics",
    "description": "Long battery life, IPX5 waterproof ...",
    "region": "US",
    "reviews": [
        { "author": "j***n", "rating": 5, "text": "Great sound for the price!", "date": "2026-06-30" }
    ],
    "source": "search:wireless earbuds",
    "scrapedAt": "2026-07-21T10:12:00.000Z"
}
```

Fields that can't be located come back as `null` (or `[]` for arrays) rather than
being dropped, so every record shares the same shape.

***

### How it works

1. Builds a search URL per keyword and/or uses your `shopUrls`.
2. Drives a real Chromium browser via Crawlee's `PlaywrightCrawler`.
3. On **listing** pages it auto-scrolls, reads each product card, and enqueues the
   product's **detail** page.
4. On **detail** pages it extracts the full record, merges in the card-level data,
   and (optionally) captures reviews.
5. Delivers each product to the dataset and charges for it (see Pricing).

All selectors live in one place — [`src/selectors.ts`](src/selectors.ts). Each
field lists several candidate selectors tried in order (first match wins), so when
TikTok changes its markup you only edit that one file.

***

### Pricing — pay per event

This actor uses Apify's **pay-per-event** model. You are charged once per product
delivered to the dataset, under the **`product-scraped`** event. When your event
budget (or the `maxItems` cap) is reached, the crawler stops so nothing further is
fetched or billed.

***

### Limitations

- **Anti-bot protection.** TikTok Shop uses device fingerprinting, challenges and
  rate limiting. Some requests may be blocked or served CAPTCHAs. **Residential
  proxies are essentially required**, and even then a share of requests can fail.
  The actor retries and logs blocks.
- **Selectors are best-effort.** The live DOM and endpoints change often and vary
  by region / A-B bucket. Watch the log for `No product cards found` /
  `No reviews matched` warnings — those flag a selector that needs updating in
  `src/selectors.ts`.
- **URL formats** (`/shop/s/<query>`, product paths) are best guesses and may need
  adjusting per region.
- **Reviews** render lazily; the actor captures the first ~10 that appear.

If extraction returns mostly `null`, open a live product/listing page, inspect the
real elements, and update the matching entries in `src/selectors.ts`.

***

### Disclaimer

Scrape responsibly and in line with TikTok's Terms of Service and applicable law.
Collect only publicly available data and respect rate limits. Intended for
legitimate product research and competitor monitoring.

***

Made by **Assia Fadli**. Licensed under the **MIT License**.

# Actor input Schema

## `searchKeywords` (type: `array`):

Keywords to look up on TikTok Shop. Every keyword runs its own product search. Leave empty if you only want to scrape specific shop or product URLs.

## `shopUrls` (type: `array`):

TikTok Shop URLs to open directly — shop pages, category/listing pages, or individual product detail pages. Product links are scraped straight away; listing links are crawled for their product cards.

## `region` (type: `string`):

TikTok Shop marketplace to target (for example US, GB, ID, MY, TH, VN). Controls the storefront and currency that keyword searches resolve to.

## `includeReviews` (type: `boolean`):

When on, the scraper opens each product page and captures up to ~10 recent reviews (author, rating, text, date). This is slower and uses more resources.

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

Hard cap on the number of product records collected across all searches and URLs in a single run. Useful to bound run time and cost.

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

Proxy applied to every request. Residential proxies are strongly recommended — TikTok Shop uses aggressive anti-bot protection and blocks datacenter IPs quickly.

## Actor input object example

```json
{
  "searchKeywords": [
    "wireless earbuds",
    "phone case"
  ],
  "shopUrls": [
    "https://www.tiktok.com/shop"
  ],
  "region": "US",
  "includeReviews": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "searchKeywords": [
        "wireless earbuds",
        "phone case"
    ],
    "shopUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("receptional_blender/tiktok-shop-products").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 = {
    "searchKeywords": [
        "wireless earbuds",
        "phone case",
    ],
    "shopUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("receptional_blender/tiktok-shop-products").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 '{
  "searchKeywords": [
    "wireless earbuds",
    "phone case"
  ],
  "shopUrls": []
}' |
apify call receptional_blender/tiktok-shop-products --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/u1EKW5hBiHgzFzdAv/builds/RPa4aPkw9srU9w9Ee/openapi.json
