# 熱門內容介面

> 4 個平台的 4 個介面，用同一個 Post 物件返回熱門內容。平台此刻排在熱門或趨勢榜上的內容，從最熱開始，每條帶文案、作者和互動資料。每次 $0.002 到 $0.04，各介面按自己的價格計費。

網頁版：https://okdata.online/zh-hant/roles/posts-trending/

## 各平台介面

| 平台 | 介面 | 路徑 | 每頁 | 價格 |
|---|---|---|---|---|
| Reddit | [Reddit 熱門帖子](https://okdata.online/zh/apis/reddit/popular/posts/list/) | `GET /v1/reddit/popular/posts/list` | 10 | $0.002/次 · 每頁約 10 條帖子 |
| 抖音 | [抖音影片榜](https://okdata.online/zh/apis/douyin/videos/trending/) | `GET /v1/douyin/videos/trending` | 9 | $0.002/次 · 每頁約 9 條影片 |
| 小紅書 | [小紅書蒲公英內容廣場熱門筆記](https://okdata.online/zh/apis/xiaohongshu/pgy/notes/trending/) | `GET /v1/xiaohongshu/pgy/notes/trending` | 34 | $0.04/次 · 每頁約 34 篇筆記 |
| B站 | [B站綜合熱門](https://okdata.online/zh/apis/bilibili/videos/trending/) | `GET /v1/bilibili/videos/trending` | 20 | $0.002/次 · 每頁約 20 條影片 |

## 返回的物件：[Post](https://okdata.online/zh/docs/objects/post/)

上面每個介面返回的欄位名和型別都一樣。平台不展示的欄位返回 null，並在 meta.unavailable 裡註明。

| 欄位 | 型別 | 含義 |
|---|---|---|
| `id` | `string` | 內容在平台上的 ID。 |
| `url` | `string` | 內容連結。 |
| `type` | `string` | 內容型別。 |
| `title` | `string \| null` | 標題（影片、筆記、文章才有）。 |
| `text` | `string` | 文案、正文或簡介，純文本；文章為 Markdown。 |
| `lang` | `string \| null` | 語言程式碼，平台給出或檢測得到。 |
| `published_at` | `string \| null` | 釋出時間，ISO 8601，UTC；只有平台不給時間（wechat_mp.articles.metrics、wechat_channels.videos.metrics、youtube.channels.videos.list 取 Shorts 時）或某次回答裡缺了時間（youtube.videos.get 偶爾會）時為 null，並列在 meta.unavailable 裡。不會是空字串。 |
| `author` | `AccountRef` | 釋出者。 |
| `metrics` | `Metrics` | 抓取時的資料；平台不公開的為 null。 |
| `images` | `string[] \| null` | 圖文內容的圖片地址。 |
| `hashtags` | `string[] \| null` | 話題標籤，不帶 #。 |
| `ext` | `object` | 平台特有欄位，只在 view=full 時返回。 |

## 兩個平台上的同一個呼叫

引數一樣、翻頁方式一樣、返回結構一樣，只換路徑。

```bash
# Reddit
curl "https://api.okdata.online/v1/reddit/popular/posts/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY"

# 抖音
curl "https://api.okdata.online/v1/douyin/videos/trending" \
  -H "Authorization: Bearer $OKDATA_API_KEY"
```

## 常見用途

- 看今天哪些內容正在起量，而不只是哪些話題。
- 每小時存一次熱門流，研究什麼樣的內容能上去。
- 讓 AI 先讀今天的熱門內容，再出選題。

## 常見問題

### 和熱榜有什麼區別？

熱榜列的是話題或搜尋詞和排名。這個介面返回的是內容本身，帶文案和互動資料，你看到的是真正在火的內容，不用從一個關鍵詞去猜。

### 能看昨天的熱門嗎？

不能。每次呼叫返回的都是榜單當下的樣子，即使這個榜本身統計的是最近幾天。想留歷史，就定時呼叫，把每次結果連同讀取時間存下來。

### 哪些平台有？

只有公開了熱門流的平台才可能有，介面按平台逐個上線。現在能呼叫的都列在上面的表裡。

## 其他資料型別

- [評論介面](https://okdata.online/zh/roles/posts-comments-list/)
- [熱榜介面](https://okdata.online/zh/roles/trends-list/)
- [評論回覆介面](https://okdata.online/zh/roles/comments-replies-list/)
- [話題內容介面](https://okdata.online/zh/roles/topics-posts-list/)
- [帳號資訊介面](https://okdata.online/zh/roles/accounts-get/)
- [帳號作品列表介面](https://okdata.online/zh/roles/accounts-posts-list/)
- [內容詳情介面](https://okdata.online/zh/roles/posts-get/)
- [內容搜尋介面](https://okdata.online/zh/roles/posts-search/)
- [帳號搜尋介面](https://okdata.online/zh/roles/accounts-search/)
- [內容資料介面](https://okdata.online/zh/roles/posts-metrics/)
- [社群帖子介面](https://okdata.online/zh/roles/communities-posts-list/)
- [廣告詳情介面](https://okdata.online/zh/roles/ads-get/)
- [廣告主廣告列表介面](https://okdata.online/zh/roles/advertisers-ads-list/)
- [廣告搜尋介面](https://okdata.online/zh/roles/ads-search/)
- [字幕介面](https://okdata.online/zh/roles/transcripts-get/)
- [粉絲列表介面](https://okdata.online/zh/roles/accounts-followers-list/)
- [商品詳情介面](https://okdata.online/zh/roles/products-get/)
- [商品評價介面](https://okdata.online/zh/roles/products-reviews-list/)
- [商品搜尋介面](https://okdata.online/zh/roles/products-search/)
- [達人搜尋介面](https://okdata.online/zh/roles/creators-search/)
- [達人詳情介面](https://okdata.online/zh/roles/creators-get/)
- [達人粉絲畫像介面](https://okdata.online/zh/roles/creators-audience-get/)
