# TikTok Shop Search Insights Scraper (`thenetaji/tiktok-shop-search-insights-scraper`) Actor

Mine what surrounds a TikTok Shop search. Choose what to collect — related search terms for keyword research, the shops ranking for a keyword, 'frequently bought together' bundles, or 'recommended for you' products — and export it for any keyword and storefront.

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

## Pricing

from $3.19 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## TikTok Shop Search Insights Scraper

The Actor collects one of four things TikTok Shop shows alongside a search results page for a keyword: the `frequently bought together` bundle, the `recommended for you` products, the shops TikTok surfaces for the keyword, or the related search terms and categories it suggests. `scraperType` selects which one a run collects, and the four modes return three distinct row shapes, not one.

```json
{
  "scraperType": "relatedTerms",
  "keyword": "wireless earbuds",
  "region": "US",
  "maxItems": 100,
  "enrichProductDetails": false
}
```

### Accepted input

`scraperType` is required and defaults to `relatedTerms`; the other options are `frequentlyBoughtTogether`, `recommendedForYou`, and `recommendedShops`. `keyword` is required and is the term read against TikTok Shop's own search page. `region` is required and is `US` only. These widgets are read from TikTok's search page, which TikTok serves to its US storefront alone, so no other region is offered here. `maxItems` defaults to `100` and bounds the number of rows saved; a value of `0` removes the bound. `enrichProductDetails` defaults to `false`, applies only when `scraperType` is `frequentlyBoughtTogether` or `recommendedForYou`, and adds the full product page to each row for one extra request per row.

### Result fields

`frequentlyBoughtTogether` and `recommendedForYou` share one row shape: the standard listing card plus `rail` (`frequently_bought_together` or `recommended_for_you`) and `keyword`. The card carries `product_id`, `title`, `image`, `product_price_info`, `rate_info`, `sold_info`, `seller_info`, `seo_url`, `sku_info`, `brand_info`, `product_marketing_info`, and `product_card` for the untouched original.

```json
{
  "product_id": "1729430076387136161",
  "rail": "recommended_for_you",
  "keyword": "wireless earbuds",
  "title": "JLab JBuds Lux ANC Wireless Bluetooth Noise Cancelling Headphones with Mics, Adjustable Over-Ear Design, Custom EQ, Be Aware Safety Mode, Foldable",
  "product_price_info": { "currency_name": "USD", "sale_price_format": "79.99", "discount_format": "13%" },
  "rate_info": { "score": 4.7, "review_count": "19276" },
  "sold_info": { "sold_count": 170128 },
  "seller_info": { "seller_id": "7495182113810385569", "shop_name": "JLab" }
}
```

This is a trimmed, live-verified `recommendedForYou` row for `wireless earbuds`; `product_price_info` and `seller_info` each carry more fields than shown here.

`recommendedShops` returns a different row entirely, one per shop rather than per product: `seller_id`, `keyword`, `is_spotlighted`, `shop_name`, `shop_logo`, `shop_rating`, `shop_link`, `followers_count`, `video_count`, `sold_count`, `review_count`, `on_sell_product_count`, and `shop_detail` for the untouched shop record. TikTok spotlights one shop for the keyword and surfaces a handful of others alongside it, and only the spotlighted row carries the richer numbers; the rest arrive with little more than an ID, a name, and a logo. For `wireless earbuds` in `US`, the spotlighted row was:

```json
{
  "seller_id": "7494161853719414088",
  "keyword": "wireless earbuds",
  "is_spotlighted": true,
  "shop_name": "JBL",
  "shop_rating": "4.7",
  "followers_count": "474796",
  "video_count": "633",
  "sold_count": 226329,
  "review_count": 29000,
  "on_sell_product_count": 66
}
```

while the other rows for the same keyword carried only `seller_id`, `shop_name`, and `shop_logo`: `Belkin` (`seller_id` `7495342292475676788`) and `CMF by Nothing` (`seller_id` `7495669706651568260`) among them, both with `is_spotlighted` false and `shop_rating`, `followers_count`, `sold_count`, `review_count`, and `on_sell_product_count` all null.

`relatedTerms` returns a third shape: `term`, `term_url`, `term_type`, and `keyword`. TikTok Shop suggests two separate lists for a keyword, related search words and related categories, and the Actor flattens both into one stream, with `term_type` recording which list a row came from: `search_word` or `category`. For `wireless earbuds` in `US`, the search-word rows included `wireless earbuds bluetooth`, `wireless earbuds for android`, and `wireless earbuds for iphone`; the category rows included `Headphones, Earphones & Accessories` and `Smart Watches`.

With `enrichProductDetails` set to `true`, a `frequentlyBoughtTogether` or `recommendedForYou` row also gains `name`, `shop_info`, `review_info`, `categories`, `promotion_tag`, and `product_detail`.

### A widget with nothing in it

An empty widget is a real answer, not a failure. Searching `wireless earbuds` in `US` with `scraperType` set to `frequentlyBoughtTogether` returned zero products, since TikTok Shop simply had not built a bundle for that keyword, while `recommendedForYou` against the same keyword and region returned three. The run finishes normally with zero items saved rather than raising an error; a genuine network or upstream failure against the search page itself still fails the run so it shows up in the log.

### Why one shop looks thin

`is_spotlighted` marks the shop TikTok chose to feature for the keyword. That row alone carries `shop_rating`, `followers_count`, `video_count`, `sold_count`, `review_count`, and `on_sell_product_count`; the shops TikTok lists alongside it carry only `seller_id`, `shop_name`, and `shop_logo`, with the rest null. This asymmetry comes from TikTok's own response, not from a partial fetch; `shop_detail` on those thinner rows holds exactly as much as TikTok sent.

The spotlighted shop is also usually repeated inside the plain list, so a `recommendedShops` run commonly saves the same `seller_id` twice: once with `is_spotlighted` true and the full numbers, and once with `is_spotlighted` false and only the name and logo. For `wireless earbuds` in `US`, `JBL` appeared both ways. Deduplicating on `seller_id` and keeping the `is_spotlighted` row is the way to collapse that to one record per shop.

### Whether maxItems drives further requests

It does not. None of the four widgets paginate; each is returned complete in a single response for the keyword, so `maxItems` only trims what came back in that one response.

### Related Actors

For discovering products by keyword directly rather than what surrounds the search, use the [TikTok Shop Search Scraper](https://apify.com/thenetaji/tiktok-shop-search-scraper). For a single product's full record, use the [TikTok Shop Product Scraper](https://apify.com/thenetaji/tiktok-shop-product-scraper). For the recommendation carousels attached to a product page rather than a search, use the [TikTok Shop Recommendations Scraper](https://apify.com/thenetaji/tiktok-shop-recommendations-scraper). For a shop's storefront profile in full rather than the short summary a `recommendedShops` row carries, use the [TikTok Shop Seller Scraper](https://apify.com/thenetaji/tiktok-shop-seller-info-scraper).

# Actor input Schema

## `scraperType` (type: `string`):

Choose which part of the TikTok Shop search page this run collects.

## `keyword` (type: `string`):

Product keyword to search for on TikTok Shop.

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

United States only. TikTok publishes this page for its US storefront alone, so other storefronts return nothing and are not offered here.

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

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

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

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

## Actor input object example

```json
{
  "scraperType": "relatedTerms",
  "keyword": "wireless earbuds",
  "region": "US",
  "maxItems": 20,
  "enrichProductDetails": false
}
```

# Actor output Schema

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

All records scraped by this run

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keyword": "wireless earbuds",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/tiktok-shop-search-insights-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keyword": "wireless earbuds",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/tiktok-shop-search-insights-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keyword": "wireless earbuds",
  "maxItems": 20
}' |
apify call thenetaji/tiktok-shop-search-insights-scraper --silent --output-dataset

```

## MCP server setup

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

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/omrL4DmB6vuMHZLmU/builds/Vd69S4GigL9gCgxGS/openapi.json
