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

Get price, sales, rating, reviews, stock, variants, seller and category for TikTok Shop products. Pay only for products delivered.

- **URL**: https://apify.com/lakex/tiktok-shop-scraper.md
- **Developed by:** [Seth Lake](https://apify.com/lakex) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## TikTok Shop Product Scraper

Search TikTok Shop by keyword, or paste product, category or store links, and get each product's price, units sold, rating, reviews, stock, variants, seller and category as one clean row. **You pay only for products delivered**: never for captchas, search and listing pages, delisted products, retries or failed runs.

### Who it's for

- **Sellers** tracking competitors' prices, discounts and stock.
- **Affiliates and creators** picking products that actually sell (units sold, rating, reviews).
- **Dropshippers and researchers** building product lists by category, with variant-level prices and stock.

### What you get

One row per product:

| Field                                                               | Example                                          |
| ------------------------------------------------------------------- | ------------------------------------------------ |
| `title`                                                             | Potaroma Universal Cat Paw Trimmer…              |
| `price` / `priceMax`                                                | 13.96 / 13.96 (lowest and highest variant price) |
| `originalPrice`, `discountPercent`                                  | 20, 30                                           |
| `soldCount`                                                         | 15652                                            |
| `rating`, `reviewCount`                                             | 4.4, 1281                                        |
| `inStock`, `totalStock`                                             | true, 68                                         |
| `categories`                                                        | Pet Supplies › Dog & Cat Grooming › Claw Care    |
| `shopName`, `sellerRating`, `sellerFollowerCount`                   | Potaroma LLC, 4.4, 13274                         |
| `variants`                                                          | each SKU's name, price, list price and stock     |
| `images`, `description`, `specifications`                           |                                                  |
| `freeShipping`, `shippingFee`, `deliveryMinDays`, `deliveryMaxDays` | true, 0, 5, 8                                    |

Numbers are numbers (not "$13.96" or "15.6K"), so you can sort and filter straight away. Download as JSON, CSV or Excel, or use the API.

### How to use it

1. Add what you want, in either or both fields:
   - **Search terms**: keywords like `cat toys` or `stanley cup`, one per line. Each returns the products TikTok Shop lists for that keyword, in TikTok's order, up to your per-term cap.
   - **Product, category or store URLs**: product links (`www.tiktok.com/shop/pdp/…`, `shop.tiktok.com/…`, or the numeric ID), categories (`shop.tiktok.com/us/c/<name>/<id>`), stores (`shop.tiktok.com/us/store/<name>/<id>`) or keyword pages (`shop.tiktok.com/us/k/<keyword>`).
2. Set **Max products** to cap the cost of the whole run, and **Max products per search term, category or store** (default 50).
3. Click **Start**.

A product that shows up twice (say, under two search terms) is scraped and charged once. Every row has the full product data, whether it came from a search, a category, a store or a direct link.

#### Input example

```json
{
    "searchTerms": ["cat toys", "water bottle"],
    "productUrls": [
        "https://www.tiktok.com/shop/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516",
        "https://shop.tiktok.com/us/c/pet-supplies/602118",
        "https://shop.tiktok.com/us/store/potaroma-llc/7495813075786500260"
    ],
    "maxItems": 100,
    "maxProductsPerSource": 30
}
```

#### Output example

```json
{
    "productId": "1731578642912612516",
    "url": "https://shop.tiktok.com/us/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516",
    "title": "Potaroma Universal Cat Paw Trimmer - 4-Size Adjustable Holes (Incl. 3.5mm), Hidden Nail File…",
    "price": 13.96,
    "priceMax": 13.96,
    "originalPrice": 20,
    "discountPercent": 30,
    "currency": "USD",
    "soldCount": 15652,
    "rating": 4.4,
    "reviewCount": 1281,
    "inStock": true,
    "totalStock": 68,
    "categories": ["Pet Supplies", "Dog & Cat Grooming", "Claw Care"],
    "shopName": "Potaroma LLC",
    "sellerId": "7495813075786500260",
    "sellerRating": 4.4,
    "sellerFollowerCount": 13274,
    "sellerProductCount": 63,
    "description": "Adjustable Trimmer for All Cat Sizes: This cat nail clipper features a single ro…",
    "images": [
        "https://p16-oec-general-useast5.ttcdn-us.com/…/f8b4429c891246468abacbfb08a610fc~tplv-fhlh96nyum-crop-webp:800:800.webp",
        "…"
    ],
    "variants": [
        { "skuId": "1731578664610402468", "name": "Default", "price": 13.96, "originalPrice": 20, "stock": 68 }
    ],
    "specifications": [
        { "name": "Benefit", "value": "Clean" },
        { "name": "Pet type", "value": "Cats" }
    ],
    "freeShipping": true,
    "shippingFee": 0,
    "deliveryMinDays": 5,
    "deliveryMaxDays": 8,
    "inputUrl": "https://www.tiktok.com/shop/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516",
    "scrapedAt": "2026-09-30T10:51:12.000Z"
}
```

Missing values are `null`, never left out, so every row has the same columns.

### Pricing

**$10 per 1,000 products delivered** ($0.01 per product), less on higher Apify plans: $9 on Silver, $8 on Gold and above. Proxies and compute are included.

- You're charged only when a product row lands in your dataset.
- Captchas, retries, delisted products and blocked requests are free.
- A run that delivers nothing costs nothing.
- **Max products** and Apify's **Maximum cost per run** both cap your spend. If a run reaches your spending limit, it stops cleanly, keeps every product delivered so far, and tells you how many were left.

### What's not charged, and where it's listed

Every input that didn't produce a row is listed in the run's **RUN\_SUMMARY** record (Storage → Key-value store), with the reason. RUN\_SUMMARY also lists each search term, category and store with its title, pages read and products found. `inputUrl` in each row tells you which search term or link the product came from.

| Reason          | Meaning                                                                                                                                           |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `unavailable`   | TikTok says the product doesn't exist anymore (delisted, checked twice), or a search term, category or store page doesn't exist or lists nothing. |
| `blocked`       | TikTok kept showing a captcha after every retry. Try again later.                                                                                 |
| `failed`        | Network or page error after every retry.                                                                                                          |
| `invalid_input` | Not a TikTok Shop product, category, store or keyword link, or a product ID.                                                                      |
| `not_attempted` | The run stopped first (Max products or your spending limit).                                                                                      |

### Known limits

- **US store only** for now.
- **Search terms and stores page through TikTok's own "View more" list** (30 products per keyword page, 20 per store page) up to **Max products per search term, category or store**, in TikTok's order. Categories give 10–15 products per page and stop when pages stop bringing new products (TikTok's category list tops out at roughly 85 products).
- Search terms become TikTok's keyword pages (`cat toys` → `/us/k/cat-toys`). A term TikTok has no page for is reported as `unavailable` and costs nothing.
- **No creator/affiliate data.** Which creators promote a product isn't on the product page.
- **`soldCount` is TikTok's own number**: global units sold since listing, as TikTok shows it.
- TikTok changes its site often. If something looks wrong, open an issue and we'll fix it fast.

### Advanced settings

- **Proxy**: Apify US residential by default, included in the price. TikTok blocks datacenter IPs, so leave this unless you know you need something else.
- **Max parallel requests** (default 5) and **Retries per product** (default 5).

### Is it legal?

This Actor collects only public product information that anyone can see without logging in: no personal data, no accounts. TikTok's terms restrict automated access, so check that your use case is allowed where you are, and consult a lawyer if unsure.

### Changelog

- **0.3** (2026-09-30): Search terms and stores go past the first page (TikTok's "View more"), up to the per-source cap.
- **0.2** (2026-09-30): Search terms, and category, store and keyword page links, with **Max products per search term, category or store**. Listing pages are free; you still pay only for products delivered.
- **0.1** (2026-09-30): First version. Product URLs and IDs, full product fields with variants, pay only for delivered products.

### Development

```bash
npm install
npm test            # parser tests on saved pages + crawl test against a local fake server
npx apify run       # local run; residential proxy only works on the platform, so locally set
                    # "proxyConfiguration": { "useApifyProxy": false } in the input
```

Code: `src/parse.ts` (page → product, pure), `src/scraper.ts` (crawl, retries, charging), `src/main.ts` (input, summary, status message). Tests and saved pages are in `test/`.

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords like "cat toys" or "stanley cup", one per line. Each returns the products TikTok Shop lists for that keyword, in TikTok's order, up to Max products per search term, category or store.

## `productUrls` (type: `array`):

TikTok Shop links, one per line. Products: any US link form (www.tiktok.com/shop/pdp/…, shop.tiktok.com/…) or the numeric product ID. Categories: shop.tiktok.com/us/c/<name>/<id>. Stores: shop.tiktok.com/us/store/<name>/<id>. Keyword pages: shop.tiktok.com/us/k/<keyword>.

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

Stop after this many products are delivered, across all search terms and links. You're charged per delivered product, so this caps the cost of a run.

## `maxProductsPerSource` (type: `integer`):

For each search term, category or store, take at most this many products. Listing pages are free; you pay only for products delivered.

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

TikTok blocks datacenter IPs. The default (Apify US residential proxy) is included in the price, so most users should leave it as is.

## `maxConcurrency` (type: `integer`):

How many pages to fetch at once. Higher is faster but gets more captchas.

## `maxRequestRetries` (type: `integer`):

How many times to retry a product on a new IP when TikTok shows a captcha. Retries are free for you.

## Actor input object example

```json
{
  "searchTerms": [
    "cat toys"
  ],
  "productUrls": [
    "https://www.tiktok.com/shop/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516",
    "https://www.tiktok.com/shop/pdp/honlink-5x-vitamin-c-skincare-set-with-hyaluronic-acid-niacinamide/1731753318135730868"
  ],
  "maxItems": 20,
  "maxProductsPerSource": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "maxConcurrency": 5,
  "maxRequestRetries": 5
}
```

# Actor output Schema

## `products` (type: `string`):

No description

## `runSummary` (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 = {
    "searchTerms": [
        "cat toys"
    ],
    "productUrls": [
        "https://www.tiktok.com/shop/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516",
        "https://www.tiktok.com/shop/pdp/honlink-5x-vitamin-c-skincare-set-with-hyaluronic-acid-niacinamide/1731753318135730868"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lakex/tiktok-shop-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 = {
    "searchTerms": ["cat toys"],
    "productUrls": [
        "https://www.tiktok.com/shop/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516",
        "https://www.tiktok.com/shop/pdp/honlink-5x-vitamin-c-skincare-set-with-hyaluronic-acid-niacinamide/1731753318135730868",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("lakex/tiktok-shop-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 '{
  "searchTerms": [
    "cat toys"
  ],
  "productUrls": [
    "https://www.tiktok.com/shop/pdp/cat-nail-clipper-by-potaroma-adjustable-sizes-built-in-file-safe-for-kittens-cats/1731578642912612516",
    "https://www.tiktok.com/shop/pdp/honlink-5x-vitamin-c-skincare-set-with-hyaluronic-acid-niacinamide/1731753318135730868"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call lakex/tiktok-shop-scraper --silent --output-dataset

```

## MCP server setup

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