# 把一個博主的全部歷史作品拉下來要多少錢？

> 抖音、小紅書、X、微信公眾號一個帳號全量回溯的費用：每頁多少條、每頁多少錢，附一段邊拉邊存、中斷後重跑不重複扣費的指令碼。

網頁版：https://okdata.online/zh-hant/answers/creator-post-history-backfill-cost/

**簡短回答：**在 okdata 上回溯一個帳號，按作品列表的頁數計費。600 條影片的抖音博主是 30 頁，$0.06；600 篇小紅書筆記 $0.90；600 條 X 帖子 $0.06。有 600 篇文章的公眾號每頁 10 篇，要 60 頁，$1.20。

做競品復盤，第一步往往是把對方帳號從開號到現在發過的東西全拉一遍，看哪幾條爆了。做法就是沿著帳號的作品列表從新往舊翻，一頁一次呼叫。費用等於頁數乘以每頁價格，頁數等於作品數除以每頁條數。

## 按帳號規模算

| 平台 | 介面 | 每頁條數 | 600 條 | 3000 條 |
|---|---|---|---|---|
| 抖音 | [抖音帳號作品列表](/zh/apis/douyin/users/videos/list/) | 20 | $0.06 | $0.30 |
| 小紅書 | [小紅書博主筆記列表](/zh/apis/xiaohongshu/users/notes/list/) | 20 | $0.90 | $4.50 |
| X | [X 帳號帖子列表](/zh/apis/x/users/posts/list/) | 20 | $0.06 | $0.30 |
| 微信公眾號 | [公眾號歷史文章](/zh/apis/wechat_mp/accounts/articles/list/) | 10 | $1.20 | $6.00 |

列表裡每一條已經帶正文、釋出時間和互動資料，回溯時基本不用再逐條查詳情。公眾號要先拿到原始 ID，用一次[公眾號搜尋](/zh/apis/wechat_mp/accounts/search/)，按返回的帳號數計費，每個 $0.058。

## 中斷了也不白花錢

每拉到一頁就落盤，並且用帳號和 cursor 算出這一頁的 `Idempotency-Key`。指令碼中途掛了，24 小時內重跑，已經付過錢的頁會從存檔直接返回，不再扣費。

```python
import hashlib, json, os, requests

URL = "https://api.okdata.online/v1/douyin/users/videos/list"
KEY = os.environ["OKDATA_API_KEY"]

def backfill(sec_uid, path):
    cursor = None
    with open(path, "w", encoding="utf-8") as out:
        while True:
            page_key = hashlib.sha256(f"{sec_uid}|{cursor}".encode()).hexdigest()
            h = {"Authorization": f"Bearer {KEY}", "Idempotency-Key": page_key}
            params = {"id": sec_uid, **({"cursor": cursor} if cursor else {})}
            body = requests.get(URL, headers=h, params=params, timeout=60).json()
            if body["code"] != "ok":
                raise RuntimeError(f"{body['code']}: {body['message']}")
            for post in body["data"]["items"]:
                out.write(json.dumps(post, ensure_ascii=False) + "\n")
            if not body["page"]["has_more"]:
                return
            cursor = body["page"]["next_cursor"]
```

重跑時還是從第一頁開始，但重放的那些頁 `meta.replayed` 為 true，扣費為 0。

## 提前知道的限制

- 拿到的是平台公開展示的內容。隱藏或刪除的作品不在列表裡，`page.has_more` 變成 false 就說明公開可見的已經到底了。
- 返回的是作品資料和媒體連結，不替你下載影片檔案；下載影片用 yt-dlp 這類工具更合適。
- 如果是你自己的帳號，平台的創作者後臺有曝光、粉絲畫像這些公開介面拿不到的資料。

回溯完之後的日常跟蹤更省錢，做法見[競品監測](/zh/solutions/competitor-monitoring/)。

## 用到的介面

- [抖音帳號作品列表](https://okdata.online/zh/apis/douyin/users/videos/list/) `douyin.users.videos.list`：$0.002/次 · 每頁約 20 條影片
- [小紅書博主筆記列表](https://okdata.online/zh/apis/xiaohongshu/users/notes/list/) `xiaohongshu.users.notes.list`：$0.03/次 · 每頁約 20 篇筆記
- [X 帳號帖子列表](https://okdata.online/zh/apis/x/users/posts/list/) `x.users.posts.list`：$0.002/次 · 每頁約 20 條帖子
- [公眾號歷史文章](https://okdata.online/zh/apis/wechat_mp/accounts/articles/list/) `wechat_mp.accounts.articles.list`：$0.02/次 · 每頁約 10 篇文章

## 更多抖音內容

- [抖音 API](https://okdata.online/zh/apis/douyin/)
- [抖音 API Python 教程：搜尋、影片、帳號和評論（2026）](https://okdata.online/zh/guides/douyin-api-python/)
- [怎麼批次匯出抖音影片評論](https://okdata.online/zh/guides/douyin-video-comments/)
- [怎麼在抖音星圖按條件找達人並拿到報價單](https://okdata.online/zh/guides/douyin-xingtu-creator-rates/)
- [公眾號 API Python 教程：把文章轉成 Markdown 給 RAG 用（2026）](https://okdata.online/zh/guides/wechat-official-account-api-python/)
- [怎麼拿到一個公眾號的歷史文章和全文](https://okdata.online/zh/guides/wechat-official-account-articles/)
- [小紅書 API Python 教程：筆記、博主和評論（2026）](https://okdata.online/zh/guides/xiaohongshu-api-python/)
- [每天盯 50 個競品帳號的更新，要花多少錢？](https://okdata.online/zh/answers/competitor-accounts-tracking-cost/)
- [把一個博主的全部歷史作品拉下來要多少錢？](https://okdata.online/zh/answers/creator-post-history-backfill-cost/)
- [WorkBuddy 裡怎麼接抖音、小紅書、公眾號的資料？](https://okdata.online/zh/answers/workbuddy-douyin-xiaohongshu-wechat-data/)
- [抖音、小紅書、影片號的資料有沒有一個 API 能統一拿到？](https://okdata.online/zh/answers/douyin-xiaohongshu-wechat-channels-one-api/)
- [釦子（Coze）或 Dify 工作流裡，怎麼不用 Cookie 拿到抖音、小紅書資料？](https://okdata.online/zh/answers/coze-dify-douyin-xiaohongshu-data/)
- [千問裡怎麼拿到抖音、小紅書、公眾號的資料？](https://okdata.online/zh/answers/qwen-douyin-xiaohongshu-data/)
- [抖音評論採集用什麼？官方介面、第三方 API、開源爬蟲、採集工具 4 類方案怎麼選（2026）](https://okdata.online/zh/compare/douyin-comment-scraping/)

## 資料來源

這個問題出現過的地方（讀取於 2026-11-12）：

- https://stackoverflow.com/questions/59690743/scraping-all-videos-from-a-tiktok-profile
- https://stackoverflow.com/questions/50614117/how-to-get-public-user-all-posts-from-instagram-without-instagram-api

更新於 2026-11-12
