TikTok Shop research

Search TikTok Shop, then read a product's price, sold count and reviews.

The job

Product research is search, then depth. Find what sells under a keyword, open the product, and read the reviews for what buyers complain about.

Endpoints

EndpointReturnsCost
GET /v1/tiktok/shop/searchTikTok Shop product search1 credit
GET /v1/tiktok/shop/productTikTok Shop product details1 credit
GET /v1/tiktok/shop/product/reviewsTikTok Shop product reviews1 credit
GET /v1/tiktok/shop/productsTikTok Shop products of a shop1 credit

Failed requests and cached repeats cost 0 credits. Send max_age_days to accept a recent cached copy. See credits and caching.

Recipe

  1. Search a keyword.
  2. Open the products with the highest sold count.
  3. Read their reviews.
Preview
The API is in early access. Calls use api.socialscrape.io and return the shapes in the reference.
Python
import os
import requests

API = "https://api.socialscrape.io"
HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}


def get(path, **params):
    res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)
    res.raise_for_status()
    return res.json()["data"]

# TikTok Shop product search
found = get("/v1/tiktok/shop/search", query="water bottle")
# TikTok Shop product details
product = get("/v1/tiktok/shop/product", url=found["items"][0]["url"])
# TikTok Shop product reviews
reviews = get("/v1/tiktok/shop/product/reviews", url=found["items"][0]["url"])

for r in reviews["items"]:
    print(r["text"])
TypeScript
const API = "https://api.socialscrape.io";
const headers = { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! };

async function get(path: string, params: Record<string, string | number | boolean>) {
  const query = new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));
  const res = await fetch(`${API}${path}?${query}`, { headers });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
  return (await res.json()).data;
}

// TikTok Shop product search
const found = await get("/v1/tiktok/shop/search", { query: "water bottle" });
// TikTok Shop product details
const product = await get("/v1/tiktok/shop/product", { url: found.items[0].url });
// TikTok Shop product reviews
const reviews = await get("/v1/tiktok/shop/product/reviews", { url: found.items[0].url });

for (const r of reviews.items) console.log(r.text);

Good to know

TikTok decides how deep a search goes, and reviews come 5 a page.

Build on social data early.

Developers and agent builders get the first keys.

Get early access