TopRank Skills

Home / Claw Skills / Recherche / newsapi-search
Official OpenClaw rules 36%

newsapi-search

Search news articles via NewsAPI with filtering by time windows, sources, domains, and languages.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 newsapi-search 技能。 若已安装,则直接安装 newsapi-search 技能。

Overview

Skill Key
hegghammer/newsapi-search
Author
hegghammer
Source Repo
openclaw/skills
Version
1.0.0
Source Path
skills/hegghammer/newsapi-search
Latest Commit SHA
638f68ce377bb960b2832b1e6d84b8afbe8a4dfc

Extracted Content

SKILL.md excerpt

# NewsAPI Search

Search 5,000+ news sources via [NewsAPI](https://newsapi.org). Supports comprehensive article discovery (/everything) and breaking headlines (/top-headlines).

## Quick Start

```bash
# 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:**
```bash
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:**
```bash
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:**
```bash
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:**
```bash
node scripts/search.js "query" --page 2 --limit 20
node scripts/search.js "query" --sort relevan...

Related Claw Skills