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

API

Trends (Exploding Topics)

Search exploding product trends, open trend detail pages, and fetch autocomplete suggestions. Same payloads as the dashboard Trends tab and MCP tools. Each call costs 1 API credit with your API key.

Note

Responses are passthrough JSON from Exploding Topics / Algolia. Non-Standard plans may also see trends_searches_remaining on browse (dashboard free-trend counter). Programmatic /api/v1/trends/* still charges the monthly API credit pool on every call.

Search

Browse the feed (no query) or keyword-search (query set). Body field must be query (MCP also accepts anahtar kelime as an alias). Autocomplete uses anahtar kelime.

YAYIN/api/v1/trends/search

Exploding Topics browse feed or keyword search.

Send X-API-Anahtarı on every request.

Body parameters

  • querydize

    Keyword search; omit to browse categories. MCP alias: keyword.

  • offsettamsayı
    Default: 0
  • kategoridize
  • zaman aralığıdize
  • sıralamadize
  • deductdize

    Set to 1 when paginating browse to deduct dashboard trend credits (browser only).

Talep
curl -sS \
  -X POST \
  -H "X-API-Key: $WH_API_KEY" \
  -H "Content-Type: application/json" \
  "{origin}/api/v1/trends/search" \
  -d '{"query":"string","offset":0,"category":"string","timeframe":"string","sorting":"string","deduct":"string"}'
const res = await fetch(`${ORIGIN}/api/v1/trends/search`, {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.WH_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "query": "string",
      "offset": 0,
      "category": "string",
      "timeframe": "string",
      "sorting": "string",
      "deduct": "string"
  }),
});
const data = await res.json();
import os, requests

res = requests.post(
    f"{ORIGIN}/api/v1/trends/search",
    headers={"X-API-Key": os.environ["WH_API_KEY"]},
    json={
        "query": "string",
        "offset": 0,
        "category": "string",
        "timeframe": "string",
        "sorting": "string",
        "deduct": "string"
    },
)
data = res.json()
Yanıt
{
    "total": 5684,
    "result": [
        {
            "keyword": "zokop",
            "path": "zokop",
            "description": "Comprehensive electrical brand offering kitchen appliances and humidifiers.",
            "absolute_volume": 1000,
            "classifications": {
                "3": "regular",
                "6": "exploding",
                "12": "exploding",
                "24": "exploding",
                "60": "exploding"
            },
            "categories": [
                "business",
                "home",
                "ecommerce",
                "retail",
                "kitchen"
            ],
            "date_added": 1591474468,
            "search_history": {
                "last_12_months": [
                    {
                        "value": 200,
                        "time": "1755993600"
                    },
                    {
                        "value": 221,
                        "time": "1756598400"
                    },
                    {
                        "value": 190,
                        "time": "1758412800"
                    }
                ],
                "last_3_months": [
                    {
                        "value": 613,
                        "time": "1779580800"
                    },
                    {
                        "value": 1057,
                        "time": "1782000000"
                    }
                ],
                "growth": {
                    "3": -62,
                    "6": -12,
                    "12": 15,
                    "24": 104,
                    "60": 125,
                    "120": 4400,
                    "180": 4400
                },
                "regressions": {
                    "3": {
                        "gradient": -4.45e-6,
                        "exponent": -1.52e-7,
                        "y_intercept": 7977.98
                    },
                    "12": {
                        "gradient": 8.6e-7,
                        "exponent": 4.2e-8,
                        "y_intercept": -1498.95
                    },
                    "24": {
                        "gradient": 7.19e-7,
                        "exponent": 2.1e-8,
                        "y_intercept": -1225.26
                    }
                }
            }
        }
    ]
}
{
    "message": "No topic found."
}
{
    "success": false,
    "error": "Unauthorized"
}
{
    "success": false,
    "error": "No API credits remaining. Buy an add-on pack or wait until next monthly reset."
}

Browse responses expose topics under result (array) plus total. Keyword search (query set) hits the /topic upstream endpoint and may return a single object under result instead of an array. Unknown keywords return HTTP 200 { "message": "No topic found." } (not an error envelope).

search_history.growth ve search_history.regressions şunlardır objects keyed by month windows ("3", "6", "12", …) — not arrays. last_* series are arrays of { value, time } points (examples above are truncated; live payloads include the full series plus forecasts). Additional keys (channelBreakdown, related_trends, …) may appear. Plan gates return HTTP 200 with { "upgrade": "standard", "message": "…" }.

Detail

YAYIN/api/v1/trends/detail

Full trend detail for a topic path (slug).

Send X-API-Anahtarı on every request.

Body parameters

  • topicdizerequired

    Topic path/slug. Also accepted as slug.

Talep
curl -sS \
  -X POST \
  -H "X-API-Key: $WH_API_KEY" \
  -H "Content-Type: application/json" \
  "{origin}/api/v1/trends/detail" \
  -d '{"topic":"zokop"}'
const res = await fetch(`${ORIGIN}/api/v1/trends/detail`, {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.WH_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "topic": "zokop"
  }),
});
const data = await res.json();
import os, requests

res = requests.post(
    f"{ORIGIN}/api/v1/trends/detail",
    headers={"X-API-Key": os.environ["WH_API_KEY"]},
    json={
        "topic": "zokop"
    },
)
data = res.json()
Yanıt
{
    "result": {
        "keyword": "zokop",
        "path": "zokop",
        "description": "Comprehensive electrical brand offering kitchen appliances and humidifiers.",
        "absolute_volume": 1000,
        "classifications": {
            "3": "regular",
            "6": "exploding",
            "12": "exploding",
            "24": "exploding",
            "60": "exploding"
        },
        "categories": [
            "business",
            "home",
            "ecommerce",
            "retail",
            "kitchen"
        ],
        "date_added": 1591474468,
        "search_history": {
            "last_12_months": [
                {
                    "value": 200,
                    "time": "1755993600"
                },
                {
                    "value": 221,
                    "time": "1756598400"
                }
            ],
            "growth": {
                "3": -62,
                "6": -12,
                "12": 15,
                "24": 104,
                "60": 125,
                "120": 4400,
                "180": 4400
            },
            "regressions": {
                "12": {
                    "gradient": 8.6e-7,
                    "exponent": 4.2e-8,
                    "y_intercept": -1498.95
                },
                "24": {
                    "gradient": 7.19e-7,
                    "exponent": 2.1e-8,
                    "y_intercept": -1225.26
                }
            }
        }
    }
}
{
    "error": "No topic provided"
}

Returns the Exploding Topics payload wrapped under result. Same search_history shape as browse (objects for growth / regressions, not empty arrays). Additional upstream keys may appear. Missing topic getiriler { "error": "No topic provided" }. Non-Standard plans may get { "upgrade": "standard", "message": "…" }.

Autocomplete

YAYIN/api/v1/trends/autocomplete

Fuzzy topic suggestions (Algolia multi-index).

Send X-API-Anahtarı on every request.

Body parameters

  • anahtar kelimedizerequired

    Also accepted as query on the v1 proxy.

Talep
curl -sS \
  -X POST \
  -H "X-API-Key: $WH_API_KEY" \
  -H "Content-Type: application/json" \
  "{origin}/api/v1/trends/autocomplete" \
  -d '{"keyword":"color"}'
const res = await fetch(`${ORIGIN}/api/v1/trends/autocomplete`, {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.WH_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "keyword": "color"
  }),
});
const data = await res.json();
import os, requests

res = requests.post(
    f"{ORIGIN}/api/v1/trends/autocomplete",
    headers={"X-API-Key": os.environ["WH_API_KEY"]},
    json={
        "keyword": "color"
    },
)
data = res.json()
Yanıt
{
    "results": [
        {
            "hits": [
                {
                    "keyword": "colorblock",
                    "topic": "Keyword",
                    "path": "colorblock",
                    "growth": 0.13,
                    "briefDescription": "Fashion and design technique that involves using large, solid blocks of color…"
                }
            ],
            "nbHits": 12,
            "processingTimeMS": 3
        }
    ]
}

Suggestions live in results[0].hits[] — not a top-level hits array. Hit fields come from Algolia (anahtar kelime, path, topic, growth, briefDescription, …). Non-Standard plans may get { "upgrade": "standard", "message": "…" }.

curl -sS -X POST -H "X-API-Key: $WH_API_KEY" -H "Content-Type: application/json" \
  -d '{"query":"matcha"}' \
  "{origin}/api/v1/trends/search"

Session equivalents: POST /search-exploding-topics, POST /get-trend-details, POST /api/trends-fuzzy.