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

# TikTok Shop

> Read a TikTok Shop search page (/k/) as JSON with the tiktok-shop parser. $1 per 1,000 calls. Send the page to scrape. Examples in cURL, TypeScript and Python.

Reads a TikTok Shop search page (/k/), store page (/store/) or product page (/pdp/). Send options view reviews on a product page for its reviews, and returns a list of products as JSON.

## Make a request

Send the page's URL to [scrape](https://docs.stophy.dev/api-reference/endpoint/scrape.md) with a `json` format that names the parser. Get an API key in the [Quickstart](https://docs.stophy.dev/quickstart).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://shop.tiktok.com/us/k/gummies","formats":[{"type":"json","parser":"tiktok-shop"}]}'
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://shop.tiktok.com/us/k/gummies",
    formats: [{ type: "json", parser: "tiktok-shop" }],
  }),
});
console.log(await response.json());
```

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

import requests

response = requests.post(
    "https://api.stophy.dev/v1/scrape",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={
        "url": "https://shop.tiktok.com/us/k/gummies",
        "formats": [{"type": "json", "parser": "tiktok-shop"}],
    },
)
print(response.json())
```

## Read the response

The parser's data is in `data.json`. Its fields include `results`, `cursor`, `page` and `total`. This sample is cut to the first items.

```json theme={null}
{
  "success": true,
  "data": {
    "json": {
      "results": [
        {
          "id": "1729432589178278226",
          "url": "https://shop.tiktok.com/us/pdp/gummies-combo-pack-by-bearvana-womens-fitness-aid-with-herbs/1729432589178278226",
          "title": "BEARVANA Women's 16-Herb Wellness Gummies Combo Pack | Vitamins A C E and B6 | Daily Gummies Worth the Hype | Berry…",
          "brand": null,
          "description": null,
          "price": {
            "amount": 59.99,
            "currency": "USD"
          },
          "originalPrice": null,
          "rating": 4.5,
          "reviewCount": 39182,
          "availability": null,
          "images": [
            "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/f77b653568a4438680b65f19bd753731~tplv-fhlh96ny…"
          ],
          "categories": [],
          "seller": {
            "id": "0",
            "name": "Example user",
            "handle": null,
            "url": null,
            "avatarUrl": null
          },
          "sold": 404309
        }
      ],
      "cursor": "30::1729432589178278226,1732759068244480363,1732805322000928869,1732766556619117362,1729890372836496007,1730206447762903669,1732757985036964658,1731659207048...",
      "page": null,
      "total": null
    }
  }
}
```

## Options

Send options in the `options` object of the `json` format.

| Option | What it does |
| - | - |
| `view` | Picks one of the answers this parser can give: `reviews`. |
| `cursor` | The cursor from the previous response. Send it as is. |

## Price

\$1 per 1,000 calls. See [Pricing](https://docs.stophy.dev/account/pricing.md).

## Limits and errors

* The URL must be a TikTok Shop search page (/k/), store page (/store/) or product page (/pdp/). Send options view reviews on a product page for its reviews. Any other URL fails with `invalidRequest`.
* To read the next page, send the `cursor` from the response as the `cursor` option. Paging needs an API key.
* The answer comes back in `data.json`. If the page cannot be read, the call fails with an error code from [Errors](https://docs.stophy.dev/api-reference/errors.md).

## Related

* [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers) lists every parser.
* [Scrape](https://docs.stophy.dev/scrape/overview) has the options every scrape takes.
* [TikTok video](https://docs.stophy.dev/scrape/prebuilt-parsers/video/tiktok-video.md)
* [TikTok comments](https://docs.stophy.dev/scrape/prebuilt-parsers/video/tiktok-comments.md)
* [TikTok transcript](https://docs.stophy.dev/scrape/prebuilt-parsers/video/tiktok-transcript.md)


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