# TikTok Shop Store Products (`tiktok-shop.shop_products`)

Products listed by one TikTok Shop store, with price, discount, rating and units sold per product plus store-level stats.

Docs: https://primaryapi.com/docs/api-reference/tiktok-shop/shop_products

- Endpoint: `POST https://api.primaryapi.com/v1/run/tiktok-shop.shop_products`
- Category: E-commerce · Platform: `tiktok-shop` · Kind: list · Status: live
- Price: 2 credits per call; up to 50 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=tiktok-shop.shop_products`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `url` | string | yes |  | max 2048 chars; format: uri | TikTok Shop store URL, e.g. https://www.tiktok.com/shop/store/<slug>/<seller id>. |
| `sortBy` | enum | no | "top" | one of: top, new_releases | Product ordering: best sellers (top) or newest (new_releases). |
| `region` | string | no | "US" | pattern: ^[A-Za-z]{2}$ | Two-letter code of the store's market (default US). |
| `limit` | integer | no | 20 | 1–50 | Maximum number of results to return (1-50, default 20). |
| `cursor` | string | no |  |  | Opaque pagination cursor: pass the previous response's nextCursor. |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `products` | object[] |  |
| `products[].productId` | string |  |
| `products[].title` | string \| null |  |
| `products[].image` | string \| null | Main image URL |
| `products[].price` | number \| null | Sale price in `currency` |
| `products[].originalPrice` | number \| null | List price before discount |
| `products[].discountPct` | number \| null | Discount in percent (0-100) |
| `products[].currency` | string \| null | ISO currency code |
| `products[].rating` | number \| null | Average rating (0-5) |
| `products[].reviewCount` | integer \| null |  |
| `products[].soldCount` | integer \| null | Units sold as displayed by TikTok Shop |
| `products[].sellerId` | string \| null |  |
| `products[].shopName` | string \| null |  |
| `products[].url` | string \| null | Product page URL |
| `shopName` | string \| null |  |
| `shopRating` | number \| null |  |
| `sellerId` | string \| null |  |
| `productCount` | integer \| null | Products on sale in the store |
| `hasMore` | boolean \| null |  |
| `nextCursor` | string \| null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

Pagination: pass the previous response’s `nextCursor` as `cursor` to get the next page; `nextCursor: null` means there are no more results.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/tiktok-shop.shop_products" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079"}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "products": [
        {
          "productId": "string",
          "title": "string",
          "image": "string",
          "price": 0,
          "originalPrice": 0,
          "discountPct": 0,
          "currency": "string",
          "rating": 0,
          "reviewCount": 0,
          "soldCount": 0,
          "sellerId": "string",
          "shopName": "string",
          "url": "https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079"
        }
      ],
      "shopName": "string",
      "shopRating": 0,
      "sellerId": "string",
      "productCount": 0,
      "hasMore": true,
      "nextCursor": null
    }
  },
  "provider": "PrimaryAPI",
  "credits": 2,
  "items": 1,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
  "nextCursor": null
}
```

## Pricing and reliability

- Usual price: 2 credits per call
- Price ceiling: up to 50 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=tiktok-shop.shop_products`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

A cursor resumes only on the source that issued it.

