# TikTok Shop Flash Sales Scraper (`thenetaji/tiktok-shop-trending-scraper`) Actor

Export what TikTok Shop is pushing on its homepage right now — flash sales, top sellers, discounts and featured rails — each product with its price, star rating, units sold, and which rail it came from. Pick a storefront region to see that market's front page.

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

## Pricing

from $3.19 / 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/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 Trending Scraper

The Actor reads TikTok Shop's homepage for a chosen storefront and collects every product rail on it in one run, from flash sales and premium offers to whatever else TikTok is featuring that day, tagging each row with the rail it came from. There is no `scraperType`: the homepage is a single page carrying several rails at once, not a set of alternative surfaces to pick between.

```json
{
  "region": "US",
  "maxItems": 100,
  "enrichProductDetails": false
}
```

### Accepted input

`region` is required, defaults to `US`, and selects the storefront homepage read (`US`, `GB`, `SG`, `MY`, `PH`, `TH`, or `VN`); this changes the products, prices, and currency returned, not only the display language. `maxItems` defaults to `100` and bounds the number of rows saved across every rail combined; a value of `0` removes the bound. `enrichProductDetails` defaults to `false` and adds the full product page to every row: description, every variant, the shop profile, a page of reviews with the star breakdown, and the category path. It costs one extra request per row.

### Result fields

Every row carries `product_id` and `rail`, naming the carousel the product was read from. `rail` values are derived from TikTok's own container names for each carousel; `flash_sale_banner` and `premium_offers` are two seen on the `US` storefront. `component_id` is TikTok's own identifier for the homepage rail a row came from, and it is present only on the rails the Actor collects through a separate hydration request; rails read from the homepage's plain server-rendered response carry no `component_id`. `sale_end_time` is set on rows carrying a time-boxed offer and is absent otherwise.

The rest of the row is the standard listing card: `title`, `image`, `product_price_info`, `rate_info`, `sold_info`, `seller_info`, `seo_url`, `sku_info`, `brand_info`, `product_marketing_info`, and `product_card` for the untouched original. `brand_info` is not filled on every card; TikTok attaches it to some listings and not others even within the same rail.

```json
{
  "product_id": "1729668107411035024",
  "rail": "flash_sale_banner",
  "title": "Molitree Women's Sherpa Fleece Overalls 2025 Warm Winter Casual Loose Jumpsuits Sherpa Bib Overalls Fuzzy Ski Pants with Pockets Basic Womenswear Coveralls Strap",
  "product_price_info": { "currency_name": "USD", "sale_price_format": "60.16", "discount_format": "30%" },
  "rate_info": { "score": 4.6, "review_count": "571" },
  "sold_info": { "sold_count": 8536 },
  "seller_info": { "seller_id": "7495810325667482512", "shop_name": "Molitree" },
  "sale_end_time": "2145916800"
}
```

A row from `premium_offers` on the same `US` homepage carried a `brand_info` value the flash-sale row above did not:

```json
{
  "product_id": "1729385034800730797",
  "rail": "premium_offers",
  "title": "Micro Ingredients Organic Spirulina and Chlorella Tablets",
  "brand_info": { "brand_name": "Micro Ingredients" },
  "rate_info": { "score": 4.7, "review_count": "1230" },
  "sold_info": { "sold_count": 18995 },
  "sale_end_time": "1785999599"
}
```

These are trimmed, live-verified rows; `product_price_info`, `rate_info`, `sold_info`, and `seller_info` each carry more fields than shown here. Numeric values arrive exactly as the source returns them, so `sale_end_time` and `review_count` are numeric strings while `score` and `sold_count` are numbers; `new Date(Number(sale_end_time) * 1000)` converts the offer deadline, which is a second-precision epoch rather than the millisecond one review timestamps use.

With `enrichProductDetails` set to `true`, every row also gains `name`, `shop_info`, `review_info`, `categories`, and `promotion_tag`, plus the full `product_detail` record.

### A rail that is missing rather than empty

The homepage carries three groups of rails, read in order. Server-rendered rails are read first, and when a rail in this group is populated it is already complete and costs nothing extra to collect; for a signed-out request these rails commonly come back with no products at all, and an empty rail contributes no rows. `deals` rails are `US`-only and are simply absent from the response on every other storefront, rather than present and empty. The remaining rails come from a separate request that does answer a signed-out shopper and carry TikTok's own `component_id`; a personalized rail that requires a signed-in shopper is simply absent from this group rather than returned present-but-empty. None of this is a fetch failure; the run finishes normally either way, with only the rails TikTok actually populated contributing rows.

### Whether maxItems drives further requests

It does not. The homepage is one response covering every rail; there is no further page to ask for. `maxItems` bounds the number of rows saved across all rails combined, in the order the Actor reads them (server-rendered rails first, then `deals`, then the hydrated rails), so a low `maxItems` favors whichever rails come earliest rather than sampling evenly across all of them.

### Related Actors

For a single product's full record rather than a homepage snapshot, use the [TikTok Shop Product Scraper](https://apify.com/thenetaji/tiktok-shop-product-scraper). For discovering products by keyword instead of by what is currently featured, use the [TikTok Shop Search Scraper](https://apify.com/thenetaji/tiktok-shop-search-scraper). For the recommendation carousels attached to one product page rather than the homepage, use the [TikTok Shop Recommendations Scraper](https://apify.com/thenetaji/tiktok-shop-recommendations-scraper). For what surrounds a keyword search (related terms, ranking shops, or search-page recommendations), use the [TikTok Shop Search Insights Scraper](https://apify.com/thenetaji/tiktok-shop-search-insights-scraper).

# Actor input Schema

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

Which TikTok Shop storefront to read. This changes the products, prices, and currency you get back — not just the display language.

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

Maximum number of products to save. Set 0 for no limit.

## `enrichProductDetails` (type: `boolean`):

Add the full product page to every row — description, all variants, shop profile, a page of reviews with the star breakdown, and the category path. This makes one extra request per product.

## Actor input object example

```json
{
  "region": "US",
  "maxItems": 20,
  "enrichProductDetails": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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 = {
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/tiktok-shop-trending-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 = { "maxItems": 20 }

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/tiktok-shop-trending-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 '{
  "maxItems": 20
}' |
apify call thenetaji/tiktok-shop-trending-scraper --silent --output-dataset

```

## MCP server setup

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