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

Search TikTok Shop for products and shops, and scrape full product and shop details.

- **URL**: https://apify.com/supreme\_coder/tiktok-shop-scraper.md
- **Developed by:** [Supreme Coder](https://apify.com/supreme_coder) (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 $0.10 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Scraper

Search **TikTok Shop** and export clean, structured data about products and shops — no login, no setup, no fiddling with cookies. Just enter a keyword, a product link, or a shop link and get results.

### What you can do

- 🔎 **Search products & shops** by keyword (e.g. `wireless earbuds`, `skincare`, `phone case`)
- 📦 **Get full product details** — title, price, images, ratings, sold count, variants/SKUs, stock, category, and seller
- 🏬 **Get full shop details** — shop name, rating, followers, total sold, number of products, and the products on the storefront

### How to use it

1. Fill in one or more of the inputs below.
2. Click **Start**.
3. Download your results as JSON, CSV, Excel, or via the API.

You can mix and match — search a few keywords, look up specific products, and pull shop details all in one run.

#### Input

| Field | Description |
|---|---|
| **Search keywords** | One or more keywords to search TikTok Shop. Returns matching products and shops. |
| **Product URLs or IDs** | TikTok Shop product links (e.g. `https://www.tiktok.com/view/product/1729417121457344642`) or product IDs. Returns full product details. |
| **Shop URLs or IDs** | TikTok Shop store links (e.g. `https://www.tiktok.com/shop/store/case-mate/7495222674546788482`) or seller IDs. Returns full shop details and its products. |
| **Mixed URLs** | Optional. Paste any mix of TikTok Shop product, shop, or search links — each is detected automatically. |
| **What to return from searches** | For keyword searches: products, shops, or both. |
| **Max products per keyword** | How many products to collect per search keyword. |
| **Include products on shop pages** | When scraping a shop, also collect the products on its storefront. |
| **Marketplace region** | Country code of the TikTok Shop marketplace (e.g. `us`). |

#### Example input

```json
{
  "searchQueries": ["wireless earbuds"],
  "productUrls": ["https://www.tiktok.com/view/product/1729417121457344642"],
  "shopUrls": ["https://www.tiktok.com/shop/store/case-mate/7495222674546788482"],
  "searchResultType": "both",
  "maxResultsPerSearch": 60,
  "includeShopProducts": true,
  "region": "us"
}
````

### Output

Every result is one row in the dataset, tagged with a `type` field so you can filter easily.

**Product (from a search or shop page)** — `type: "product"`

```json
{
  "type": "product",
  "productId": "1731665000546472026",
  "title": "MSHUKCOE Mini Bluetooth 5.4 Wireless Earbuds...",
  "image": "https://...webp",
  "price": "$33.80",
  "currency": "USD",
  "rating": 4.2,
  "reviewCount": "162",
  "soldCount": 1410,
  "seller": { "sellerId": "7495904598724610138", "shopName": "Listening Digital" },
  "productUrl": "https://www.tiktok.com/shop/pdp/.../1731665000546472026",
  "searchKeyword": "wireless earbuds"
}
```

**Product details** — `type: "productDetail"`

```json
{
  "type": "productDetail",
  "productId": "1729417121457344642",
  "title": "Waterproof Floating Pouch - Phone Pouch...",
  "price": "$20.00",
  "currency": "USD",
  "soldCount": 20912,
  "rating": 4.7,
  "reviewCount": 1779,
  "categories": ["Phones & Electronics", "Mobile Phone Accessories", "Phone Holders & Mounts"],
  "images": ["https://...webp"],
  "skus": [
    { "skuId": "1732406242679230594", "name": "CM060210", "price": "$25.00", "stock": 1856, "available": true,
      "properties": [{ "name": "Color", "value": "Wavy Ballet Pink Twinkle" }] }
  ],
  "variants": [{ "name": "Color", "values": ["Wavy Ballet Pink Twinkle", "..."] }],
  "seller": { "sellerId": "7495222674546788482", "shopName": "Case-Mate", "rating": "4.7" }
}
```

**Shop** — `type: "shop"`

```json
{
  "type": "shop",
  "sellerId": "7495222674546788482",
  "shopName": "Case-Mate",
  "rating": "4.7",
  "soldCount": 179260,
  "productCount": 318,
  "followersCount": 138802,
  "reviewCount": 13804,
  "region": "US",
  "shopUrl": "https://www.tiktok.com/shop/store/case-mate/7495222674546788482"
}
```

### Tips

- **Finding a product or shop link:** open the product or shop on TikTok and copy the URL from your browser. Both `tiktok.com` and `shop.tiktok.com` links work.
- **More results per keyword:** increase **Max products per keyword**.
- **Just want shops?** set **What to return from searches** to *Shops only*.

### FAQ

**Do I need a TikTok account or cookies?** No. Just provide keywords or links.

**Which marketplace does it use?** The US TikTok Shop by default. Set the region code to target another marketplace where TikTok Shop is available.

**Why did a product or shop return an error row?** It was likely removed, sold out, or isn't available in the selected region. The row includes an `error` message explaining why.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search TikTok Shop for. Each keyword returns matching products and shops.

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

TikTok Shop product URLs (e.g. https://www.tiktok.com/view/product/1730447887146387978) or bare product IDs. Each returns full product details.

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

TikTok Shop store URLs (e.g. https://www.tiktok.com/shop/store/case-mate/7495222674546788482) or bare seller IDs. Each returns full shop details and its products.

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

Any mix of TikTok Shop product, store, or search URLs. Each URL is detected and scraped automatically.

## `searchResultType` (type: `string`):

For keyword searches, choose whether to collect products, shops, or both.

## `maxResultsPerSearch` (type: `integer`):

Maximum number of products to collect for each search keyword.

## `includeShopProducts` (type: `boolean`):

When scraping a shop's details, also collect the products listed on its storefront.

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

TikTok Shop marketplace to use (two-letter country code, e.g. us, gb). Most coverage is available for us.

## Actor input object example

```json
{
  "searchQueries": [
    "wireless earbuds",
    "skincare"
  ],
  "searchResultType": "both",
  "maxResultsPerSearch": 60,
  "includeShopProducts": true,
  "region": "us"
}
```

# 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 = {
    "searchQueries": [
        "phone case"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("supreme_coder/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 = { "searchQueries": ["phone case"] }

# Run the Actor and wait for it to finish
run = client.actor("supreme_coder/tiktok-shop-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 '{
  "searchQueries": [
    "phone case"
  ]
}' |
apify call supreme_coder/tiktok-shop-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Shop Scraper",
        "description": "Search TikTok Shop for products and shops, and scrape full product and shop details.",
        "version": "0.1",
        "x-build-id": "NeWIcMXpx9lrgPvcc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/supreme_coder~tiktok-shop-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-supreme_coder-tiktok-shop-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/supreme_coder~tiktok-shop-scraper/runs": {
            "post": {
                "operationId": "runs-sync-supreme_coder-tiktok-shop-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/supreme_coder~tiktok-shop-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-supreme_coder-tiktok-shop-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": {
                    "searchQueries": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "Keywords to search TikTok Shop for. Each keyword returns matching products and shops.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "productUrls": {
                        "title": "Product URLs or IDs",
                        "type": "array",
                        "description": "TikTok Shop product URLs (e.g. https://www.tiktok.com/view/product/1730447887146387978) or bare product IDs. Each returns full product details.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "shopUrls": {
                        "title": "Shop URLs or IDs",
                        "type": "array",
                        "description": "TikTok Shop store URLs (e.g. https://www.tiktok.com/shop/store/case-mate/7495222674546788482) or bare seller IDs. Each returns full shop details and its products.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Mixed TikTok Shop URLs (optional)",
                        "type": "array",
                        "description": "Any mix of TikTok Shop product, store, or search URLs. Each URL is detected and scraped automatically.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "searchResultType": {
                        "title": "What to return from searches",
                        "enum": [
                            "both",
                            "products",
                            "shops"
                        ],
                        "type": "string",
                        "description": "For keyword searches, choose whether to collect products, shops, or both.",
                        "default": "both"
                    },
                    "maxResultsPerSearch": {
                        "title": "Max products per keyword",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of products to collect for each search keyword.",
                        "default": 60
                    },
                    "includeShopProducts": {
                        "title": "Include products on shop pages",
                        "type": "boolean",
                        "description": "When scraping a shop's details, also collect the products listed on its storefront.",
                        "default": true
                    },
                    "region": {
                        "title": "Marketplace region",
                        "type": "string",
                        "description": "TikTok Shop marketplace to use (two-letter country code, e.g. us, gb). Most coverage is available for us.",
                        "default": "us"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
