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

Extract public US TikTok Shop products by keyword, product URL or store: prices, sellers, ratings, sales counts, images and detail-mode SKU stock.

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

## Pricing

from $8.00 / 1,000 tiktok shop products

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

Extract public **US TikTok Shop products** through ScrapeCreators for product research, competitor catalogs, and price monitoring. No TikTok login or cookies required. The operator configures the provider key privately.

### Modes

- **search**: keyword search with numbered pages. Returns product titles, displayed prices, currency, sellers, images, ratings, review and sold counts when available.
- **products**: full product URLs. Also returns SKU variants, reported stock, and category when available.
- **shop**: store catalogs with cursor pagination, best-selling or newest order.

```json
{"mode":"search","query":"shoes","maxResults":20,"maxPages":3}
```

```json
{"mode":"products","productUrls":["https://www.tiktok.com/shop/pdp/1729587769570529799"],"maxResults":1}
```

```json
{"mode":"shop","shopUrl":"https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079","sortBy":"new_releases","maxResults":20,"maxPages":3}
```

The default input is a shoes search. Use `startPage` (1–50) for later search pages. `maxResults` is 1–200, `maxPages` is 1–20, and product detail batches accept 1–100 URLs. Free-plan runs deliver at most **five products**, enforced before expensive work and each write. Missing plan information locally does not mean a free plan.

### Output

One deduplicated product per dataset record. `productId`, `title`, `url`, `region`, `price`, `originalPrice`, `currency`, `priceText`, `soldCount`, `rating`, `reviewCount`, `sellerId`, `sellerName`, `images`, `category`, `variants`, `stock`, `source`, `mode`, `query`, and `scrapedAt` are exported. IDs remain strings. Optional unavailable values are null. Catalog/search records have empty variants and null stock. Prices are source displays, not guaranteed checkout offers; sold counts are not revenue estimates.

`OUTPUT` contains status, delivered count, provider requests/credits, warnings, effective limit, and stop reason. `STATE` retains compact resume state. Results export as JSON, CSV, Excel or via the Apify dataset API. Agents can call the Actor with the same JSON and retrieve the default dataset and OUTPUT links.

### Pay per event

All-in pay-per-event prices:

| Event | FREE | BRONZE (2.5% off) | SILVER (5% off) | GOLD (20% off) |
|---|---:|---:|---:|---:|
| Run start | $0.01 | $0.00975 | $0.0095 | $0.008 |
| Product | $0.01 | $0.00975 | $0.0095 | $0.008 |

FREE-tier examples: one product $0.02; five products $0.06; twenty products $0.21. Only saved unique products trigger the synthetic dataset-item event. Start is charged automatically, including empty/rejected runs when the platform starts a container. No manual synthetic event charges or platform-usage pass-through. Charge caps stop product delivery; page, request and time limits separately bound operational cost. Owner runs and local runs may not incur PPE event charges.

### Reliability and limits

ScrapeCreators is the selected source. Product, search and catalog responses were probed independently before implementation. The provider currently documents US as the reliable region; other countries are outside this Actor's contract. No private seller data, orders, buyers, authenticated content, revenue estimates, historical prices, or complete review collection is promised.

Requests time out at 30 seconds and transient failures get at most one retry with jitter. The run stops after 180 seconds, preserves valid partial results, and stops on systemic provider failures. Provider credential/quota failures are configuration errors, not empty products. Empty searches and missing products produce diagnostics and no product charges. Pagination ends on an empty/repeated page, exhausted cursor, configured limit, or deadline. Live availability and fields may change.

Use public data only and respect TikTok and provider terms and applicable law. This Actor does not defeat CAPTCHAs or access controls. Report issues with the run ID, mode and redacted input; never submit keys or cookies.

### Development

`npm ci`, `npm test`, `apify run`, then private `apify push`. Set the owner-managed `SCRAPECREATORS_API_KEY` environment variable or the configured CLI secret reference. Schemas reside in `.actor/`.

# Actor input Schema

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

Use search for keywords, products for full product URLs, or shop for a store catalog. US only.

## `query` (type: `string`):

Use in search mode. Example: shoes. 1–200 characters; ignored in other modes.

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

Use in products mode. Supply 1–100 HTTPS TikTok Shop /shop/pdp/ or /view/product/ URLs ending in a product ID. US products only.

## `shopUrl` (type: `string`):

Use in shop mode. Example: https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079. US catalogs only.

## `maxResults` (type: `integer`):

Limit unique products to 1–200. Verified free-plan runs are capped at five before provider calls and writes.

## `maxPages` (type: `integer`):

Use for search or shop pagination. 1–20 pages; each page can require up to two provider attempts.

## `startPage` (type: `integer`):

Use in search mode to start at a specific numbered page. Default 1; maximum 50.

## `sortBy` (type: `string`):

Use in shop mode. top returns best selling; new\_releases returns newest products.

## Actor input object example

```json
{
  "mode": "search",
  "query": "shoes",
  "productUrls": [
    "https://www.tiktok.com/shop/pdp/1729587769570529799"
  ],
  "shopUrl": "https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079",
  "maxResults": 20,
  "maxPages": 3,
  "startPage": 1,
  "sortBy": "top"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "query": "shoes",
    "productUrls": [
        "https://www.tiktok.com/shop/pdp/1729587769570529799"
    ],
    "shopUrl": "https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079"
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/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 = {
    "query": "shoes",
    "productUrls": ["https://www.tiktok.com/shop/pdp/1729587769570529799"],
    "shopUrl": "https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079",
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/tiktok-shop-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 '{
  "query": "shoes",
  "productUrls": [
    "https://www.tiktok.com/shop/pdp/1729587769570529799"
  ],
  "shopUrl": "https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079"
}' |
apify call muhammadafzal/tiktok-shop-product-scraper --silent --output-dataset

```

## MCP server setup

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