newsapi-search
Search news articles via NewsAPI with filtering by time windows, sources, domains, and languages.
Best use case
newsapi-search is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Search news articles via NewsAPI with filtering by time windows, sources, domains, and languages.
Teams using newsapi-search should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/newsapi-search/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How newsapi-search Compares
| Feature / Agent | newsapi-search | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Search news articles via NewsAPI with filtering by time windows, sources, domains, and languages.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 Skills
jinko-flight-search
Search flights and discover travel destinations using the Jinko MCP server. Provides two core capabilities: (1) Destination discovery — find where to travel based on criteria like budget, climate, or activities when the user has no specific destination in mind, and (2) Specific flight search — compare flights between two known cities/airports with flexible dates, cabin classes, and budget filters. Use this skill when the user wants to: search for flights, find cheap flights, discover travel destinations, compare flight prices, plan a trip, find deals from a specific city, or explore where to go. Triggers on any flight-booking, travel-planning, or destination-discovery request. Requires the Jinko MCP server connected at https://mcp.gojinko.com.
academic-deep-research
Transparent, rigorous research with full methodology — not a black-box API wrapper. Conducts exhaustive investigation through mandated 2-cycle research per theme, APA 7th citations, evidence hierarchy, and 3 user checkpoints. Self-contained using native OpenClaw tools (web_search, web_fetch, sessions_spawn). Use for literature reviews, competitive intelligence, or any research requiring academic rigor and reproducibility.
web-searcher
Autonomous web research agent that performs multi-step searches, follows links, extracts data, and synthesizes.
internet-search
How to use the internet_search tool effectively — category routing, query formulation, and multi-search strategies.
research-tracker
Manage autonomous AI research agents with SQLite-based state tracking. Use when spawning long-running research sub-agents, tracking multi-step investigations, coordinating agent handoffs, or monitoring background work. Triggers on: research projects, sub-agent coordination, autonomous investigation, progress tracking, agent oversight.
yutori-web-research
Use Yutori’s Research API and Browsing API (cloud browser) to research topics, collect sources, and extract structured facts from the web. Use when the user asks to “research X”, “monitor/find papers”, or “navigate to a site and extract info” and you have access to YUTORI dev/prod endpoints via YUTORI_API_BASE and an API key in env (YUTORI_API_KEY or ~/.openclaw/openclaw.json env.YUTORI_API_KEY).
literature-search
Find and compile academic literature with citation lists across Google Scholar, PubMed, arXiv, IEEE, ACM, Semantic.
research-library
Local-first multimedia research library for hardware projects.
research-assistant
Organized research and knowledge management for agents.
baidu-scholar-search
Baidu Academic Search Tool enables the retrieval of both Chinese and English literature, covering various types of literature such as academic journals, conference papers, and dissertations.
market-research-2
Conduct structured market research for a solopreneur business.
wechat-search
Search WeChat Official Account articles using OpenClaw's web search, Tavily API, and web fetch capabilities.