Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.74 KB

README.md

File metadata and controls

40 lines (26 loc) · 1.74 KB

Tiktok Shop API Python (Unofficial)

GitHub Repo stars GitHub forks Twitter URL Vistors License

Getting Started

Import the TiktokShopApi class and add your RapidAPI Key. You can get the key at RapidAPI Tiktok Shop.

from TiktokShopApi import TiktokShopApi

x_rapidapi_key = 'YOUR_X_RAPIDAPI_KEY'
client = TiktokShopApi(x_rapidapi_key)

Methods

  • get_seller_products(user_id, region, count, cursor)
  • get_product_detail(product_id, region)
  • get_product_reviews(product_id, region, count, cursor, sort_type)
  • search_products(keyword, region, count, cursor)

Examples

The file /example.py is an example of searching for products (with keyword labubu and region TH) on TikTok Shop and saving valuable data to a CSV file.

You can view this file in labubu.csv or try with your own keyword.

Example-search-labub

Alternatively, you can go to the /examples folder to view the raw results in JSON format.