跳到主要内容

采集用户脚本配置

scrape_users 通过真实 Android 设备的界面,导出粉丝、关注中或搜索结果中的用户名。Pro 版支持 TikTok、Instagram 和 Threads。

script_config​

参数类型必填默认值说明
modestring否followersfollowers、following 或 keyword
target_usernamestring条件""要打开其粉丝/关注列表的账户
search_keywordstring条件""keyword 模式使用的搜索词
max_scrape_countinteger否50最多导出的新用户名(1–10,000)

followers/following 模式需要 target_username;keyword 模式需要 search_keyword。

Threads API 示例​

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "scrape_users",
"platform": "threads",
"script_config": {
"mode": "followers",
"target_username": "@creator",
"max_scrape_count": 50
}
}'

结果写入 TikMatrix 的 <work_dir>/download/ 目录,每行一个用户名。文件名为 <target>_followers.txt、<target>_following.txt 或 <keyword>.txt;后续运行会追加。达到上限或找不到新行时停止。

错误码​

代码说明
40001当前模式缺少目标用户名或搜索词
40003当前构建或平台不支持此脚本
40301API 需要 Pro 或更高套餐

另请参阅​