← Back to Skills Marketplace
urhd528

gsdata-data-search

by urhd528 · GitHub ↗ · v1.0.2
cross-platform ⚠ suspicious
469
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install gsdata-data-search
Description
通过自然语言描述自动解析并调用GSData项目API,搜索多平台新闻数据,支持情感分析和相对时间范围,结果以Markdown格式返回。
README (SKILL.md)

ES搜索技能

功能概述

ES搜索技能是一个自然语言处理工具,帮助用户通过自然语言描述搜索需求,自动解析并调用ES搜索API,获取符合条件的新闻数据。

主要功能

  1. 自然语言解析:支持通过自然语言描述搜索需求,自动识别关键词、平台、时间范围、情感属性等参数
  2. 配置持久化:支持将app_key和token保存到本地配置文件,无需每次输入
  3. 多平台搜索:支持微博、抖音、微信、知乎、小红书、今日头条、快手等主流平台
  4. 情感分析:支持搜索正面、负面、中性情感的新闻
  5. API调用:直接调用ES搜索API获取结构化数据
  6. Markdown格式输出:默认以Markdown格式显示搜索结果,包含搜索摘要、结果数量和详细表格
  7. 相对时间解析:支持"近一天"、"近期"、"近一周"等相对时间短语,结束时间设置为当前时间减10分钟
  8. 双重认证:支持Token认证和HMAC-SHA256签名验证

安装方法

需要安装以下依赖库:

pip install requests

使用方法

1. 基础使用

方式一:直接输入搜索需求

python es_search.py "帮我获取关于小米汽车近7天的微博正面文章"

方式二:从文件读取输入

python es_search.py --file input.txt

2. 配置管理

保存配置

python es_search.py --save-config your_app_key

显示配置

python es_search.py --show-config

清除配置

python es_search.py --clear-config

3. 参数解析模式(可选)

如果您只需要解析参数而不调用API,可以使用 --no-call-api 选项:

python es_search.py --no-call-api "帮我获取关于小米汽车的最新正面新闻"

4. API调用模式(默认)

如果您需要直接调用API并返回Markdown格式的结果,可以直接使用命令而不需要额外选项:

python es_search.py "帮我获取关于新能源汽车近一周的负面新闻"

搜索语法示例

基础搜索

"帮我获取关于小米汽车的最新新闻"

指定平台

"帮我获取关于比亚迪的微博或抖音新闻"

指定情感属性

"帮我获取5篇关于特斯拉的负面新闻"

指定时间范围

"帮我获取2026-03-10到2026-03-12关于华为的新闻"

相对时间搜索

"帮我获取关于人工智能近一天的新闻"
"帮我获取10篇关于新能源汽车近期的新闻"
"帮我获取8篇关于比亚迪近一周的新闻"
"帮我获取3篇关于华为近一个月的新闻"

完整示例

"帮我获取8篇关于小米手机 微博或者小红书的 2026-03-10到2026-03-12的正面新闻"

相对时间支持

工具支持以下相对时间短语:

时间短语 对应时间范围
近一天、最近一天、过去一天 过去24小时
近3天、最近3天、过去3天、近三天、最近三天、过去三天 过去3天
近一周、最近一周、过去一周、近7天、最近7天 过去7天
近两周、最近两周、过去两周、近14天、最近14天 过去14天
近一个月、最近一个月、过去一个月、近30天、最近30天 过去30天
近三个月、最近三个月、过去三个月、近90天、最近90天 过去90天
近期、最近、最新 过去7天(默认)

API参数说明

请求参数

参数名称 描述 必填
keywords_include 关键词
media_name 账号名称
platform_name 平台名称
posttime_start 发布开始时间
posttime_end 发布结束时间
news_emotion 情感属性
match_type 匹配类型
media_id 媒体账号ID
keywords_exclude 排除关键词

返回字段

字段名称 描述
platform_name 平台名称
media_name 账号名称
news_url 新闻链接
news_title 新闻标题
news_posttime 发布时间
news_author 作者
news_emotion 情感属性
news_uuid 新闻唯一标识
media_id 媒体账号ID
platform 平台标识

配置文件

配置文件config.json存储在技能目录下,格式如下:

{
  "app_key": "your_app_key"
}

注意事项

  1. 首次使用需要输入app_key和token,可以通过--save-config选项保存配置
  2. 配置文件以明文形式存储在本地,请注意安全
  3. 搜索结果数量由API返回,工具会进行适当格式化
  4. 时间格式支持YYYY-MM-DD或YYYY-MM-DD HH:MM:SS
  5. 相对时间搜索的结束时间设置为当前时间减10分钟,避免搜索到未完全处理的最新数据

更新日志

v1.3.0(2026-03-03)

  • 优化网络请求配置,增加超时时间到60秒
  • 改进错误处理机制,提供更详细的错误信息和解决建议
  • 增强网络请求的容错处理,添加重试机制
  • 改进API响应处理,支持更详细的错误状态码解析
  • 优化搜索参数解析逻辑,增强对关键词和数量的提取能力
  • 改进配置管理系统,支持同时保存app_key和token
  • 添加默认返回结果数量配置(默认20条)
  • 增强对"最新"、"近期"等时间关键词的解析

v1.2.0(2026-03-03)

  • 移除API请求时的Authorization header
  • 简化配置文件,只保留app_key
  • 更新--save-config命令为接受一个参数
  • 更新错误提示信息

v1.1.0(2026-03-03)

  • 改进参数解析方式,不再使用正则表达式
  • 采用大模型的自然语言理解能力解析搜索参数
  • 优化了关键词、平台、情感属性的提取逻辑
  • 保持了所有原有功能,包括配置持久化和API调用

v1.0.0(2026-03-03)

  • 首次发布
  • 支持自然语言搜索
  • 支持配置持久化
  • 支持多平台搜索
  • 支持情感分析
  • 支持双重认证
Usage Guidance
This skill appears to implement the described ES search functionality, but there are several inconsistencies you should resolve before using it with real credentials: 1) Confirm the actual API endpoint the skill will call — the docs mention 192.168.11.79:5000 while the code posts to 127.0.0.1:5001; understand which service will receive your queries. 2) Understand authentication: the SKILL.md mentions token + HMAC and earlier versions mention removing Authorization; the code sends app-key/sign/timestamp but does not add an Authorization header. Ask the author or inspect the full code path to see whether your token will ever be transmitted. 3) Do not store or supply sensitive production secrets until you are comfortable: the tool saves app_key/token in plaintext config.json in the skill directory. Prefer using short-lived or test credentials, or modify the code to read secrets from a secure store or environment variables. 4) Because it posts to localhost by default, run it in an isolated environment and test with non-sensitive inputs to observe where traffic goes. If you cannot confirm the endpoint and auth behavior, treat the skill as untrusted for production data.
Capability Analysis
Type: OpenClaw Skill Name: gsdata-data-search Version: 1.0.2 The skill is classified as suspicious primarily due to the plain-text storage of sensitive API credentials (`app_key` and potentially `token`) in the `config.json` file. While the `skill.md` documentation explicitly warns about this vulnerability, it remains a significant security risk. Additionally, the `es_search.py` script makes network requests to a local API endpoint (`http://127.0.0.1:5001/api/es/search`), and its `parse_es_params` function performs basic string parsing without robust input sanitization, relying on the downstream API to prevent potential injection attacks, which could be a vulnerability in the overall system design.
Capability Assessment
Purpose & Capability
The skill's stated purpose (natural-language -> ES search API, multi-platform news search) matches the code and SKILL.md. However there are inconsistencies: SKILL.md comments mention an API at 192.168.11.79:5000, the code uses http://127.0.0.1:5001/api/es/search, and the registry metadata / changelog versions differ. These mismatches look like sloppy documentation or configuration drift and should be clarified.
Instruction Scope
Runtime instructions and the script limit operations to parsing user text, reading/writing a local config.json, generating a signature, and POSTing JSON to an API endpoint. The skill does persist app_key and token to a local config.json file (in plaintext) — the SKILL.md warns about plaintext storage. The SKILL.md/skill.json mention token-based auth but the call code only includes app-key/sign/timestamp headers (it does not attach an Authorization header), which is inconsistent and worth verifying.
Install Mechanism
This is an instruction-only skill with no package download. requirements.txt only lists 'requests'. No remote installers or archive extraction are used.
Credentials
The skill requires an app_key (and optionally token) to operate but declares no required environment variables; instead it asks the user to save credentials into a local config.json. Storing secrets in plaintext in the skill directory is risky. Also the SKILL.md and code disagree about whether a token/Authorization header is needed. Confirm whether the token is actually required and how it is used before providing secrets.
Persistence & Privilege
The skill does not request always:true and does not modify other skills. It persists its own config.json in its directory (normal for CLI tools), which is a limited privilege but means secrets will remain on disk unless cleared.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gsdata-data-search
  3. After installation, invoke the skill by name or use /gsdata-data-search
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- Major refactor: switched from GSData项目数据搜索 to ES搜索技能, with corresponding code and configuration changes. - Removed old files gsdata_search.py and settings.json; added new entry file es_search.py. - Updated configuration requirements: now uses app_key (and token) instead of project_id/sign. - Expanded feature set to include HMAC-SHA256签名验证 and enhanced dual authentication support. - Updated documentation: revised usage instructions, parameter lists, and changelog to match new API and configuration.
v1.0.1
v1.0.1 is a maintenance release with no user-facing changes. - No file or documentation changes detected in this version.
v1.0.0
Initial release with major enhancements and documentation update: - Introduced natural language search parsing for GSData project API. - Added persistent config management (project_id and sign) via local file. - Enabled multi-platform search (Weibo, Douyin, WeChat, etc.) and sentiment filtering. - Implemented Markdown-formatted search results with search summary and result table. - Supported relative time phrases (e.g. "近一天", "近一周") with dynamic time calculation. - Provided command-line interface with options for config management and API call modes.
Metadata
Slug gsdata-data-search
Version 1.0.2
License
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is gsdata-data-search?

通过自然语言描述自动解析并调用GSData项目API,搜索多平台新闻数据,支持情感分析和相对时间范围,结果以Markdown格式返回。 It is an AI Agent Skill for Claude Code / OpenClaw, with 469 downloads so far.

How do I install gsdata-data-search?

Run "/install gsdata-data-search" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is gsdata-data-search free?

Yes, gsdata-data-search is completely free (open-source). You can download, install and use it at no cost.

Which platforms does gsdata-data-search support?

gsdata-data-search is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created gsdata-data-search?

It is built and maintained by urhd528 (@urhd528); the current version is v1.0.2.

💬 Comments