ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

newsapi-search

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

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/hegghammer/newsapi-search
Or

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

Metadata

Stars2387
Views0
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-hegghammer-newsapi-search": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.