# TikTok Shop Videos: Revenue & Units Sold per Video, 15 Markets (`memo23/tiktok-shop-videos`) Actor

Find the TikTok Shop videos that sell the most in 15 markets: a whole market, category, search term, product, shop or creator. Each row has the video's revenue and units sold, views and engagement, the creator, and the products it sells with title and price, in USD. JSON, CSV or API.

- **URL**: https://apify.com/memo23/tiktok-shop-videos.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** E-commerce, Social media
- **Features:** Limited permissions
- **Stats:** 8 total users, 6 monthly users, 95.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 videos

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 Videos: Revenue & Units Sold per Video, 15 Markets

<p align="center"><img src="https://api.apify.com/v2/key-value-stores/DQPEcDipVKVa1XTPL/records/logo.png" alt="TikTok Shop Videos" width="140"></p>

**Find the TikTok videos that actually sell.** Rank the shoppable videos of any of 15 TikTok Shop markets by the revenue they made, the units they sold or their views, for a whole market, a category, a search term, a product, a shop or a creator.

Every video row carries what that one video sold, its views, likes, comments, shares and saves, its engagement rate and revenue per 1,000 views, the creator who posted it, and the products it sells with title, price and link. Amounts are in US dollars in every market.

Creative research that starts from sales, not from likes.

### Why Use This Scraper?

- **Ranked by what the video sold.** Revenue and units are the video's own sales, not the product's total, so you see which piece of content moved the product.
- **Yesterday, last week or last month.** Market and category rankings for the last day, the last full week, the last full month or any finished month, with lifetime totals on the same row.
- **Revenue per 1,000 views on every row.** Compare a viral video with a quiet one that converts, without a separate analytics add-on.
- **The product comes with it.** Title, average price, product link and image for every product a video sells, plus the shop id.
- **Every way in.** A whole market, a category, a search term, a product link, a store link or a creator's @username.
- **AI and photo posts marked.** Keep or drop AI-generated videos and photo carousel posts with one setting.
- **15 markets, one currency.** United States, United Kingdom, Germany, France, Italy, Spain, Brazil, Japan, Mexico, Indonesia, Thailand, Vietnam, Philippines, Malaysia and Singapore, all in USD.
- **Pay for rows, not inputs.** $2.00 per 1,000 videos on the Bronze plan (down to $1.60 on Gold and up) plus $0.01 a run. No minimum per input, and nothing filtered out is charged.

### Overview

This actor is for people who make, buy or study TikTok Shop content: brands choosing which creators to hire and which hooks to copy, affiliate creators studying what sells in their niche, agencies building creative briefs, UGC producers, and analysts tracking how products are sold on TikTok.

You choose a market and what to look at. The actor returns one flat row per video, ranked within each input, with sales, engagement, creator and product attached. Several inputs can run in one go; each keeps its own ranking, and a video found by two inputs is delivered once.

The dataset exports as JSON, CSV, Excel or through the API. A `RUN_SUMMARY` record in the run's key-value store lists what each input delivered and what it skipped.

### Supported Inputs

| What you give | What you get |
|---|---|
| Nothing (all inputs empty) | The best-selling videos of the whole market for the ranking period |
| A category name, e.g. `Beauty & Personal Care`, `Health`, `Kitchenware`, or a numeric category id | The best-selling videos for products in that category, for the ranking period |
| A search term, e.g. `air fryer`, `lip oil`, `creatine` | The best videos selling products whose title contains every word of the term |
| A product link or id, e.g. `https://www.tiktok.com/view/product/1729628429519393456` | The videos selling that product |
| A shop id or store link, e.g. `https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079` | The videos selling that shop's products |
| A creator: `@dealswithty`, `https://www.tiktok.com/@dealswithty` or a numeric user id | That creator's selling videos |
| A finished month, e.g. `2026-09` (with the market or categories) | That month's best-selling videos |

Categories available by name: Beauty & Personal Care, Health, Household Appliances, Home Supplies, Kitchenware, Womenswear & Underwear, Menswear & Underwear, Phones & Electronics, Sports & Outdoor, Toys & Hobbies, Pet Supplies, Baby & Maternity, Food & Beverages, Fashion Accessories, Textiles & Soft Furnishings, Automotive & Motorcycle, Tools & Hardware, Home Improvement, Computers & Office Equipment, Luggage & Bags, Shoes, Furniture, Books Magazines & Audio, Kids' Fashion, Jewelry Accessories & Derivatives, Collectibles, Pre-Owned, Muslim Fashion.

**Not supported:** videos that sell nothing (use [TikTok Scraper](https://apify.com/memo23/tiktok-scraper) for any TikTok video), LIVE streams (see [TikTok LIVE Scraper](https://apify.com/memo23/tiktok-live-scraper)), and markets outside the 15 above.

### Use Cases

| Who | What they do with it |
|---|---|
| Brands and sellers | See which videos sell a competitor's product and copy the hook, length and format |
| Affiliate creators | Study the best-selling videos in their niche before filming |
| Agencies and UGC studios | Build creative briefs from last week's top-selling videos in a category |
| Influencer marketers | Shortlist creators whose videos sell, not just get views |
| Performance teams | Compare revenue per 1,000 views across creators and formats |
| Analysts | Track which categories and markets sell through video, month by month |

### How It Works

![How it works](https://api.apify.com/v2/key-value-stores/DQPEcDipVKVa1XTPL/records/how-it-works-tiktok-shop-videos.png)

1. **Pick a market** from the 15 TikTok Shop countries.
2. **Say what to look at:** the whole market, categories, search terms, products, shops or creators.
3. **Choose the period and order:** yesterday, last full week or last full month for rankings, by revenue, units sold or views, plus any filters.
4. **The actor ranks each input,** adds each video's creator and products, drops anything outside your filters, and delivers up to your limit per input.
5. **Export** the dataset as JSON, CSV or Excel, or read it through the API.

### Input Configuration

| Field | Type | Default | Description |
|---|---|---|---|
| `market` | string | `US` | TikTok Shop country: `US`, `GB`, `DE`, `FR`, `IT`, `ES`, `BR`, `JP`, `MX`, `ID`, `TH`, `VN`, `PH`, `MY`, `SG`. |
| `period` | string | `lastWeek` | `yesterday`, `lastWeek` (Monday to Sunday) or `lastMonth`: the window for market and category rankings. |
| `sortBy` | string | `revenue` | `revenue`, `unitsSold` or `views`, highest first. |
| `searchTerms` | array | none | Search terms, matched against product titles. |
| `categories` | array | none | Category names or numeric category ids. |
| `products` | array | none | Product links or numeric product ids. |
| `shops` | array | none | Store links or numeric shop ids. |
| `creators` | array | none | `@username`, profile links or numeric user ids. |
| `maxVideosPerSource` | integer | `50` | Videos per input, 1 to 500. |
| `pastMonth` | string | none | A finished month as `YYYY-MM`. Replaces `period` for the market or category rankings. |
| `includeProductDetails` | boolean | `true` | Product title, average price, link and image for each product a video sells. Off: ids and links only. |
| `minRevenue` / `minUnitsSold` | integer | none | The video's own sales in the row's period. |
| `minViews` | integer | none | Lifetime views. |
| `postedWithinDays` | integer | none | Only videos posted this recently. |
| `aiContent` | string | `any` | `any`, `aiOnly` or `noAi`. |
| `format` | string | `any` | `any`, `video` or `photo` (carousel posts). |

#### Last week's 50 best-selling beauty videos

```json
{
  "market": "US",
  "categories": ["Beauty & Personal Care"],
  "period": "lastWeek",
  "maxVideosPerSource": 50
}
```

#### The videos selling one product, and a competitor's shop

```json
{
  "products": ["https://www.tiktok.com/view/product/1729628429519393456"],
  "shops": ["https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079"],
  "sortBy": "revenue"
}
```

#### Air fryer videos in the UK posted in the last 30 days, no AI

```json
{
  "market": "GB",
  "searchTerms": ["air fryer"],
  "postedWithinDays": 30,
  "aiContent": "noAi"
}
```

#### A creator's selling videos, by views

```json
{
  "creators": ["@dealswithty"],
  "sortBy": "views"
}
```

### Output Overview

One flat row per video. Each row says where it came from (`source`, `sourceInput`), its position in that input's list (`rank`) and the window its sales cover (`period`), then carries:

- the video's sales: `revenue`, `unitsSold`, `revenuePerUnit`, with lifetime `revenueTotal` and `unitsSoldTotal`
- reach and engagement: `views`, `likes`, `comments`, `shares`, `saves`, `engagementRatePercent`, `revenuePer1000Views`
- the content: `videoUrl`, `caption`, `hashtags`, `coverUrl`, `format`, `durationSec`, `postedAt`, `isAd`, `isAiGenerated`
- the creator: `creatorHandle`, `creatorName`, `creatorUrl`, `creatorAvatarUrl`, `creatorCategory`
- the products: `productTitle`, `productPrice`, `productUrl` for the first product, and every product in `products`

Market and category rankings report the ranking's day, week or month in `revenue` and `unitsSold`. Search terms, products, shops and creators report each video's lifetime sales, so there `revenue` equals `revenueTotal`.

### Output Samples

A real row from a run on 14 November 2026 (whole US market, week of 2 November, by revenue), shortened:

```json
{
  "videoId": "7700031149707480351",
  "videoUrl": "https://www.tiktok.com/@grind2hardosha/video/7700031149707480351",
  "caption": "#brighteningskincare",
  "hashtags": ["brighteningskincare"],
  "format": "video",
  "durationSec": 19,
  "postedAt": "2026-10-23T21:33:45.000Z",
  "market": "US",
  "rank": 1,
  "source": "market",
  "sourceInput": "top videos US",
  "period": "2026-11-02 to 2026-11-08",
  "revenue": 534711,
  "unitsSold": 5027,
  "revenuePerUnit": 106.37,
  "revenueTotal": 712421,
  "unitsSoldTotal": 7406,
  "views": 5206363,
  "likes": 41634,
  "comments": 598,
  "shares": 6716,
  "saves": 22403,
  "engagementRatePercent": 1.37,
  "revenuePer1000Views": 136.84,
  "isAiGenerated": false,
  "creatorHandle": "grind2hardosha",
  "creatorName": "Grind2Hard Osh'a",
  "creatorUrl": "https://www.tiktok.com/@grind2hardosha",
  "productCount": 1,
  "productTitle": "[medicube] Smooth & Clear Body Care Set | Hypochlorous Acid Body Peel Shot, Kojic Acid Turmeric Body Wash ...",
  "productPrice": 144.95,
  "productUrl": "https://www.tiktok.com/view/product/1732052189676081387",
  "productCategory": "Beauty & Personal Care",
  "shopId": "7495514739648989419"
}
```

A row from a search term (`air fryer`, US), lifetime figures, shortened:

```json
{
  "videoUrl": "https://www.tiktok.com/@laurie_stone/video/...",
  "source": "search",
  "sourceInput": "air fryer",
  "period": "lifetime",
  "revenue": 208355,
  "unitsSold": 1042,
  "views": 6244498,
  "revenuePer1000Views": 33.37,
  "isAd": false,
  "productTitle": "[2026 Kitchen Hack] Midea Flexify French Door Air Fryer Toaster Oven Combo 26.4 QT ...",
  "productPrice": 149.99
}
```

### Key Output Fields

#### Ranking

| Field | Meaning |
|---|---|
| `rank` | Position within the input's list. |
| `source`, `sourceInput` | `market`, `category`, `search`, `product`, `shop` or `creator`, and the input that found the video. |
| `period` | The ranking's day (`2026-11-13`), week (`2026-11-02 to 2026-11-08`) or month (`2026-10`), or `lifetime`. |

#### Sales

| Field | Meaning |
|---|---|
| `revenue`, `unitsSold` | What this video sold in `period`, USD. |
| `revenuePerUnit` | `revenue / unitsSold`. |
| `revenueTotal`, `unitsSoldTotal` | What the video has sold since it was posted. |
| `revenuePer1000Views` | Lifetime revenue per 1,000 lifetime views. |

#### Engagement

| Field | Meaning |
|---|---|
| `views`, `likes`, `comments`, `shares`, `saves` | Lifetime counts. |
| `engagementRatePercent` | (likes + comments + shares + saves) / views. |

#### Content

| Field | Meaning |
|---|---|
| `videoId`, `videoUrl`, `caption`, `hashtags`, `coverUrl` | The post. |
| `format`, `durationSec`, `postedAt` | `video` or `photo`, length in seconds, when it was posted. |
| `isAd` | Whether the video runs as a paid ad. Empty on market and category ranking rows. |
| `isAiGenerated` | TikTok's AI-generated content label. |

#### Creator and products

| Field | Meaning |
|---|---|
| `creatorHandle`, `creatorName`, `creatorId`, `creatorUrl`, `creatorAvatarUrl`, `creatorCategory` | Who posted it. Name, avatar and category come with ranking and shop rows. |
| `productCount`, `productIds`, `products` | Every product the video sells, each with `productId`, `title`, `price`, `productUrl`, `imageUrl`, `shopId`. |
| `productTitle`, `productPrice`, `productUrl` | The first product, flat, for spreadsheets. On product inputs it is the product you asked about. |
| `productCategory`, `shopId` | Category of the products, and the shop selling the first one. |

### FAQ

**How fresh is the data?**
Sales figures are refreshed daily. Yesterday's ranking is usually ready the next morning (UTC); if it is not, the run falls back to the day before and says so in `period`.

**Are the revenue figures exact?**
They are estimates built from TikTok Shop sales data, the kind creator-analytics dashboards show. Treat them as reliable for ranking and comparison, not as accounting figures.

**Why do some videos show a very high revenue per 1,000 views?**
Videos promoted as paid ads collect sales from ad impressions that the public view count does not include. `isAd` marks them where it is known.

**Why are `revenue` and `revenueTotal` the same on search, product, shop and creator rows?**
Those lists hold each video's lifetime sales. The day, week and month windows apply to the market and category rankings.

**Can I rank a whole market by views?**
Yes, with `sortBy: views`. The list is drawn from the period's best-selling videos and ordered by views, so it stays on shoppable videos rather than viral clips that sell nothing.

**Why does an `air fryer` search include an air fryer liner video?**
A search term picks products whose title contains every word of the term, then the videos selling them. Accessories that name the product can match; check `productTitle`.

**What does the free Apify plan get?**
Up to 20 videos from the first input per run. Any paid Apify plan removes the limit.

**How much does it cost?**
| | Free plan | Bronze | Silver | Gold and up |
|---|---|---|---|---|
| Per video row | $0.0025 | $0.0020 | $0.0018 | $0.0016 |
| Per run start | $0.01 | $0.01 | $0.01 | $0.01 |

A run of 3 search terms with 10 videos each costs $0.07 on Bronze. Filtered-out videos, duplicates and the run summary are never charged, and there is no minimum per input. Set "Max cost per run" in the run options and the run stops by itself at that amount, with every delivered row paid for.

### Support

Found a bug or missing a field? Open an issue on the actor's [Issues tab](https://apify.com/memo23/tiktok-shop-videos/issues) with your run link and input.

### Additional Services

Need a weekly creative report for a category, another export shape or a market this actor does not cover? Ask on the Issues tab; tailored work is available.

### Explore More Scrapers

- [**TikTok Shop Top Products**](https://apify.com/memo23/tiktok-shop-top-products): best-selling products by revenue with the video, LIVE and shop-window split.
- [**TikTok Shop Creator Finder**](https://apify.com/memo23/tiktok-shop-creator-finder): affiliate creators with units sold and contact emails.
- [**TikTok Shop LIVE Sales**](https://apify.com/memo23/tiktok-shop-live-sales): the livestreams that sell the most, with revenue, viewers and top products.
- [**TikTok Shop Sellers**](https://apify.com/memo23/tiktok-shop-sellers): shops ranked by revenue and units.
- [**TikTok Shop Scraper**](https://apify.com/memo23/tiktok-shop-scraper): product pages with SKUs, stock, sold count and reviews.
- [**TikTok Scraper**](https://apify.com/memo23/tiktok-scraper): profiles, videos, hashtags, search and comments.
- [**TikTok Transcript Scraper**](https://apify.com/memo23/tiktok-transcript-scraper): the spoken words of any video, for hook research.

Full list at [apify.com/memo23](https://apify.com/memo23).

### 🤖 For AI Agents & LLM Apps

Compact reference for agents calling this actor through the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/tiktok-shop-videos`).

**Purpose:** rank TikTok Shop videos by the revenue, units or views they made in one of 15 markets, for a market, category, search term, product, shop or creator, with the creator and the products each video sells.

**Minimal input:**

```json
{ "market": "US", "categories": ["Health"], "maxVideosPerSource": 10 }
```

**Output:** one row per video: videoId, videoUrl, caption, hashtags, coverUrl, format, durationSec, postedAt, market, rank, source, sourceInput, period, revenue, unitsSold, revenuePerUnit, revenueTotal, unitsSoldTotal, views, likes, comments, shares, saves, engagementRatePercent, revenuePer1000Views, isAd, isAiGenerated, creatorHandle, creatorName, creatorId, creatorUrl, creatorAvatarUrl, creatorCategory, productCount, productIds, productTitle, productPrice, productUrl, products\[], productCategory, shopId.

**Behaviors an agent should know:**

- All money is USD. Figures are daily estimates, not live.
- With no inputs, the whole market is ranked for `period`. Each input is listed separately; duplicates across inputs are delivered once.
- Market and category rows carry the period's sales; search, product, shop and creator rows carry lifetime sales (`period: "lifetime"`).
- `maxVideosPerSource` bounds each input (default 50, max 500), and so the cost.
- Billing: $0.01 per run start plus one `video` charge per delivered row ($0.002 on Bronze). Filtered rows, duplicates and `RUN_SUMMARY` are free.
- An input that returns nothing is listed with its reason in the `RUN_SUMMARY` key-value record.

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by ByteDance Ltd., TikTok or any of their subsidiaries. All trademarks mentioned are the property of their respective owners.

It returns publicly available commercial information about videos that sell products on TikTok Shop, with sales figures that are estimates. It does not access accounts, private data or content behind a login. Users are responsible for making sure their use complies with TikTok's Terms of Service, applicable data-protection law (GDPR, CCPA and similar) and their own contractual obligations.

### SEO Keywords

tiktok shop videos, tiktok shop video scraper, tiktok shop video analytics, tiktok shop video gmv, tiktok shop video revenue, best selling tiktok videos, tiktok shop top videos, tiktok shoppable videos, tiktok affiliate videos, tiktok shop creative research, tiktok ugc research, tiktok shop ads research, tiktok shop video sales data, tiktok made me buy it videos, tiktok shop product videos, tiktok shop creator videos, tiktok shop competitor videos, tiktok shop uk videos, tiktok shop indonesia, tiktok shop thailand, tiktok shop vietnam, tiktok shop philippines, tiktok shop malaysia, tiktok shop mexico, tiktok shop germany

# Actor input Schema

## `market` (type: `string`):

Which TikTok Shop country to read, for example US or GB (default US). Revenue is converted to US dollars for all 15 countries.

## `period` (type: `string`):

For the whole-market and category rankings: the day, the week (Monday to Sunday) or the calendar month whose sales rank the videos. Each row's revenue and units sold are for that window. Search terms, products, shops and creators give each video's lifetime sales instead.

## `sortBy` (type: `string`):

Highest first. Revenue and units sold are the video's own sales, not the product's.

## `searchTerms` (type: `array`):

Videos selling products whose title contains every word of the term, for example <b>air fryer</b>, <b>lip oil</b>, <b>creatine</b>. Leave every input empty for the best-selling videos of the whole market.

## `categories` (type: `array`):

Best-selling videos for products in a TikTok Shop category: Beauty & Personal Care, Health, Household Appliances, Home Supplies, Kitchenware, Womenswear & Underwear, Menswear & Underwear, Phones & Electronics, Sports & Outdoor, Toys & Hobbies, Pet Supplies, Baby & Maternity, Food & Beverages, Fashion Accessories, Textiles & Soft Furnishings, Automotive & Motorcycle, Tools & Hardware, Home Improvement, Computers & Office Equipment, Luggage & Bags, Shoes, Furniture, Books, Magazines & Audio, Kids' Fashion, Jewelry Accessories & Derivatives, Collectibles, Pre-Owned, Muslim Fashion. A numeric category id works too.

## `products` (type: `array`):

The videos selling one product: a product link such as https://www.tiktok.com/view/product/1729628429519393456 or https://shop.tiktok.com/us/pdp/name/1729628429519393456, or just the numeric product id.

## `shops` (type: `array`):

The videos selling a shop's products: a store link such as https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079, or just the numeric shop id.

## `creators` (type: `array`):

A creator's selling videos: a TikTok @username, a profile link such as https://www.tiktok.com/@dealswithty, or a numeric user id.

## `maxVideosPerSource` (type: `integer`):

Upper limit for each search term, category, product, shop or creator (or for the whole-market ranking). A video found by two inputs is delivered once.

## `pastMonth` (type: `string`):

Optional, replaces the ranking period: a finished month such as <b>2026-09</b>, for the market or the categories above.

## `includeProductDetails` (type: `boolean`):

Each row lists the products the video sells. On: with title, average price, link and image. Off: product ids and links only.

## `minRevenue` (type: `integer`):

The video's revenue in the row's period.

## `minUnitsSold` (type: `integer`):

Units the video sold in the row's period.

## `minViews` (type: `integer`):

Lifetime views of the video.

## `postedWithinDays` (type: `integer`):

Only videos posted this recently. Leave empty for any age.

## `aiContent` (type: `string`):

Keep or drop videos TikTok labels as AI-generated.

## `format` (type: `string`):

Regular videos or photo carousel posts.

## Actor input object example

```json
{
  "market": "US",
  "period": "lastWeek",
  "sortBy": "revenue",
  "searchTerms": [
    "air fryer"
  ],
  "maxVideosPerSource": 30,
  "includeProductDetails": true,
  "aiContent": "any",
  "format": "any"
}
```

# Actor output Schema

## `videos` (type: `string`):

All rows in the default dataset.

## `summary` (type: `string`):

What each input delivered, skipped or could not read.

# 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 = {
    "searchTerms": [
        "air fryer"
    ],
    "maxVideosPerSource": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/tiktok-shop-videos").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 = {
    "searchTerms": ["air fryer"],
    "maxVideosPerSource": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/tiktok-shop-videos").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 '{
  "searchTerms": [
    "air fryer"
  ],
  "maxVideosPerSource": 30
}' |
apify call memo23/tiktok-shop-videos --silent --output-dataset

```

## MCP server setup

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

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/BNWkAarinbSRk4JlZ/builds/KDfM819Dgvbvx8P0U/openapi.json
