Belgeler
Ctrl+K Arama Alt+[Alt+] Kılavuzlar
API anahtarını al

API · TikTok Mağazası

TikTok Shop · Suggestions

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

AL/api/v1/tiktok-shop/suggestions

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

Send X-API-Anahtarı on every request.

Query parameters

  • türdizerequired

    Entity type to search.

    Values kategoriler mağazalar yaratıcılar ürünler videolar
  • qdizerequired

    Partial name match.

  • sınırtamsayıoptional

    Max suggestions (capped server-side).

    Varsayılan 10
Talep
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()
Yanıt
{
    "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"
}

Not

  • 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