# TikTok Shop Product & Price Tracker (`scrapyx/tiktok-shop-product-tracker`) Actor

Tracks TikTok Shop product prices, discounts, per-SKU stock, sold counts and ratings across 8 markets. Reads the product page's own server-rendered payload — HTTP only, no login, no CAPTCHA solving. Pins the proxy exit to your chosen market so prices never silently change currency.

- **URL**: https://apify.com/scrapyx/tiktok-shop-product-tracker.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 86.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 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?

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 Product & Price Tracker

Tracks TikTok Shop listings across **8 markets** — current price, list price,
discount, per-SKU price and stock, units sold, rating and review count — by
reading each product page's own server-rendered payload.

HTTP only. No login, no cookies, no browser, no CAPTCHA solving.

### Two ways to use it

**`urls` — track the products you care about.** Give it TikTok Shop product
URLs or bare numeric IDs and run it on a schedule; each run appends a fresh
price snapshot. This is the mode you want for price monitoring.

**`discover` — sample the catalogue.** Pulls products from TikTok's own
published per-country PDP sitemap (the US index alone lists ~1.6M products).
Use it to build a watchlist, then switch to `urls` to track it.

### Markets

`US`, `PH`, `VN`, `MY`, `SG`, `TH`, `JP`, and `ID`.

**Indonesia is `urls`-only** — TikTok Shop Indonesia runs on Tokopedia and
publishes no PDP sitemap, so there is nothing to enumerate.

### The one thing to get right: the market pin

TikTok decides which market you are in **from your exit IP**, and it cannot be
overridden by any cookie or header. Prices are denominated in that market's
currency. So an un-pinned rotating proxy can hand you IDR rows and USD rows in
the same dataset, with every request returning a healthy 200.

This actor defends against that for you:

- your chosen `country` is pinned onto the Apify Proxy exit automatically;
- every row reports `regionServed` and `regionMatched`, and a mismatched row is
  flagged with `_error: REGION_MISMATCH` instead of being quietly written;
- the run summary reports `currenciesSeen` and `currencyStable`, and warns
  loudly if more than one currency shows up in a single run.

If you see `REGION_MISMATCH`, your proxy exited in the wrong country — the data
is not wrong, it is just a different market's prices.

### Reading the price fields

TikTok's headline price is the **cheapest SKU**, and for multi-variant products
that can be far below what most variants cost — one sampled listing ran from
114 to 27,552 in the same currency. So you get the spread, not just a number:

| Field | Meaning |
|---|---|
| `salePrice` | current price of the cheapest SKU (what TikTok shows) |
| `originalPrice` / `discountFormatted` | struck-through price and % off, as displayed |
| `salePriceMinAcrossSkus` / `salePriceMaxAcrossSkus` | the real range across variants |
| `priceVariesBySku` | true when variants are not all the same price |
| `singleProductPrice` | undiscounted single-unit price |
| `skus[]` | per-variant price, stock quantity and stock status |

### Proxy requirements (read this before picking a market)

Because the market is chosen by exit IP, **your proxy has to have IPs in the
market you ask for**. Two failure modes are reported explicitly rather than
silently:

- `PROXY_COUNTRY_UNAVAILABLE` — the request never reached TikTok; it died in
  the proxy CONNECT tunnel because your Apify Proxy plan has no IPs in that
  country. Pick a market your plan covers, or pass your own proxies in
  `proxyConfiguration.proxyUrls`.
- `SITEMAP_UNREACHABLE` — `discover` mode only. TikTok's PDP sitemap answers
  fine to residential exits but 404s from datacenter networks, so discover
  needs a **residential** proxy. `urls` mode works on any egress.

### Output

One row per product, with flattened price columns plus the raw payload. Failures
produce a diagnostic row (`_error`: `REGION_MISMATCH_OR_NOT_FOUND`,
`UNPARSEABLE_INPUT`, `CAPTCHA_SHELL`, `BLOCKED_AFTER_RETRIES`, `UPSTREAM_<code>`)
rather than a silent gap, so a scheduled run never loses an input without
telling you. A `RUN_SUMMARY` record carries the market, currency stability and
transport stats.

# Actor input Schema

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

urls = track the exact products you supply (the usual choice for price monitoring). discover = pull products from TikTok's own published PDP sitemap for the chosen country.

## `country` (type: `string`):

Which TikTok Shop market to read. This pins the Apify Proxy exit country, because TikTok decides your market from the exit IP and prices are denominated in that market's currency. Discover mode needs a market with a published sitemap (ID has none — TikTok Shop Indonesia runs on Tokopedia).

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

For mode=urls. Full TikTok Shop product URLs (with or without the slug) or bare numeric product IDs.

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

How many products to fetch. Each product is one request to its detail page.

## `randomiseSitemap` (type: `boolean`):

For mode=discover. Shuffles which sub-sitemaps and URLs are taken, so repeat runs sample across the catalogue instead of re-reading the same alphabetical head.

## `minRequestInterval` (type: `integer`):

Politeness pacing between requests.

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

Apify Proxy settings. Leave the country blank and the actor pins it to the selected market automatically — an unpinned rotating pool can silently switch currency mid-run.

## Actor input object example

```json
{
  "mode": "urls",
  "country": "US",
  "productUrls": [
    "https://shop.tiktok.com/us/pdp/12-volt-refrigerator-euhomy-37-quart-car-freezer-with-lcd-wheels/1729534137636524543",
    "https://shop.tiktok.com/us/pdp/comfort-cushion-insoles-for-men-women-by-pcssole-plantar-fasciitis-relief-arch-support-heavy-duty-fi/1729475663214253081",
    "https://shop.tiktok.com/us/pdp/promix-electrolyte-drink-mix-variety-pack-12-count/1731387831542714450"
  ],
  "maxItems": 20,
  "randomiseSitemap": true,
  "minRequestInterval": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per product, with flattened price columns and a per-SKU price breakdown.

# 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 = {
    "productUrls": [
        "https://shop.tiktok.com/us/pdp/12-volt-refrigerator-euhomy-37-quart-car-freezer-with-lcd-wheels/1729534137636524543",
        "https://shop.tiktok.com/us/pdp/comfort-cushion-insoles-for-men-women-by-pcssole-plantar-fasciitis-relief-arch-support-heavy-duty-fi/1729475663214253081",
        "https://shop.tiktok.com/us/pdp/promix-electrolyte-drink-mix-variety-pack-12-count/1731387831542714450"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/tiktok-shop-product-tracker").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 = { "productUrls": [
        "https://shop.tiktok.com/us/pdp/12-volt-refrigerator-euhomy-37-quart-car-freezer-with-lcd-wheels/1729534137636524543",
        "https://shop.tiktok.com/us/pdp/comfort-cushion-insoles-for-men-women-by-pcssole-plantar-fasciitis-relief-arch-support-heavy-duty-fi/1729475663214253081",
        "https://shop.tiktok.com/us/pdp/promix-electrolyte-drink-mix-variety-pack-12-count/1731387831542714450",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/tiktok-shop-product-tracker").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 '{
  "productUrls": [
    "https://shop.tiktok.com/us/pdp/12-volt-refrigerator-euhomy-37-quart-car-freezer-with-lcd-wheels/1729534137636524543",
    "https://shop.tiktok.com/us/pdp/comfort-cushion-insoles-for-men-women-by-pcssole-plantar-fasciitis-relief-arch-support-heavy-duty-fi/1729475663214253081",
    "https://shop.tiktok.com/us/pdp/promix-electrolyte-drink-mix-variety-pack-12-count/1731387831542714450"
  ]
}' |
apify call scrapyx/tiktok-shop-product-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/tiktok-shop-product-tracker"
        }
    }
}
```

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/gXpFuyUKtpTSIf8BZ/builds/3p2PNyZhhRk4swWyS/openapi.json
