1. Use cases
  2. TikTok Shop research

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

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

EndpointReturnsCost
TikTok Shop product search1 credit
TikTok Shop product details1 credit
TikTok Shop product reviews1 credit
TikTok Shop products of a shop1 credit

Recipe

  1. Search a keyword.
  2. Open the products with the highest sold count.
  3. Read their reviews.
1import os2import requests34API = "https://api.socialscrape.dev"5HEADERS = {"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]}678def get(path, **params):9    res = requests.get(API + path, headers=HEADERS, params=params, timeout=60)10    res.raise_for_status()11    return res.json()["data"]1213# TikTok Shop product search14found = get("/v1/tiktok/shop/search", query="water bottle")15# TikTok Shop product details16product = get("/v1/tiktok/shop/product", url=found["items"][0]["url"])17# TikTok Shop product reviews18reviews = get("/v1/tiktok/shop/product/reviews", url=found["items"][0]["url"])1920for r in reviews["items"]:21    print(r["text"])

Calls use api.socialscrape.dev and return the shapes in the reference.

Good to know

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

Related