Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

newsapi-search新闻 API 搜索

Agent Skill

newsapi-search 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

69,376

周安装

2,834

GitHub Stars

2

下载量

22,219
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:newsapi-search(新闻 API 搜索)
来源仓库:https://github.com/hegghammer/newsapi-search
安装命令:
openclaw skills install newsapi-search
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install newsapi-search

简介

newsapi-search 通过 NewsAPI 搜索新闻,支持按时间、来源、领域和语言过滤。

  • 适合精细化检索特定主题或地区的新闻报道。
  • 在 OpenClaw 中集成,提供结构化查询接口与结果排序功能。
  • 使用前请注册 NewsAPI 账户并获取密钥,确保认证正常。
  • 注意搜索结果受 API 配额影响,高频使用需合理规划调用策略。

SKILL.md

name
newsapi-search
version
1.0.0
description
Search news articles via NewsAPI with filtering by time windows, sources, domains, and languages.

NewsAPI Search

Search 5,000+ news sources via NewsAPI. Supports comprehensive article discovery (/everything) and breaking headlines (/top-headlines).

Quick Start

# Basic search
node scripts/search.js "technology" --days 7

# Filter by quality sources
node scripts/search.js "technology" --sources bbc-news,reuters,al-jazeera-english

# Exclude low-quality domains
node scripts/search.js "technology" --exclude tmz.com,radaronline.com

# Breaking headlines
node scripts/search.js "technology" --headlines --country us

# List available sources
node scripts/sources.js --country us --category general

Setup

Add API key to ~/.openclaw/.env:

NEWSAPI_KEY=your_api_key

Get key from https://newsapi.org (free tier: 100 requests/day)

Endpoints

Everything Search

Comprehensive search across millions of articles.

Time Windows:

node scripts/search.js "query" --hours 24
node scripts/search.js "query" --days 7        # default
node scripts/search.js "query" --weeks 2
node scripts/search.js "query" --months 1
node scripts/search.js "query" --from 2026-01-01 --to 2026-01-31

Filters:

node scripts/search.js "query" --sources bbc-news,cnn           # max 20
node scripts/search.js "query" --domains nytimes.com,bbc.co.uk
node scripts/search.js "query" --exclude gossip-site.com
node scripts/search.js "query" --lang en                       # or 'any'

Search Fields:

node scripts/search.js "query" --title-only                    # title only
node scripts/search.js "query" --in title,description          # specific fields

Advanced Query Syntax:

  • "exact phrase" — exact match
  • +musthave — required word
  • -exclude — excluded word
  • word1 AND word2 — both required
  • word1 OR word2 — either accepted
  • (word1 OR word2) AND word3 — grouping

Pagination & Sorting:

node scripts/search.js "query" --page 2 --limit 20
node scripts/search.js "query" --sort relevancy      # default
node scripts/search.js "query" --sort date           # newest first
node scripts/search.js "query" --sort popularity

Top Headlines

Live breaking news by country or category.

# By country
node scripts/search.js "query" --headlines --country us

# By category
node scripts/search.js --headlines --country us --category business

# By source
node scripts/search.js --headlines --sources bbc-news,cnn

Categories: business, entertainment, general, health, science, sports, technology

Note: Cannot mix --country/--category with --sources in headlines mode.

List Sources

node scripts/sources.js                    # all sources
node scripts/sources.js --country us       # filter by country
node scripts/sources.js --category business
node scripts/sources.js --lang en
node scripts/sources.js --json             # JSON output

Advanced Usage

For complete parameter reference, see references/api-reference.md.

For common workflows and search patterns, see references/examples.md.

Programmatic API

const { searchEverything, searchHeadlines, getSources } = require('./scripts/search.js');

const results = await searchEverything('climate change', {
  timeWindow: { type: 'days', value: 7 },
  sources: 'bbc-news,reuters',
  excludeDomains: 'tmz.com',
  limit: 20
});

const headlines = await searchHeadlines('business', {
  country: 'us',
  category: 'business'
});

Free Tier Limits

  • 100 requests/day
  • 100 results per request (max)
  • 1-month delay on archived content

Output Format

Returns structured JSON:

{
  "query": "technology",
  "endpoint": "everything",
  "totalResults": 64,
  "returnedResults": 10,
  "page": 1,
  "results": [
    {
      "title": "...",
      "url": "...",
      "source": "BBC News",
      "publishedAt": "2026-02-05T14:30:00Z",
      "description": "...",
      "content": "..."
    }
  ]
}

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

95.79%
按下载量换算21,284

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills