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_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search 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:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.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"1import os2import requests34params = {5 "query": "water bottle",6 "region": "US",7 "cursor": "eyJxIjoid2F0ZXIgYm90dGxlIiwibyI6MjAsInB0IjoiMjAyNjEwMzAwMTUzNTgzOTBGN0E3ODNCMURFNzJGODNGNiJ9",8}9res = requests.get(10 "https://api.socialscrape.dev/v1/tiktok/shop/search",11 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},12 params=params,13)14body = res.json()1516if body["ok"]:17 print(body["data"])18else:19 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/tiktok/shop/search");2url.search = new URLSearchParams({3 "query": "water bottle",4 "region": "US",5 "cursor": "eyJxIjoid2F0ZXIgYm90dGxlIiwibyI6MjAsInB0IjoiMjAyNjEwMzAwMTUzNTgzOTBGN0E3ODNCMURFNzJGODNGNiJ9"6}).toString();7const res = await fetch(url, {8 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },9});10const body = await res.json();1112if (body.ok) {13 console.log(body.data);14} else {15 console.error(body.error.code, body.error.message);16}1{2 "nodes": [3 {4 "name": "SocialScrape TikTok Shop product search",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/tiktok/shop/search",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "query",19 "value": "water bottle"20 },21 {22 "name": "region",23 "value": "US"24 },25 {26 "name": "cursor",27 "value": "eyJxIjoid2F0ZXIgYm90dGxlIiwibyI6MjAsInB0IjoiMjAyNjEwMzAwMTUzNTgzOTBGN0E3ODNCMURFNzJGODNGNiJ9"28 }29 ]30 },31 "sendHeaders": true,32 "headerParameters": {33 "parameters": [34 {35 "name": "x-api-key",36 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"37 }38 ]39 }40 }41 }42 ],43 "connections": {}44}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
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.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
not_found | 404 | no | The 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.
Related endpoints#
- TikTok profile (
GET /v1/tiktok/profile) - TikTok profile videos (
GET /v1/tiktok/profile/videos) - TikTok collection videos (
GET /v1/tiktok/collection/videos) - TikTok video details (
GET /v1/tiktok/video) - TikTok video transcript (
GET /v1/tiktok/video/transcript) - TikTok video comments (
GET /v1/tiktok/video/comments) - TikTok comment replies (
GET /v1/tiktok/video/comment/replies) - TikTok user search (
GET /v1/tiktok/search/users)