> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# TikTok Shop Data Scraper

Structured TikTok data: every input is optional. Cursor-paginated, 1 credit per successful call.

`GET|POST https://api.scrapier.io/api/v2/tiktok-shop-data-scraper/` · 1 credit per successful call · Cursor-paginated

## Overview

Call `GET /api/v2/tiktok-shop-data-scraper/`. The results are in `data.products`; send `data.next_cursor` back as `cursor` to get the next page. 7 optional parameters refine the call (see Parameters).

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/tiktok-shop-data-scraper/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/tiktok-shop-data-scraper/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["products"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

> **Note:** No parameter is strictly required, but send at least the inputs shown in the example.

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `queries` | string | no | `shoes` | TikTok Shop product search keyword (keyword mode). Required first call unless a url is given. Aliases: searchKeywords, query, q. |
| `urls` | string | no | — | Product /pdp/, category /c/, or seller /store/ URL (URL mode — takes precedence over queries). Aliases: startUrls. |
| `cursor` | string | no | — | Pagination cursor returned in the previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When `next_cursor` is null, you have reached the last page. |
| `include_reviews` | boolean | no | `false` | Fetch embedded product reviews. Locked in cursor. |
| `max_details` | integer | no | `4` | Products per call that get the full product-page enrichment (creators, stock, reviews); the rest are returned from listing data (source="listing"). Each enriched product costs ~65 KB of proxy traffic. 0 = listing only; raise (e.g. 100) to enrich everything. Defaults to all when include_reviews is true. |
| `max_reviews` | integer | no | `10` | Max reviews per product (1-100). Locked in cursor. |
| `sort_by_sold_count` | string | no | `none` | none \| highest_first \| lowest_first. One of: `none`, `highest_first`, `lowest_first`. Locked in cursor. |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under `raw_responses`, in place of the formatted items. When false (default) you get the formatted output. Pagination (`cursor` / `next_cursor`) works the same in both modes. |

## Response

HTTP 200. Results are in `data.products`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "queries": "shoes",
    "page": 1,
    "page_size": 20,
    "products": [
      {
        "product_id": "1732119583850205647",
        "title": "Women's Low-Top Sports Shoes, Lightweight Breathable Thick Sole",
        "url": "https://shop.tiktok.com/us/pdp/1732119583850205647",
        "price": 36.27,
        "currency": "USD",
        "rating": 4.7,
        "review_count": 193,
        "seller_id": "8652615273335460303",
        "seller_name": "Juyu Footwear",
        "sold_count": 2585,
        "is_sold_out": false,
        "creator_count": 17,
        "has_creator_data": true,
        "total_creator_videos": 20,
        "scraped_at": "2026-06-18T12:00:00.000Z",
        "source": "product_page"
      }
    ],
    "next_cursor": "eyJpIjoic2hvZXMiLCJrIjoicSIsImxrIjp7fSwibyI6MjAsInAiOjIsInMiOiIiLCJ0IjoiMjAyNjEwMDEwOTA2MjA5NUI1QjcxRDY0RjE2NzMzODM1OCJ9"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `queries` | string | `shoes` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `20` |  |
| `products` | array | `[1 item]` | The results. |
| `next_cursor` | string | `eyJpIjoic2hvZXMiLCJrIjoicSIsImxrIjp7fSwibyI6M…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `products[].product_id` | string | `1732119583850205647` |  |
| `products[].title` | string | `Women's Low-Top Sports Shoes, Lightweight Bre…` |  |
| `products[].url` | string | `https://shop.tiktok.com/us/pdp/17321195838502…` |  |
| `products[].price` | number | `36.27` |  |
| `products[].currency` | string | `USD` |  |
| `products[].rating` | number | `4.7` |  |
| `products[].review_count` | integer | `193` |  |
| `products[].seller_id` | string | `8652615273335460303` |  |
| `products[].seller_name` | string | `Juyu Footwear` |  |
| `products[].sold_count` | integer | `2585` |  |
| `products[].is_sold_out` | boolean | `false` |  |
| `products[].creator_count` | integer | `17` |  |
| `products[].has_creator_data` | boolean | `true` |  |
| `products[].total_creator_videos` | integer | `20` |  |
| `products[].scraped_at` | string | `2026-06-18T12:00:00.000Z` |  |
| `products[].source` | string | `product_page` |  |

## Pagination

Pass `data.next_cursor` back as `cursor` until it is `null`. Required inputs are ignored once a cursor is sent. Each page is one billed call.

```python
import requests

URL = "https://api.scrapier.io/api/v2/tiktok-shop-data-scraper/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.extend(data.get("products") or [])
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Locked into the cursor: `include_reviews`, `max_reviews`, `sort_by_sold_count`. Set them on the first call; later pages reuse them.

## Related

- [TikTok Ad Library Leads](https://docs.scrapier.io/api-reference/tiktok/tiktok-ad-library-leads.md): Structured TikTok data: every input is optional. Single lookup, 3 credits per successful call.
- [TikTok Ad Library](https://docs.scrapier.io/api-reference/tiktok/tiktok-ads.md): Structured TikTok data: send `urls`. Cursor-paginated, 1 credit per successful call.
- [TikTok Ads Top](https://docs.scrapier.io/api-reference/tiktok/tiktok-ads-top.md): Structured TikTok data: every input is optional. Cursor-paginated, 1 credit per successful call.
- [TikTok Collection Videos](https://docs.scrapier.io/api-reference/tiktok/tiktok-collection-videos.md): Structured TikTok data: send `urls`. Cursor-paginated, 1 credit per successful call.
