# TikTok Shop Product Ranking (`datamagnet/tiktok-shop-product-ranking`) Actor

Get clean, ranked TikTok Shop product lists for a chosen date, region, and ranking cycle. Easily compare products by sales count or influencer count and export the results for review.

- **URL**: https://apify.com/datamagnet/tiktok-shop-product-ranking.md
- **Developed by:** [Datamagnet](https://apify.com/datamagnet) (community)
- **Categories:** E-commerce, Social media
- **Stats:** 3 total users, 1 monthly users, 84.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## 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/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 Product Ranking
Get a clean, easy-to-read list of TikTok Shop products ranked by sales or influencer count for any chosen date and region.

### What it does
- Shows ranked TikTok Shop products for the date and region you choose.
- Lets you rank by either sales count or influencer count.
- Automatically keeps loading more results until it reaches your requested total.
- Makes the results simple to review, copy, or export.
- Can be narrowed down with optional category filters.

### Use cases
- Spot the best-selling TikTok Shop products in a specific market on a given day.
- Compare which products are getting the most creator attention versus the most sales.
- Research trending categories and product ideas before choosing what to sell or promote.

### Input
| Field | Description | Required | Example |
|---|---|---:|---|
| Date | The ranking date in YYYY-MM-DD format. | Yes | 2025-11-01 |
| Region | Region code such as US. | Yes | US |
| Max results | Maximum number of ranked products to return. | No | 10 |
| Ranking cycle | Choose the ranking period: Daily, Weekly, or Monthly. | Yes | Daily |
| Ranking metric | Choose how products are ranked: Sales count or Influencer count. | Yes | Sales count |
| Category ID | Optional top-level category filter. | No | 1729649010208641832 |
| Category Level 2 ID | Optional second-level category filter. | No | 11 |
| Category Level 3 ID | Optional third-level category filter. | No | 111 |

### Output
| Field | Description |
|---|---|
| rank | The product’s position in the ranking list. |
| product_name | The product title shown in the ranking. |
| product_id | The unique ID for the product. |
| category_information | Category IDs for the product, including top-level and subcategories. |
| ranking_metric_value | The number used to rank the product, based on your chosen metric. |
| date | The ranking date for the results. |
| region | The region the ranking was pulled for. |
| sales_count | Total sales count for the product. |
| influencer_count | Number of influencers associated with the product. |
| gmv | Gross merchandise value for the product. |
| average_price | Average price of the product. |
| currency | Currency code, if available. |
| shop_name | Shop name, if available. |
| brand_name | Brand name, if available. |
| product_url | Product URL, if available. |

### Sample output
```json
{
  "rank": 1,
  "product_name": "Loaded Tea-At home flavor pack-Powered caffeinated beverage mix-Loaded Tea-Drink-Package-Energy Powder Beverage-55 flavors Caffeine Convenience",
  "product_id": "1729679758111249333",
  "category_information": {
    "category_id": "700437",
    "category_l2_id": "914824",
    "category_l3_id": "917512"
  },
  "ranking_metric_value": 262959,
  "date": "2025-11-01",
  "region": "US",
  "sales_count": 262959,
  "influencer_count": 728,
  "gmv": 734737.62,
  "average_price": 3,
  "currency": null,
  "shop_name": null,
  "brand_name": null,
  "product_url": null
}
````

# Actor input Schema

## `date` (type: `string`):

The ranking date in YYYY-MM-DD format.

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

Region code such as US.

## `rank_type` (type: `string`):

Choose the ranking period: 1 = daily, 2 = weekly, 3 = monthly.

## `category_id` (type: `string`):

Optional category filter for the product ranking.

## `max_results` (type: `integer`):

Maximum number of ranked products to return.

## `category_l2_id` (type: `string`):

Optional second-level category filter for the product ranking.

## `category_l3_id` (type: `string`):

Optional third-level category filter for the product ranking.

## `product_rank_field` (type: `string`):

Which ranking metric to use: 1 = sales count, 2 = influencer count.

## Actor input object example

```json
{
  "date": "2025-11-01",
  "region": "US",
  "rank_type": "1",
  "category_id": "1729649010208641832",
  "max_results": 10,
  "product_rank_field": "1"
}
```

# 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 = {
    "date": "2025-11-01",
    "region": "US",
    "rank_type": "1",
    "max_results": 10,
    "product_rank_field": "1"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamagnet/tiktok-shop-product-ranking").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 = {
    "date": "2025-11-01",
    "region": "US",
    "rank_type": "1",
    "max_results": 10,
    "product_rank_field": "1",
}

# Run the Actor and wait for it to finish
run = client.actor("datamagnet/tiktok-shop-product-ranking").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 '{
  "date": "2025-11-01",
  "region": "US",
  "rank_type": "1",
  "max_results": 10,
  "product_rank_field": "1"
}' |
apify call datamagnet/tiktok-shop-product-ranking --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Shop Product Ranking",
        "description": "Get clean, ranked TikTok Shop product lists for a chosen date, region, and ranking cycle. Easily compare products by sales count or influencer count and export the results for review.",
        "version": "0.0",
        "x-build-id": "MrfbTlwaNF2qVGh0h"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamagnet~tiktok-shop-product-ranking/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamagnet-tiktok-shop-product-ranking",
                "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/datamagnet~tiktok-shop-product-ranking/runs": {
            "post": {
                "operationId": "runs-sync-datamagnet-tiktok-shop-product-ranking",
                "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/datamagnet~tiktok-shop-product-ranking/run-sync": {
            "post": {
                "operationId": "run-sync-datamagnet-tiktok-shop-product-ranking",
                "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",
                "required": [
                    "date",
                    "region"
                ],
                "properties": {
                    "date": {
                        "title": "Date",
                        "type": "string",
                        "description": "The ranking date in YYYY-MM-DD format."
                    },
                    "region": {
                        "title": "Region",
                        "type": "string",
                        "description": "Region code such as US."
                    },
                    "rank_type": {
                        "title": "Ranking cycle",
                        "enum": [
                            "1",
                            "2",
                            "3"
                        ],
                        "type": "string",
                        "description": "Choose the ranking period: 1 = daily, 2 = weekly, 3 = monthly."
                    },
                    "category_id": {
                        "title": "Category ID",
                        "type": "string",
                        "description": "Optional category filter for the product ranking."
                    },
                    "max_results": {
                        "title": "Max results",
                        "type": "integer",
                        "description": "Maximum number of ranked products to return."
                    },
                    "category_l2_id": {
                        "title": "Category Level 2 ID",
                        "type": "string",
                        "description": "Optional second-level category filter for the product ranking."
                    },
                    "category_l3_id": {
                        "title": "Category Level 3 ID",
                        "type": "string",
                        "description": "Optional third-level category filter for the product ranking."
                    },
                    "product_rank_field": {
                        "title": "Ranking metric",
                        "enum": [
                            "1",
                            "2"
                        ],
                        "type": "string",
                        "description": "Which ranking metric to use: 1 = sales count, 2 = influencer count."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
