返回顶部
n

news-search新闻搜索

USE FOR news search. Returns news articles with title, URL, description, age, thumbnail. Supports freshness and date range filtering, SafeSearch filter and Goggles for custom ranking.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
115
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

news-search

新闻搜索

通过 x402 按次付费(HTTP 402)的付费新闻搜索代理。

前置条件:此技能需要 x402 支付。首次使用前请完成设置步骤
安全性:仅提供文档——不含可执行代码或凭证。钱包/密钥保留在您的机器上;绝不存储在此处。

服务 URL

角色域名
API 提供商https://www.cpbox.io
协调方
https://www.cppay.finance |

端点(代理接口)

http
GET /api/x402/news-search
POST /api/x402/news-search/post

支付流程(x402 协议)

  1. 1. 首次请求(无 PAYMENT-SIGNATURE)-> 返回 402 Payment Required 及需求 JSON
  2. 客户端签名(EIP-712)-> PAYMENT-SIGNATURE
  3. 重试并携带 PAYMENT-SIGNATURE -> 服务器结算并返回 JSON

使用 @springmint/x402-payment 或 x402-sdk-go 时,支付自动完成

快速开始(cURL)

基础搜索

bash curl -s https://www.cpbox.io/api/x402/news-search?q=space+exploration \ -H Accept: application/json

近期新闻(过去 24 小时)

bash curl -s https://www.cpbox.io/api/x402/news-search \ -H Accept: application/json \ -G \ --data-urlencode q=cybersecurity \ --data-urlencode country=US \ --data-urlencode freshness=pd \ --data-urlencode count=20

日期范围筛选

bash curl -s https://www.cpbox.io/api/x402/news-search \ -H Accept: application/json \ -G \ --data-urlencode q=climate summit \ --data-urlencode freshness=2026-01-01to2026-01-31

配合 x402-payment 使用

bash
npx @springmint/x402-payment \
--url https://www.cpbox.io/api/x402/news-search \
--method GET

参数

参数类型必填默认值描述
qstring-搜索查询(1-400 字符,最多 50 词)
country
string | 否 | US | 搜索国家(2 字母国家代码或 ALL) | | search_lang | string | 否 | en | 语言偏好(2+ 字符语言代码) | | ui_lang | string | 否 | en-US | 界面语言(例如 en-US) | | count | int | 否 | 20 | 结果数量(1-50) | | offset | int | 否 | 0 | 分页偏移量(0-9) | | safesearch | string | 否 | strict | 成人内容过滤(off/moderate/strict) | | freshness | string | 否 | - | 时间筛选(pd/pw/pm/py 或日期范围) | | spellcheck | bool | 否 | true | 自动纠正查询 | | extra_snippets | bool | 否 | - | 每个结果最多 5 个额外摘要 | | goggles | string 或 array | 否 | - | 自定义排名筛选(URL 或内联;多个时重复参数) | | operators | bool | 否 | true | 应用搜索运算符 | | includefetchmetadata | bool | 否 | false | 在结果中包含获取时间戳 |

Freshness 值

描述
pd过去一天(24 小时)- 适合突发新闻
pw
过去一周(7 天) | | pm | 过去一月(31 天) | | py | 过去一年(365 天) | | YYYY-MM-DDtoYYYY-MM-DD | 自定义日期范围 |

响应格式

json
{
type: news,
query: {
original: space exploration
},
results: [
{
type: news_result,
title: 太空探索新进展,
url: https://news.example.com/space-exploration,
description: 近期任务加深了我们对……的理解,
age: 2 小时前,
page_age: 2026-01-15T14:30:00,
page_fetched: 2026-01-15T15:00:00Z,
meta_url: {
scheme: https,
netloc: news.example.com,
hostname: news.example.com,
favicon: https://imgs.search.provider/favicon/news.example.com,
path: /space-exploration
},
thumbnail: {
src: https://imgs.search.provider/...
}
}
]
}

响应字段

字段类型描述
typestring始终为 news
query.original
string | 原始搜索查询 | | query.altered | string? | 拼写纠正后的查询(如有变更) | | query.cleaned | string? | 拼写检查器清理/规范化后的查询 | | query.spellcheck_off | bool? | 拼写检查是否已禁用 | | query.showstrictwarning | bool? | 严格安全搜索是否屏蔽了结果 | | query.search_operators | object? | 已应用的搜索运算符 | | query.search_operators.applied | bool | 运算符是否已应用 | | query.searchoperators.cleanedquery | string? | 运算符处理后的查询 | | query.search_operators.sites | list[str]? | 来自 site: 运算符的域名 | | results[].type | string | 始终为 news_result | | results[].title | string | 文章标题 | | results[].url | string | 文章来源 URL | | results[].description | string? | 文章描述/摘要 | | results[].age | string? | 人类可读的时效(例如 2 小时前) | | results[].page_age | string? | 来源的发布日期(ISO 日期时间) | | results[].page_fetched | string? | 页面最后获取时间(ISO 日期时间) | | results[].fetchedcontenttimestamp | int? | 获取时间戳(仅当 includefetchmetadata=true 时) | | results[].meta_url.scheme | string? | URL 协议方案 | | results[].meta_url.netloc | string? | 网络位置 | | results[].meta_url.hostname | string? | 小写域名 | | results[].meta_url.favicon | string? | 网站图标 URL | | results[].meta_url.path | string? | URL 路径 | | results[].thumbnail.src | string | 提供的缩略图 URL | | results[].thumbnail.original | string? | 原始缩略图 URL | | results[].extra_snippets | list[str]? | 每个结果最多 5 个额外摘要 |

Goggles(自定义排名)

Goggles 让您重新排列新闻结果——提升可信来源或屏蔽不想要的来源。

方法示例
托管--data-urlencode goggles=https://<hosted-goggle-url>
内联
--data-urlencode goggles=$discard\n$site=example.com |

托管 goggles 应托管在公共 URL 上,并包含 ! name:、! description:、! author: 头部。内联规则无需注册。

语法:$boost=N / $downrank=N(1–10)、$discard、$site=example.com。用逗号组合:

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 cpbox-news-search-1776124172 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 cpbox-news-search-1776124172 技能

通过命令行安装

skillhub install cpbox-news-search-1776124172

下载

⬇ 下载 news-search v1.0.0(免费)

文件大小: 3.65 KB | 发布时间: 2026-4-14 10:08

v1.0.0 最新 2026-4-14 10:08
Initial
publish

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部