Docs
Ctrl+K Rechercher Alt+[Alt+] Guides
Obtenir une clé API

API · TikTok Shop

TikTok Shop · Suggestions

Autocomplete for TikTok Shop entities — short id + nom rows as the user types. Behavior matches the in-app search bar.

OBTENIR/api/v1/tiktok-shop/suggestions

Typeahead suggestions for categories, shops, creators, products, or videos.

Send Clé X-API on every request.

Query parameters

  • typestringrequired

    Entity type to search.

    Values catégories magasins créateurs produits vidéos
  • qstringrequired

    Partial name match.

  • limiteintegeroptional

    Max suggestions (capped server-side).

    Par défaut 10
Demande
curl -sS \
  -H "X-API-Key: $WH_API_KEY" \
  "{origin}/api/v1/tiktok-shop/suggestions?type=categories&q=fash&limit=10"
const res = await fetch(`${ORIGIN}/api/v1/tiktok-shop/suggestions?type=categories&q=fash&limit=10`, {
  method: 'GET',
  headers: {
    'X-API-Key': process.env.WH_API_KEY,
  },
});
const data = await res.json();
import os, requests

res = requests.get(
    f"{ORIGIN}/api/v1/tiktok-shop/suggestions?type=categories&q=fash&limit=10",
    headers={"X-API-Key": os.environ["WH_API_KEY"]},
)
data = res.json()
Response
{
    "success": true,
    "suggestions": [
        {
            "id": "category_12345",
            "name": "Fashion & Apparel"
        },
        {
            "id": "category_67890",
            "name": "Fitness Equipment"
        }
    ]
}
{
    "success": false,
    "error": "Invalid entity type"
}
{
    "success": false,
    "error": "Internal server error"
}

Notes

  • Matching is a case-insensitive partial match on each entity's primary label (creators match both username and display name).
  • Sorting uses a popularity signal per entity (revenue, followers, views) so common matches surface first.
  • Client UX: debounce ~300ms and wait for ≥2 characters, like the in-app search bar.

See also