# TikTok Shop

Search TikTok Shop by keyword and extract product listings — title, price, discount, seller, rating, sold count, promo labels, full description, and every variant with its stock and inventory.

**Pricing:** $15 / 1k products

**Endpoint:** `POST /api/v1/agents/tiktok/shop/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `keywords` | array | Yes | Product search queries to run on TikTok Shop (e.g. phone case, wireless earbuds). One per line; each keyword is searched independently. |
| `productsPerSearch` | integer | No | Maximum number of products to collect per keyword. |

## Example

```bash
curl -X POST https://api.mindcase.co/api/v1/agents/tiktok/shop/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"keywords":["..."]}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/tiktok/shop/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "keywords": [
        "..."
    ]
}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/api/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display 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 |
