MarkdownCopies this page as Markdown, ready to paste into an AI assistant.
TikTok Shop API
7 TikTok Shop endpoints behind one key, priced in credits per call and routed to the cheapest healthy source.
On this page
E-commerce · 7 endpoints · from 2 credits per call
Endpoints
- POSTTikTok Shop Creator Showcase
/v1/run/tiktok-shop.user_showcaseThe TikTok Shop products a creator promotes in their profile showcase, with price, discount, rating and units sold.3 creditsper call - POSTTikTok Shop Product
/v1/run/tiktok-shop.productFull detail of one TikTok Shop product page: title, images, price and discount, rating, units sold, seller and variants.2 creditsper call - POSTTikTok Shop Product Reviews
/v1/run/tiktok-shop.product_reviewsCustomer reviews of a TikTok Shop product, page by page: rating, text, photos, variant, country and verified-purchase flag.2 creditsper call - POSTTikTok Shop Search
/v1/run/tiktok-shop.searchTikTok Shop products matching a keyword in one country store, with price, discount, rating, units sold and seller.2 creditsper call - POSTTikTok Shop Store Products
/v1/run/tiktok-shop.shop_productsProducts listed by one TikTok Shop store, with price, discount, rating and units sold per product plus store-level stats.2 creditsper call - POSTTikTok Shop CategoriesPlanned
/v1/run/tiktok-shop.categoriesThe TikTok Shop category tree for a market: top-level categories with ids, names and images, each with its children.Planned - POSTTikTok Shop Creator AnalyticsPlanned
/v1/run/tiktok-shop.creatorAffiliate performance of a TikTok Shop creator: GMV range, promoted products, audience demographics and engagement.Planned
Calling them
Every endpoint on this page is one POST to https://api.primaryapi.com/v1/run/{sku} with your API key and a JSON body. Responses share one envelope, so code written for one endpoint handles the others. For example, tiktok-shop.user_showcase:
curl -sS -X POST "https://api.primaryapi.com/v1/run/tiktok-shop.user_showcase" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handle":"dealswithty"}'const res = await fetch('https://api.primaryapi.com/v1/run/tiktok-shop.user_showcase', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRIMARYAPI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
handle: 'dealswithty',
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.code}: ${body.error}`);
// found:false is a successful answer ("does not exist"), not an error
console.log(body.output.found ? body.output.data : body.output.reason, body.credits);import os
import requests
res = requests.post(
"https://api.primaryapi.com/v1/run/tiktok-shop.user_showcase",
headers={"Authorization": f"Bearer {os.environ['PRIMARYAPI_API_KEY']}"},
json={
"handle": "dealswithty",
},
timeout=60,
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['code']}: {body['error']}")
# found=False is a successful answer ("does not exist"), not an error
print(body["output"]["data"] if body["output"]["found"] else body["output"]["reason"], body["credits"])New to PrimaryAPI? Start with the Quickstart, then read Making requests.