# Tiktok Realtime Product Search Scraper (`datamagnet/tiktok-realtime-product-search`) Actor

Search for products by keyword and collect a clean, easy-to-read list of matching items. Filter by region, price, and simple options to quickly find the most relevant results.

- **URL**: https://apify.com/datamagnet/tiktok-realtime-product-search.md
- **Developed by:** [Datamagnet](https://apify.com/datamagnet) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 62.5% 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

## Product Search Clean List
Find products by keyword and get a clean, easy-to-read list of matching items.

### What it does
- Searches for products using your keyword.
- Keeps collecting results until it reaches your requested total.
- Lets you narrow results by region, price range, cash on delivery, live products, and sort order.
- Returns a simple list with the most useful product details.
- Helps non-technical users quickly review matching products in one place.

### Use cases
- Compare similar products quickly, such as notebooks, journals, planners, or gift books, without digging through messy search results.
- Find products that fit a specific buying preference, like free shipping, cash on delivery, or live-broadcast items.
- Review seller, price, and promotion details before deciding which products to shortlist for research, content, or shopping.

### Input
| Field | Description | Required | Example |
|---|---|---:|---|
| Search keyword | What product or topic you want to search for. | Yes | Notebook |
| Region | The marketplace region to search in. | Yes | MY |
| Maximum results | The total number of results you want returned. | Yes | 50 |
| Price range | Optional minimum and maximum price separated by a comma. | No | 0,100 |
| Cash on delivery only | Only show items that support cash on delivery. Use 1 for yes or 0 for no. | No | 0 |
| Live products only | Include products from live broadcasts. Use 1 for yes or 0 for no. | No | 0 |
| Sort type | Choose how results are ordered. | No | 1 |

### Output
| Field | Description |
|---|---|
| product_id | Unique ID for the product listing. |
| title | Product name shown in search results. |
| seller.name | Seller or shop name. |
| seller.shop_id | Unique ID of the seller's shop. |
| price.currency | Currency symbol used for the price. |
| price.sale_price | Current selling price. |
| price.original_price | Original price before discount, if available. |
| price.discount_rate | Discount percentage, if available. |
| price.display | Price shown in a ready-to-read format. |
| shipping.ship_from | Location the item ships from, if shown. |
| shipping.free_shipping | Whether the item has free shipping. |
| promotions | List of active labels, vouchers, or deals attached to the product. |
| image.main_image_url | Main product image URL. |
| flags.is_ad | Whether the item is marked as an ad. |
| flags.trust_label | Trust or quality label shown for the listing. |
| product_url | Direct product link. |

### Sample output
```json
{
  "product_id": "1731569396271190584",
  "title": "CAGIE A5 Floral Journal Notebook, Hardcover Vegan Leather Journal with 320 Lined Pages, College Ruled Notebook, Thick Paper, Pen Holder, Cute Journal for Women, Writing, Bible Study & Gifts，Junk journal dealsforyourdays",
  "seller": {
    "name": "CAGIE STATIONERY",
    "shop_id": "7496093817841814072"
  },
  "price": {
    "currency": "$",
    "sale_price": 11.99,
    "original_price": 28.99,
    "discount_rate": "59%",
    "display": "$11.99"
  },
  "shipping": {
    "ship_from": null,
    "free_shipping": true
  },
  "promotions": [
    {
      "shop_id": "7496093817841814072",
      "placement": "DEFAULT",
      "activity_name": "6",
      "has_icon": "false",
      "coupon_type_info": "{\"business_type\":\"min_spend_off\"}",
      "coupon_cost_role": "seller",
      "promotion_id": "7655595563804116749",
      "ranking": "1",
      "label_type": "VOUCHER"
    },
    {
      "has_icon": "true",
      "promotion_id": "-999",
      "delivery_tag": "free_3_day_delivery",
      "placement": "FREE_SHIPPING",
      "ranking": "1",
      "label_type": "FREE_THIRD_DAY_DELIVERY",
      "activity_name": "32"
    }
  ],
  "image": {
    "main_image_url": "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/893b7c23972a4bd2bb876d2848116811~tplv-fhlh96nyum-crop-webp:400:400.webp?dr=12190&t=555f072d&ps=933b5bde&shp=678cc231&shcp=678cc231&idc=useast5&from=1737278001"
  },
  "flags": {
    "is_ad": true,
    "trust_label": "silver"
  },
  "product_url": "aweme://ec/pdp?biz_type=0&fullScreen=false&orderRequestParams=%7B%7D&requestParams=%7B%22product_id%22%3A%5B%221731569396271190584%22%5D%7D&visitReportParams=%7B%22chain_key%22%3A%22%22%2C%22material_id%22%3A%221731569396271190584%22%2C%22material_type%22%3A1%2C%22seller_id%22%3A%2274960938178418140..."
}
````

# Actor input Schema

## `sk` (type: `string`):

Enter the keyword you want to search for.

## `cod` (type: `string`):

Show only products that support cash on delivery. Use 1 for yes or 0 for no.

## `live` (type: `string`):

Show only products from live broadcasts. Use 1 for yes or 0 for no.

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

Enter the region code, such as US.

## `sort_type` (type: `string`):

Choose how results are sorted.

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

How many results to collect at most.

## `price_range` (type: `string`):

Optional price range filter in the format minimum,maximum.

## Actor input object example

```json
{
  "sk": "Notebook",
  "cod": "0",
  "live": "0",
  "region": "US",
  "sort_type": "1",
  "max_results": 50,
  "price_range": "0,100"
}
```

# 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 = {
    "sk": "Notebook",
    "region": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamagnet/tiktok-realtime-product-search").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 = {
    "sk": "Notebook",
    "region": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("datamagnet/tiktok-realtime-product-search").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 '{
  "sk": "Notebook",
  "region": "US"
}' |
apify call datamagnet/tiktok-realtime-product-search --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tiktok Realtime Product Search Scraper",
        "description": "Search for products by keyword and collect a clean, easy-to-read list of matching items. Filter by region, price, and simple options to quickly find the most relevant results.",
        "version": "0.0",
        "x-build-id": "6VGeYnbrXHMYOSpgM"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamagnet~tiktok-realtime-product-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamagnet-tiktok-realtime-product-search",
                "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-realtime-product-search/runs": {
            "post": {
                "operationId": "runs-sync-datamagnet-tiktok-realtime-product-search",
                "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-realtime-product-search/run-sync": {
            "post": {
                "operationId": "run-sync-datamagnet-tiktok-realtime-product-search",
                "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": [
                    "sk",
                    "region"
                ],
                "properties": {
                    "sk": {
                        "title": "Search keyword",
                        "type": "string",
                        "description": "Enter the keyword you want to search for."
                    },
                    "cod": {
                        "title": "Cash on delivery only",
                        "type": "string",
                        "description": "Show only products that support cash on delivery. Use 1 for yes or 0 for no."
                    },
                    "live": {
                        "title": "Live products only",
                        "type": "string",
                        "description": "Show only products from live broadcasts. Use 1 for yes or 0 for no."
                    },
                    "region": {
                        "title": "Region",
                        "type": "string",
                        "description": "Enter the region code, such as US."
                    },
                    "sort_type": {
                        "title": "Sort type",
                        "type": "string",
                        "description": "Choose how results are sorted."
                    },
                    "max_results": {
                        "title": "Maximum results",
                        "type": "integer",
                        "description": "How many results to collect at most.",
                        "default": 50
                    },
                    "price_range": {
                        "title": "Price range",
                        "type": "string",
                        "description": "Optional price range filter in the format minimum,maximum."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
