# TikTok 趋势话题榜 API (tiktok.trending_hashtags)

- Canonical page: https://everyinfra.com/tiktok-api/trending_hashtags
- Endpoint: POST /api/v1/social with {"platform": "tiktok", "action": "trending_hashtags", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: list, one page of 20 per call (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

TikTok 趋势话题榜按国家、行业和统计时段给出热门话题，每个话题带 `rank` 名次、`hashtag_name`、视频数、播放数和每天热度曲线 `trend`。它回答「这个行业最近在冒什么话题」，适合选话题标签、排内容计划，或者给广告投放挑跟得上的热点。

不传任何参数，读到的就是美国、全部行业、近 7 天的榜。榜单每页固定 20 个，整榜 100 个。要按关键词找话题，用话题搜索那一页，榜单本身不接受关键词；话题搜索多一个简介字段，榜单里没有。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=tiktok&action=trending_hashtags

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| country | not declared | no | not declared | 国家代码，默认 US。有榜的：AE AR AU BR CA CO DE EG ES FR GB ID IL IT JP KR MX MY PH SA SG TH TR TW US VN ZA；别的会在扣费前被拒。 |
| industry | enum: apparel / appliances / apps / baby / beauty / business_services / education / finance / food / games / health / home_improvement / household / life_services / news_entertainment / pets / sports / tech / travel / vehicles | no | not declared | 只看一个行业的话题：education、vehicles、baby、finance、beauty、tech、appliances、travel、household、pets、apps、home_improvement、apparel、news_entertainment、business_services、games、life_services、food、sports、health；不传看全部。 |
| page_token | not declared | no | not declared | 翻页令牌：把上一次响应里的 next_page_token 原样传回，拿下一页；不传从第一页开始。令牌 24 小时有效，每页算一次调用。每页 20 个，整榜 100 个。 |
| time_window | enum: 30d / 7d / 90d | no | not declared | 统计时段：7d（默认）、30d、90d。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | 名次，从 1 起（music_chart / shop_hot_products）。 |
| hashtag_id | 话题 ID（hashtag_search、trending_hashtags）。 |
| hashtag_name | 话题名，不带 #（hashtag_search、trending_hashtags）。 |
| url | 该记录在原平台上的可访问链接。 |
| video_count | 视频数。 |
| view_count | 浏览/播放数。null 表示不公开，不等于 0。 |
| trend | 这段时间里每天的热度（trending_hashtags）：[{date, value}]，value 0–100，最热那天是 100。 |
| next_page_token | platform-native meaning |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "tiktok",
  "action": "trending_hashtags",
  "params": {}
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "tiktok",
        "action": "trending_hashtags",
        "params": {},
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "tiktok",
  "action": "trending_hashtags",
  "results": [
    {
      "rank": …,
      "hashtag_id": …,
      "hashtag_name": …,
      "url": …,
      "video_count": …,
      "view_count": …,
      "trend": …,
      "next_page_token": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `trend` 里每天的数值是播放量吗？

不是。`trend` 是这段时间里每天的热度，数值在 0 到 100 之间，最热的那天是 100，描述的是单个话题自己的起落。比较不同话题的体量，要看 `video_count` 和 `view_count`。

### 整张榜怎么读完？

每页固定 20 个，整榜 100 个，最后一页可能更少。翻页令牌 24 小时有效，每页算一次调用；换了 `country`、`industry` 或 `time_window`，就是另一张榜，要从第一页重新读。

### `country`、`industry` 和 `time_window` 怎么搭配？

三个都是可选的：`country` 默认美国，`time_window` 默认 `7d`，可改 `30d` 或 `90d`，`industry` 不传看全部行业，传 `beauty`、`food` 这类取值只看一个行业。想看英国美妆近一个月的话题，就把 `country` 设成英国的国家代码，`industry` 设成 `beauty`，`time_window` 设成 `30d`。不在支持列表里的国家会在扣费前被拒。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=tiktok
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
