tiktok-api
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTikTok API
TikTok API
TikTok data on demand: keyword post search with sort/date filters, profile
lookup by handle, followers and followings, hashtag and music/sound feeds,
location-based posts, and comment threads — one plain HTTP GET per call, paid
as you go. No login, no session cookies, no browser automation, no TikTok
developer app review.
Base URL:
https://tiktok.fetcher.sh按需获取TikTok数据:支持带排序/日期筛选的关键词帖子搜索、通过用户名查询个人主页、获取粉丝与关注列表、话题标签和音乐/音效内容流、基于地点的帖子,以及评论线程——每次调用只需一个简单的HTTP GET请求,按需付费。无需登录、无需会话Cookie、无需浏览器自动化、无需TikTok开发者应用审核。
Base URL:
https://tiktok.fetcher.shQuick reference
快速参考
| Base URL | |
| Auth | |
| Price | $0.004/call (flat) |
| Endpoints | 13, all |
| MCP | |
| Machine-readable | |
| Base URL | |
| 认证方式 | |
| 价格 | $0.004/次调用(统一价) |
| 端点数量 | 13个,均为 |
| MCP | |
| 机器可读文档 | |
Which endpoint do I need?
如何选择合适的端点?
| I want to... | Call |
|---|---|
| Search posts by keyword (optionally most-liked/recent) | |
| Look up a post by its share URL | |
| Look up a profile by @username | |
| Get a user's posts, followers, or followings | |
| Get a post's comments | |
| Find posts under a hashtag | |
| Find posts using a specific sound | |
Full param details for every row: .
references/endpoints.md| 我想要... | 调用端点 |
|---|---|
| 按关键词搜索帖子(可选按点赞量最高/最新排序) | |
| 通过分享URL查询帖子 | |
| 通过@用户名查询个人主页 | |
| 获取用户的帖子、粉丝或关注列表 | |
| 获取帖子的评论 | |
| 获取话题标签下的帖子 | |
| 获取使用特定音效的帖子 | |
每一行的完整参数详情:。
references/endpoints.mdAuthentication
认证方式
Two ways to pay, same data — full mechanics in the
skill:
fetcherbash
undefined两种付费方式,获取的数据一致——完整机制详见技能文档:
fetcherbash
undefined1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup
1. 预付费额度(推荐——可在https://fetcher.sh/topup或通过POST /api/credits/topup获取密钥,详见fetcher技能文档)
or via POST /api/credits/topup, see the fetcher skill)
—
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://tiktok.fetcher.sh/api/post/search?keyword=hello"
"https://tiktok.fetcher.sh/api/post/search?keyword=hello"
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://tiktok.fetcher.sh/api/post/search?keyword=hello"
"https://tiktok.fetcher.sh/api/post/search?keyword=hello"
2. x402 pay-per-call — omit the header; a GET with no payment returns 402
2. x402按调用付费——省略请求头;未付费的GET请求会返回402状态码,并附带机器可读的付费要求(支持在Base、Polygon、Arbitrum、Monad或Solana网络使用USDC支付)。@x402/fetch会自动签名并重试请求。
with machine-readable payment requirements (USDC on Base, Polygon,
—
Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.
—
Every response is `{ "status": number, "message": string, "data": ... }`; the
HTTP status mirrors `status`.
所有响应格式均为`{ "status": number, "message": string, "data": ... }`;HTTP状态码与`status`字段值一致。Endpoints (13 — all GET, $0.004/call)
端点(共13个——均为GET请求,$0.004/次调用)
| Endpoint | What it returns |
|---|---|
| Posts matching a keyword; sort and date-range filters |
| A single post resolved from its share URL |
| A single post by ID |
| A post's comments |
| Replies to a comment |
| Profile by @username |
| A user's posts |
| A user's followers |
| Accounts a user follows |
| Hashtag metadata by name |
| Posts under a hashtag |
| Posts using a sound/music track |
| Posts tagged at a location |
{id}{username}{name}cursorregionkeywordurl| 端点 | 返回内容 |
|---|---|
| 匹配关键词的帖子;支持排序和日期范围筛选 |
| 通过分享URL解析出的单条帖子 |
| 通过ID查询的单条帖子 |
| 帖子的评论 |
| 评论的回复 |
| 通过@用户名查询的个人主页信息 |
| 用户发布的帖子 |
| 用户的粉丝列表 |
| 用户关注的账号列表 |
| 通过名称查询的话题标签元数据 |
| 话题标签下的帖子 |
| 使用指定音效/音乐的帖子 |
| 标记了指定地点的帖子 |
{id}{username}{name}cursorregionkeywordurlScenarios
使用场景
Most liked posts this month:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=ai agent" -G \
--data-urlencode "sortType=MOST_LIKED" \
--data-urlencode "dateRange=THIS_MONTH" \
"https://tiktok.fetcher.sh/api/post/search"Posted yesterday, most recent first:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=crypto payments" -G \
--data-urlencode "sortType=DATE_POSTED" \
--data-urlencode "dateRange=YESTERDAY" \
"https://tiktok.fetcher.sh/api/post/search"Other values: . Other values: ,
, , .
sortTypeRELEVANCEdateRangeALL_TIMETHIS_WEEKLAST_THREE_MONTHSLAST_SIX_MONTHSLook up a post by its share URL, or directly by ID:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" -G \
--data-urlencode "url=https://www.tiktok.com/@username/video/1234567890123456789" \
"https://tiktok.fetcher.sh/api/post"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/post/1234567890123456789"A post's comments and comment replies:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/post/1234567890123456789/comments"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/post/1234567890123456789/comments/9876543210/replies"A profile by @handle, then its posts, followers, and followings:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/user/handle/khaby.lame"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/user/6935741396776976390/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/user/6935741396776976390/followers"A hashtag's metadata, then its posts:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/hashtag/handle/fyp"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/hashtag/1234567890/posts"Posts using a specific sound, and posts from a location:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/music/1234567890123456789/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/location/1234567890123456789/posts"本月点赞量最高的帖子:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=ai agent" -G \
--data-urlencode "sortType=MOST_LIKED" \
--data-urlencode "dateRange=THIS_MONTH" \
"https://tiktok.fetcher.sh/api/post/search"昨天发布的帖子,按最新排序:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=crypto payments" -G \
--data-urlencode "sortType=DATE_POSTED" \
--data-urlencode "dateRange=YESTERDAY" \
"https://tiktok.fetcher.sh/api/post/search"其他取值:。其他取值:、、、。
sortTypeRELEVANCEdateRangeALL_TIMETHIS_WEEKLAST_THREE_MONTHSLAST_SIX_MONTHS通过分享URL或直接通过ID查询帖子:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" -G \
--data-urlencode "url=https://www.tiktok.com/@username/video/1234567890123456789" \
"https://tiktok.fetcher.sh/api/post"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/post/1234567890123456789"帖子的评论及评论回复:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/post/1234567890123456789/comments"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/post/1234567890123456789/comments/9876543210/replies"通过@用户名查询个人主页,再获取其帖子、粉丝和关注列表:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/user/handle/khaby.lame"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/user/6935741396776976390/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/user/6935741396776976390/followers"话题标签的元数据,再获取其下的帖子:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/hashtag/handle/fyp"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/hashtag/1234567890/posts"使用特定音效的帖子,以及指定地点的帖子:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/music/1234567890123456789/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://tiktok.fetcher.sh/api/location/1234567890123456789/posts"MCP
MCP
json
{
"mcpServers": {
"tiktok": {
"url": "https://tiktok.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}Free: , , . Paid:
(any endpoint above), , plus the named shortcut
. Drop the block to pay per call with x402
instead — see the skill for the full flow.
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditstiktok_post_searchheadersfetcherjson
{
"mcpServers": {
"tiktok": {
"url": "https://tiktok.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}免费功能:、、。付费功能:(上述任意端点)、,以及快捷命令。若要使用x402按调用付费,可移除块——完整流程详见技能文档。
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditstiktok_post_searchheadersfetcherErrors
错误说明
- — missing/invalid parameter (message names it)
400 - — unknown or rotated key
401 - — payment required (x402 challenge) or
402(credits exhausted)topup_required - — not a priced path
404 - No rate limits; no refunds on upstream failures (settlement precedes delivery)
- —— 参数缺失/无效(错误信息会指明具体参数)
400 - —— 密钥未知或已过期
401 - —— 需要付费(x402验证)或
402(额度耗尽)topup_required - —— 路径未定价
404 - 无调用频率限制;上游服务失败时不予退款(结算先于数据交付)
Reference
参考资料
- Deep dives: (every param) ·
references/endpoints.md(onereferences/scenarios.mdper endpoint) ·curl·references/faq.md(vs. the official TikTok API and a browser scraper)references/comparison.md - Task guides: viral post search · profile and followers
- Slash command:
/tiktok-search - Full agent setup: https://tiktok.fetcher.sh/skill.md
- OpenAPI 3.1 contract: https://tiktok.fetcher.sh/openapi.json
- Condensed catalog: https://tiktok.fetcher.sh/llms.txt
- Payment, credits, and MCP deep dive: skill
fetcher - Site: https://tiktok.fetcher.sh
- 深度解析:(所有参数详情)·
references/endpoints.md(每个端点的curl示例)·references/scenarios.md·references/faq.md(与官方TikTok API及浏览器爬虫的对比)references/comparison.md - 任务指南:热门帖子搜索 · 个人主页与粉丝
- Slash命令:
/tiktok-search - 完整Agent设置:https://tiktok.fetcher.sh/skill.md
- OpenAPI 3.1契约:https://tiktok.fetcher.sh/openapi.json
- 精简目录:https://tiktok.fetcher.sh/llms.txt
- 支付、额度及MCP深度解析:技能文档
fetcher - 官网:https://tiktok.fetcher.sh