账号研究方法
原作者研究方法,English。文内工具与接口按原文保留;本页供研读,实际使用的依赖见参考文件。
本资料包的参考文件(5)
本页目录
TikHub — Onboarding & Routing
TikHub is a unified API for social-media data across 16+ platforms (TikTok, Douyin, Instagram, YouTube, Twitter/X, Threads, Xiaohongshu, Weibo, Bilibili, Reddit, LinkedIn, and more): download media, fetch posts/profiles/comments, search, trends, and analytics.
Read this once, get the user set up, then hand off to the skill that owns the task.
Step 1 — Get an API key (one time)
Send the user to https://user.tikhub.io: register (email verification), open the API Keys page, and create a key. Pricing is per-endpoint, credit-based.
Step 2 — Set the key in the environment
Every path reads TIKHUB_API_KEY from the environment:
export TIKHUB_API_KEY="your_api_key_here"
# persist it: add the line to ~/.zshrc or ~/.bashrc
Step 3 — Pick a path and hand off
| If the user wants… | Path | Hand off to |
|---|---|---|
| Claude to call TikHub directly as tools (default) | Hosted MCP | tikhub-mcp |
| To script/curl it, CI, or no Python/Node | REST API | tikhub-rest-api |
| To build an app or pipeline in Python | Python SDK | tikhub-python-sdk |
| To find which endpoint does X (1,100+ exist) | Discovery | tikhub-endpoint-discovery |
| A finished outcome (download, analyze a creator, trends, listening…) | Task skill | social-media-downloader, creator-analytics, trend-research, social-listening, competitor-analysis, hashtag-research, comments-analysis, bulk-data-export |
| Deep work on one platform | Platform skill | tiktok, douyin, instagram, youtube, twitter-threads, xiaohongshu |
Setup gate (run before any TikHub call)
if [ -z "${TIKHUB_API_KEY:-}" ]; then
echo "TIKHUB_API_KEY is not set — get a key at https://user.tikhub.io then: export TIKHUB_API_KEY=..."
fi
If unset, halt and walk the user through Steps 1–2 before proceeding.
Red flags
- Calling endpoints before
TIKHUB_API_KEYis set (every call 401s). - Forgetting that calls cost credits — warn before large/bulk pulls.