# Tiktok Shop Scraper (`pratikdani/tiktok-shop-scraper`) Actor

This actor automates TikTok Shop data extraction, gathering product details, pricing, sales, and competitor insights. Scrape crucial e-commerce data directly from TikTok to analyze trends, track performance, and optimize your shop strategy.

- **URL**: https://apify.com/pratikdani/tiktok-shop-scraper.md
- **Developed by:** [Pratik Dani](https://apify.com/pratikdani) (community)
- **Categories:** Automation, E-commerce, Social media
- **Stats:** 2,965 total users, 532 monthly users, 100.0% runs succeeded, 64 bookmarks
- **User rating**: 4.58 out of 5 stars

## Pricing

from $15.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 Data Extractor

This TikTok Shop Scraper actor comprehensively extracts publicly available data from TikTok Shop, providing valuable insights into product listings, seller information, and pricing trends. Specifically, it collects data such as product names, descriptions, prices (current and original), discount percentages, sales volumes, ratings, number of reviews, product URLs, seller names, seller location, shop URL, and related metadata. This data is invaluable for market research, competitive analysis, identifying trending products, monitoring pricing strategies, tracking seller performance, and understanding consumer sentiment within the TikTok e-commerce ecosystem, enabling informed business decisions and strategic advantages.

### Features

- **Product Details Extraction:** Retrieves comprehensive product information (name, price, descriptions, images, videos, variations, sales data) for market analysis and competitor monitoring.
- **Seller Data Collection:** Gathers information about TikTok Shop sellers (shop name, follower count, product range, ratings) to identify potential partners or assess market saturation.
- **Review and Rating Aggregation:** Extracts product reviews and ratings to understand customer sentiment and identify product strengths/weaknesses.
- **Trending Product Identification:** Identifies top-selling and rapidly trending products to inform product development and marketing strategies.
- **Category and Niche Specific Scraping:** Allows targeted data extraction based on specific product categories or niches to focus research and analysis.
- **Price Monitoring and Comparison:** Tracks product price changes over time and compares prices across different sellers to optimize pricing strategies.

### Output Fields

| Field Name             | Type      | Description                                                                                                                                                 |
| ---------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `shop_name`           | `String`  | The name of the TikTok Shop.                                                                                                                                |
| `shop_url`            | `String`  | The URL of the TikTok Shop.                                                                                                                                  |
| `shop_id`             | `String`  | The unique ID of the TikTok Shop.                                                                                                                            |
| `total_products`      | `Number`  | The total number of products listed in the shop.                                                                                                               |
| `follower_count`      | `Number`  | The number of followers the shop has.                                                                                                                       |
| `average_rating`      | `Number`  | The average rating of the shop's products (if available).                                                                                                       |
| `rating_count`        | `Number`  | The total number of ratings for the shop's products (if available).                                                                                             |
| `product_list`         | `Array`   | An array of objects, each representing a product in the shop. See Product Details below.                                                                  |
| `timestamp`          | `String`  | The timestamp when the data was extracted (ISO 8601 format).                                                                                                |

**Product Details (within `product_list` array):**

| Field Name             | Type      | Description                                                                                                                                                 |
| ---------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `product_name`        | `String`  | The name of the product.                                                                                                                                    |
| `product_url`         | `String`  | The URL of the product page.                                                                                                                                 |
| `product_id`          | `String`  | The unique ID of the product.                                                                                                                                 |
| `price`               | `Number`  | The price of the product.                                                                                                                                  |
| `discounted_price`   | `Number`  | The discounted price of the product, if applicable.                                                                                                            |
| `currency`            | `String`  | The currency of the product price (e.g., USD, EUR).                                                                                                           |
| `image_url`           | `String`  | The URL of the product's main image.                                                                                                                         |
| `rating`              | `Number`  | The rating of the product (if available).                                                                                                                      |
| `rating_count`        | `Number`  | The number of ratings for the product (if available).                                                                                                            |
| `sales_count`         | `Number`  | The number of sales for the product (if available).                                                                                                           |
| `description`          | `String`  | A short description of the product.                                                                                                                          |

### Possible Usage of the Actor

- **Trend Identification & Product Development:** Identify trending product categories and specific product attributes (e.g., colors, features) popular on TikTok Shop to inform product development and sourcing decisions.
- **Competitor Analysis & Benchmarking:** Analyze competitors' best-selling products, pricing strategies, and marketing campaigns on TikTok Shop to benchmark performance and identify competitive advantages.
- **Influencer Marketing Optimization:** Track the performance of influencer collaborations (e.g., sales attributed, reach, engagement) to optimize influencer selection and campaign strategies.
- **Sales Forecasting & Inventory Management:** Predict future sales based on historical TikTok Shop data (e.g., seasonality, trending products) to optimize inventory levels and minimize stockouts or overstocking.
- **Customer Segmentation & Targeted Advertising:** Analyze customer demographics, purchasing behavior, and engagement patterns on TikTok Shop to segment customers and create highly targeted advertising campaigns within TikTok.
- **Performance Monitoring & Optimization of TikTok Ads:** Analyzing the sales conversion funnel and marketing spend to improve the ROI of future Tiktok marketing campaigns

### Example Output

```json
{
  "url": "https://www.tiktok.com/view/product/1729721254514234223",
  "title": "Women's Colorblock Ribbed Knit Bucket Hat, 2024 New Style Casual Street Warm Fisherman Hat for Fall & Winter, Fashion Accessories for Women & Girls",
  "available": true,
  "description": "\u3010Unique Colorblock\u3011: The eye-catching colorblock pattern gives this bucket hat a distinct look, setting it apart from traditional solid-colored options. \u3010Warmth for Seasons\u3011: Made from medium-stretch textile, this hat effectively provides warmth, making it an ideal accessory for fall and winter wear. \u3010Fitted Comfort\u3011: Designed to fit snugly on the head, this bucket hat ensures a secure and comfortable fit during all your outdoor activities. \u3010Trendy Fisherman Style\u3011: With its modern fisherman silhouette, this hat combines practicality with a trendy touch, perfect for street fashion enthusiasts. \u3010Versatile Accessory\u3011: This bucket hat can easily complete various outfits, providing an effortless solution to elevate your wardrobe during colder months.",
  "currency": "USD",
  "initial_price": 16.19,
  "final_price": 8.09,
  "discount_percent": 50,
  "initial_price_low": 16.19,
  "initial_price_high": null,
  "final_price_low": 8.09,
  "final_price_high": null,
  "sold": 294,
  "colors": [
    "Multicolor",
    "multicolor2",
    "multicolor3",
    "multicolor4",
    "multicolor5"
  ],
  "sizes": [
    "one-size"
  ],
  "shipping_fee": 7.99,
  "specifications": [
    {
      "title": "Gender",
      "value": "Female"
    },
    {
      "title": "Style",
      "value": "Casual"
    },
    {
      "title": "Hat Type",
      "value": "Bucket Hat"
    },
    {
      "title": "Material",
      "value": "Textile"
    },
    {
      "title": "Pattern",
      "value": "Colorblock"
    }
  ],
  "reviews_count": 31,
  "reviews": [
    {
      "item": "Item: multicolor2, one-size",
      "name": "k**5",
      "rating": "5",
      "review": "These hat fits good, the color nice \nThe quality of the material feels  thick and nice\nGood buy I would purchase again."
    },
    {
      "item": "Item: multicolor2, one-size",
      "name": "S**h G**y",
      "rating": "5",
      "review": "I really like this item. The colors are great and the hat fits perfectly. I love it"
    }
  ],
  "store_details": {
    "name": "DIDA Fashion Accessories",
    "num_of_items": 49,
    "url": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/dfa0912ba4b84335bc3cf556c32258c6~tplv-aphluv4xwc-resize-png:300:300.png?from=2422056039"
  },
  "images": [
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/527d6b5eef1c4b0daae5c46e98b4b29c~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=49549&refresh_token=5cd1f859528a080b50d8192826212aea&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/65febb97d4334ea29cbf97d0f398e80b~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=56216&refresh_token=4a626c3a241ff57f3a778512cff7a2f9&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/106afd3390c3433abdd6d9828c4a473e~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=1646&refresh_token=4f44b8b3d5991bb43e50825a7cff195d&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/b3eef2191f164f5fa4ada5bc0765a366~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=14023&refresh_token=7e978e0d90a4c043654f5fef439d7147&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/8ca0677f2c44448f9fe9fe5cd56cdcc4~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=13615&refresh_token=c0fcc41ddd5c049831e8af9f15f622c5&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/0a540903b10346049f2b5f4fc983a455~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=68539&refresh_token=9245035a55528b5da24ec0ff6116bc81&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/fc4989f8e27348e5bda44354eaad58a2~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=36007&refresh_token=15eff7e642673f14d44f9af09fd972e3&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/f43b65bae0684232a1d302d08e54b038~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=95238&refresh_token=3b8971927281164fbd82d8817a69ae70&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d",
    "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/e4d4ee95447f4a79b3c169b19235360c~tplv-dx0w9n1ysr-resize-jpeg:800:800.jpeg?dr=10509&nonce=81660&refresh_token=1ee96b1c331548b1f83e4183ce520526&from=1826719393&idc=useast5&ps=933b5bde&shcp=0c9a6a4b&shp=6ce186a1&t=555f072d"
  ],
  "domain": "www.tiktok.com",
  "videos": null,
  "category": null,
  "category_url": "https://www.tiktok.com/shop/c/hats/906248",
  "id": "1729721254514234223"
}
```

# Actor input Schema

## `url` (type: `string`):

TikTok video URL containing the shop product.

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

Two-letter market code of the product, for example FR, HU or US. Leave empty to detect it automatically.

## Actor input object example

```json
{
  "url": "https://shop.tiktok.com/view/product/1732417183133045688"
}
```

# 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 = {
    "url": "https://shop.tiktok.com/view/product/1732417183133045688"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pratikdani/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 = { "url": "https://shop.tiktok.com/view/product/1732417183133045688" }

# Run the Actor and wait for it to finish
run = client.actor("pratikdani/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 '{
  "url": "https://shop.tiktok.com/view/product/1732417183133045688"
}' |
apify call pratikdani/tiktok-shop-scraper --silent --output-dataset

```

## MCP server setup

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