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

API

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. Empty / missing returns an empty list (HTTP 200).

  • sınırtamsayı

    Max suggestions (clamped 1–20).

    Default: 10
  • ülkedize

    Marketplace country.

    Default: ABD
Talep
curl -sS \
  -H "X-API-Key: $WH_API_KEY" \
  "{origin}/api/v1/tiktok-shop/suggestions?type=categories&q=fash&limit=10&country=US"
const res = await fetch(`${ORIGIN}/api/v1/tiktok-shop/suggestions?type=categories&q=fash&limit=10&country=US`, {
  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&country=US",
    headers={"X-API-Key": os.environ["WH_API_KEY"]},
)
data = res.json()
Yanıt
{
    "success": true,
    "suggestions": [
        {
            "id": "1731653649643835712",
            "name": "SHOELADA SHOE CARE KIT…",
            "image": "https://media.winninghunter.com/tiktok-shop/products/…webp"
        },
        {
            "id": "1732223284393448401",
            "name": "20 Pack Clear Shoe Slots…",
            "image": "https://media.winninghunter.com/tiktok-shop/products/…webp"
        }
    ]
}
{
    "success": false,
    "error": "Invalid entity type. Must be one of: categories, shops, creators, products, videos"
}
{
    "success": false,
    "error": "Unauthorized"
}
{
    "success": false,
    "error": "Rate limit exceeded. Max 60 requests per minute."
}
{
    "success": false,
    "error": "Failed to fetch suggestions from API",
    "suggestions": []
}

On HTTP 500, the hata string is the upstream exception message and may differ from the sample above.

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.
  • Still costs 1 programmatic API credit per call (proxy metering), even when öneriler is empty.

See also