newsapi-search
Search news articles via NewsAPI with filtering by time windows, sources, domains, and languages.
What this skill does
# 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 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.
```bash
# 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
```bash
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](references/api-reference.md).
For common workflows and search patterns, see [references/examples.md](references/examples.md).
## Programmatic API
```javascript
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:
```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": "..."
}
]
}
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.