Docs menu

TikTok Shop product details

Beta GET /v1/tiktok/shop/product

GET /v1/tiktok/shop/product

One product with its SKUs and stock levels (in extra), rating, rating spread, specifications and shipping. US catalogue only. TikTok sometimes treats an exit as a crawler; the request is retried on fresh exits and answers upstream_blocked (free) if all three are refused.

  • Cost: 1 credit
  • Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
urlURLone ofProduct URL (tiktok.com/shop/pdp/...). Accepted hosts: tiktok.com.
idstringone ofProduct id. Also accepted as product_id.

Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.

Every request also accepts:

  • region: two-letter country code for results that vary by country. Changing it restarts the cursor chain.
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

curl
curl -G "https://api.socialscrape.io/v1/tiktok/shop/product" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "id=1729527313880355335"
Python
import os
import requests

params = {
    "id": "1729527313880355335",
}
res = requests.get(
    "https://api.socialscrape.io/v1/tiktok/shop/product",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/tiktok/shop/product");
url.search = new URLSearchParams({
  "id": "1729527313880355335"
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape TikTok Shop product details",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/tiktok/shop/product",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "id",
              "value": "1729527313880355335"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_ee8d4bff7a7b3f76c6babad5",
  "data": {
    "object": "product",
    "platform": "tiktok",
    "id": "1729527313880355335",
    "url": "https://www.tiktok.com/shop/pdp/ashwagandha-gummies-by-goli-ksm-66-mixed-berry-vegan-non-gmo/1729527313880355335",
    "title": "Goli Ashwagandha & Vitamin D Gummy - Mixed Berry, KSM-66, Vegan, Plant Based, Non-GMO, Gluten-Free & Gelatin Free. America's #1 Ashwagandha Brand",
    "description": "Goli Nutrition has sold over 90 Million bottles of gummy vitamins.\nVegan, Non-GMO, Gluten-free & Gelatin-free: Each bottle of Goli contains 60 delicious, vegan, non-gmo, gluten-free & gelatin-free Apple Cider Vinegar gummies, which makes th...",
    "price": {
      "amount": 19.47,
      "currency": "USD",
      "original_amount": 24.7,
      "display": "$19.47"
    },
    "seller": {
      "id": "7495794203056835079",
      "handle": null,
      "name": "Goli Nutrition",
      "url": "https://shop.tiktok.com/us/store/goli-nutrition/7495794203056835079",
      "avatar_url": "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/e7478d3e93d4487a9e772fa74e10f506~tplv-fhlh96nyum-resize-png:300:300.png?dr=12184&t=555f072d&ps=933b5bde&shp=905da467&shcp=6ce186a1&idc=useast5&from=2422056039",
      "verified": null
    },
    "rating": 4.5,
    "review_count": 94470,
    "sold_count": 1306215,
    "image_urls": [
      "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/2bc69aa9f6084480beee1bb4a8db3a69~tplv-fhlh96nyum-crop-webp:800:800.webp?dr=12190&t=555f072d&ps=933b5bde&shp=c940a200&shcp=9b759fb9&idc=useast5&from=3376456192",
      "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/e55105f652d84992807aefb34664bb00~tplv-fhlh96nyum-crop-webp:800:800.webp?dr=12190&t=555f072d&ps=933b5bde&shp=c940a200&shcp=9b759fb9&idc=useast5&from=3376456192",
      "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/f1fb81b18a5d4f88bb70c8a72e466d02~tplv-fhlh96nyum-crop-webp:800:800.webp?dr=12190&t=555f072d&ps=933b5bde&shp=c940a200&shcp=9b759fb9&idc=useast5&from=3376456192"
    ],
    "category": "Vitamins Supplements",
    "in_stock": true,
    "location": null,
    "published_at": null,
    "extra": {
      "categories": [
        {
          "id": "700645",
          "level": 1,
          "name": "Health"
        },
        {
          "id": "700646",
          "level": 2,
          "name": "Nutrition & Wellness"
        },
        {
          "id": "700650",
          "level": 3,
          "name": "Vitamins, Minerals & Wellness Supplements"
        }
      ],
      "default_sku_id": "1729527298861535751",
      "free_shipping": true,
      "rating_distribution": {
        "1": 5782,
        "2": 1511,
        "3": 3736,
        "4": 7816,
        "5": 75625
      },
      "seller_followers": 601537,
      "seller_product_count": 53,
      "seller_rating": 4.6,
      "seller_sold_count": 5808324,
      "shipping_days": {
        "max": 8,
        "min": 5
      },
      "skus": [
        {
          "id": "1729527298861535751",
          "options": {
            "Size": "1 Bottle"
          },
          "original_price": 24.7,
          "price": 19.47,
          "purchase_limit": 200,
          "stock": 328955
        }
      ],
      "specifications": {
        "Age warning": "No",
        "Brand": "Goli",
        "Container type": "Bottle",
        "Dietary supplement disclaimer": "Yes",
        "Flavor": "Berry",
        "Ingredients": "Goli Nutrition Ashwagandha Gummies Relax, Restore and Unwind, Mixed Berry Flavor, Vegan, Plant Based, Non GMO, Gluten Free and Gelatin Free",
        "Manufacturer": "Goli Nutrition Inc",
        "Product form": "Gummy",
        "Region of origin": "US"
      },
      "total_stock": 328955,
      "variants": [
        {
          "name": "Size",
          "values": [
            "1 Bottle"
          ]
        }
      ]
    }
  },
  "cursor": null,
  "has_more": null
}

Response#

A Product object in data.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe platform says this profile, post or item does not exist.
upstream_blocked503yesThe platform blocked this fetch; retry (a fresh exit is used).

Every request can also fail with the account and platform errors listed on the Errors page.

Example error:

{
  "ok": false,
  "error": {
    "code": "upstream_blocked",
    "message": "The platform blocked this fetch; retry (a fresh exit is used).",
    "retryable": true
  },
  "credits_charged": 0,
  "request_id": "req_faeda5ba8140c1c4f679f436"
}

Also served at#

These paths answer the same request, so code written for other APIs keeps working: /v1/tiktok/product. See Switching from ScrapeCreators.