> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# TikTok Shop API

> TikTok Shop products by keyword: title, price, discount, seller, rating, sold count, promo labels, description, and every variant with its stock.

`POST /v1/data/tiktok/shop/run`

**Pricing:** $0.01 per product ($15.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**keywords** `string` *required*

Product search query to run on TikTok Shop (e.g. phone case, wireless earbuds).

**productsPerSearch** `integer`

Number of products to return. Use 0 for all. Capped at 10,000 per search.

Min `1`; max `10000`.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/tiktok/shop/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "keywords": "phone case",
    "productsPerSearch": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/tiktok/shop/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "keywords": "phone case",
    "productsPerSearch": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/tiktok/shop/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "keywords": "phone case",
  "productsPerSearch": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one product, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `title` | Title | text |
| `productUrl` | Product URL | url |
| `image` | Image | image |
| `seller` | Seller | object |
| `salePrice` | Sale Price | number |
| `originalPrice` | Original Price | number |
| `discount` | Discount % | number |
| `currency` | Currency | text |
| `rating` | Rating | number |
| `reviewCount` | Review Count | number |
| `soldCount` | Sold Count | number |
| `labels` | Labels | array |
| `description` | Description | text |
| `variants` | Variants | object\_array |
| `productId` | Product ID | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "tiktok/shop",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "salePrice": 20,
      "rating": null,
      "productId": "1731987113638072822",
      "variants": [
        {
          "variant": "Color: any color gems, Size: any phone size",
          "inStock": true,
          "quantity": 20,
          "salePrice": 20,
          "originalPrice": null,
          "discount": null,
          "variantId": "1731987120486257142"
        }
      ],
      "reviewCount": null,
      "soldCount": 0,
      "seller": {
        "id": "7496085867160504822",
        "name": "jaidaalize",
        "logo": "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/587383daaf8a4eaaa4dfb4c8f2b5944f~tplv-fhlh96nyum-resize-png:300:300.png?dr=12184&t=5..."
      },
      "description": "pink and white junk phone case ",
      "labels": [],
      "title": "junk phone case",
      "productUrl": "https://shop.tiktok.com/us/pdp/pink-white-junk-phone-case-stylish-protective-cover/1731987113638072822",
      "originalPrice": null,
      "image": "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/94fdba7fde2e4228816fc2f6a1a9705b~tplv-fhlh96nyum-crop-webp:1290:1290.webp?dr=12190&t...",
      "currency": "USD",
      "discount": null
    }
  ]
}
```

## Related APIs

For one shop's catalogue use [`tiktok-shop/storefronts`](https://docs.mindcase.co/apis/tiktok-shop/storefronts); for review text use [`tiktok-shop/reviews`](https://docs.mindcase.co/apis/tiktok-shop/reviews).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.