TikTok Shop product search API
  1. Docs
  2. TikTok
  3. TikTok Shop product search API

TikTok Shop product search API

Products matching a search, each with price, rating, sold count and shop.

GET /v1/tiktok/shop/search

GET /v1/tiktok/shop/search

Products matching a search, each with price, rating, sold count and shop. Pages of 20 by cursor; TikTok decides how deep a query goes (past 40 results when it has them). US catalogue only.

  • Cost: 1 credit
  • 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
querystringyesSearch terms. Also accepted as keyword, q.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • 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).

1curl -G "https://api.socialscrape.dev/v1/tiktok/shop/search" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "query=water bottle" \4  --data-urlencode "region=US" \5  --data-urlencode "cursor=eyJxIjoid2F0ZXIgYm90dGxlIiwibyI6MjAsInB0IjoiMjAyNjEwMzAwMTUzNTgzOTBGN0E3ODNCMURFNzJGODNGNiJ9"

Example response#

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

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_94b33d5e742bf593d03e2930",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "product",13        "platform": "tiktok",14        "id": "1731932327542428280",15        "url": "https://www.tiktok.com/shop/pdp/wicked-bubble-broomstick-hydration-pearlescent-pink-shimmer/1731932327542428280",16        "title": "Wicked",17        "description": null,18        "price": {19          "amount": 46.98,20          "currency": "USD",21          "original_amount": null,22          "display": "$46.98"23        },24        "seller": {25          "id": "7495318983844203128",26          "handle": null,27          "name": "Owala",28          "url": null,29          "avatar_url": "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/d4da4b135fa745508c3ca9549b2e8920~tplv-fhlh96nyum-resize-png:300:300.png?dr=12184&t=555f072d&ps=933b5bde&shp=905da467&shcp=d9d491bf&idc=useast5&from=2422056039",30          "verified": null31        },32        "rating": 4.8,33        "review_count": 1251,34        "sold_count": 15491,35        "image_urls": [36          "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/d302dcb0442349afa3f89f3241e72a63~tplv-fhlh96nyum-crop-webp:1080:1080.webp?dr=12190&t=555f072d&ps=933b5bde&shp=8dbd94bf&shcp=a6e80448&idc=useast5&from=2378011839"37        ],38        "category": null,39        "in_stock": null,40        "location": null,41        "published_at": null,42        "extra": {43          "brand": "Owala",44          "sku_id": "1731932327605015160"45        }46      },47      {48        "object": "product",49        "platform": "tiktok",50        "id": "1729403902741811222",51        "url": "https://www.tiktok.com/shop/pdp/water-bottle-sol-and-selene-stainless-steel-bpa-free-3-x-10-4/1729403902741811222",52        "title": "Water Bottle Water Bottle",53        "description": null,54        "price": {55          "amount": 14.99,56          "currency": "USD",57          "original_amount": null,58          "display": "$14.99"59        },60        "seller": {61          "id": "7495197880337991702",62          "handle": null,63          "name": "Sol and Selene",64          "url": null,65          "avatar_url": "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/owbkODtGUen2pzGDbK8SjIAUDyA8QjCfZNASOD~tplv-fhlh96nyum-resize-png:300:300.png?dr=12184&t=555f072d&ps=933b5bde&shp=905da467&shcp=d9d491bf&idc=useast5&from=2422056039",66          "verified": null67        },68        "rating": 4.8,69        "review_count": 4,70        "sold_count": 40,71        "image_urls": [72          "https://p16-oec-general-useast5.ttcdn-us.com/tos-useast5-i-omjb5zjo8w-tx/40c6aab88cc7403aab5475380ae3194b~tplv-fhlh96nyum-crop-webp:2000:2000.webp?dr=12190&t=555f072d&ps=933b5bde&shp=8dbd94bf&shcp=a6e80448&idc=useast5&from=2378011839"73        ],74        "category": null,75        "in_stock": null,76        "location": null,77        "published_at": null,78        "extra": {79          "brand": "Sol and Selene",80          "labels": [81            "Free shipping"82          ],83          "sku_id": "1729403902741876758"84        }85      }86    ],87    "cursor": null,88    "has_more": false,89    "parent": null90  },91  "cursor": null,92  "has_more": false93}

Response#

A list of Product objects in data.items, with data.cursor and data.has_more.

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.
not_found404noThe platform says this profile, post or item does not exist.

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