Zeelin Social Watch
This skill allows you to monitor social media sentiment (舆情), trending events (热点), platform rankings (榜单), and account data across platforms like Weibo, Xiaohongshu, and Douyin — powered by the GSData open platform.
Prerequisites:
This skill requires the requests library. If a module cannot be found, you may need to run pip install requests once.
Credentials:
Authentication is handled via the GSDATA_APP_KEY and GSDATA_APP_SECRET environment variables. Do not attempt to use hardcoded test keys.
Adapter Usage
Use the bundled python script to interact with the API:
INLINECODE4
Note: The script and its mapping gsdata_tool_mapping_v1.json are bundled in this skill's directory. Always run the script via relative path (./gsdata_adapter.py) from this directory.
Rules
- 1. For a new request, run
--dry-run first to verify route/action mapping. - Default to read-only actions.
- CRITICAL FOR CONVERSATIONS: If you are answering a user in a chat interface (like Telegram), you MUST append
--param size=5 (or a similarly small number) to prevent dumping enormous JSON payloads into the chat context. - Never run write-like actions unless user explicitly confirms.
- For write-like actions, require
--allow-write. - Return a concise summary first; included route + key fields used.
- PAGINATION LIMIT: The API strictly enforces a maximum of 20 items per page (e.g., passing
size=100 defaults to 20). To fetch large datasets, use a loop with --param page=1, --param page=2, etc. Do NOT attempt to fetch more than 20 items in a single call. - TOTAL COUNT ESTIMATION: Before scraping multiple pages for
gsdata_pubsent_search, ALWAYS probe the total volume first by running a test search with --param limit=1 and checking the numFound field in the response JSON. Calculate total pages as ceil(numFound / 20). (Note: The dedicated num_found action has a bug with date parameters and should NOT be used for this purpose).
Quick Commands
1. Discover endpoint capabilities:
CODEBLOCK0
2. Keyword search (with size limit):
CODEBLOCK1
3. Probe data volume estimation (returns numFound):
CODEBLOCK2
4. Hot events:
CODEBLOCK3
5. Xiaohongshu account search:
CODEBLOCK4
Write Actions (Explicit Confirmation Required)
Examples:
- - INLINECODE19
- INLINECODE20
- INLINECODE21
When approved, append --allow-write:
CODEBLOCK5
Zeelin Social Watch
该技能允许您监控社交媒体舆情、热点事件、平台榜单以及跨平台(如微博、小红书、抖音)的账号数据——由GSData开放平台提供支持。
前置条件:
该技能需要 requests 库。如果找不到模块,您可能需要运行 pip install requests 一次。
凭证:
认证通过 GSDATAAPPKEY 和 GSDATAAPPSECRET 环境变量处理。请勿尝试使用硬编码的测试密钥。
适配器使用
使用捆绑的 Python 脚本与 API 交互:
python3 ./gsdata_adapter.py
注意:该脚本及其映射文件 gsdatatoolmappingv1.json 捆绑在此技能目录中。请始终从该目录通过相对路径(./gsdataadapter.py)运行脚本。
规则
- 1. 对于新请求,先运行 --dry-run 以验证路由/动作映射。
- 默认使用只读操作。
- 对话中的关键点:如果您在聊天界面(如 Telegram)中回答用户,必须附加 --param size=5(或类似的小数字),以防止将大量 JSON 数据转储到聊天上下文中。
- 除非用户明确确认,否则绝不运行写入类操作。
- 对于写入类操作,需要 --allow-write。
- 首先返回简洁摘要;包含使用的路由和关键字段。
- 分页限制:API 严格限制每页最多 20 条(例如,传递 size=100 会默认取 20 条)。要获取大数据集,请使用循环,如 --param page=1、--param page=2 等。请勿尝试在单次调用中获取超过 20 条。
- 总量估算:在抓取 gsdatapubsentsearch 的多个页面之前,始终先通过运行带有 --param limit=1 的测试搜索来探测总量,并检查响应 JSON 中的 numFound 字段。计算总页数为 ceil(numFound / 20)。(注意:专用的 num_found 操作存在日期参数错误,不应用于此目的。)
快速命令
1. 发现端点能力:
bash
python3 ./gsdata_adapter.py list-tools
2. 关键词搜索(带大小限制):
bash
python3 ./gsdata_adapter.py invoke \
--tool gsdatapubsentsearch \
--action search \
--param keywords_include=人工智能 \
--param size=5
3. 探测数据量估算(返回 numFound):
bash
python3 ./gsdata_adapter.py invoke \
--tool gsdatapubsentsearch \
--action search \
--param keywords_include=人工智能 \
--param date_start=2026-03-01 \
--param date_end=2026-03-04 \
--param media_type=weibo \
--param limit=1
4. 热点事件:
bash
python3 ./gsdata_adapter.py invoke \
--tool gsdatapubsenthot \
--action event_list \
--params {type:1}
5. 小红书账号搜索:
bash
python3 ./gsdata_adapter.py invoke \
--tool gsdata_account \
--action search \
--platform xiaohongshu \
--param xiaohongshu_name=AI \
--param size=2
写入操作(需明确确认)
示例:
- - gsdatapubsentwarning createrule/updaterule/openrule/closerule
- gsdatamyrankgroup groupadd/groupdel
- gsdatamyrankaccount acctadd/acctdel/acctaddby_url
批准后,附加 --allow-write:
bash
python3 ./gsdata_adapter.py invoke \
--tool gsdatapubsentwarning \
--action create_rule \
--params {name:demo} \
--allow-write