Opera News Plugin
OpenClaw plugin for Opera News API - provides AI assistants access to Opera News content
Install
openclaw plugins install clawhub:opera-news-pluginOpera News Plugin for OpenClaw
OpenClaw Plugin for Opera News API - Provides AI assistants seamless access to Opera News content
Overview
Opera News Plugin is an OpenClaw plugin that exposes Opera News API functionality to AI assistants. It provides:
- 6 Tools for news retrieval, search, and configuration
- Multi-region support (US, UK, Nigeria, South Africa, Kenya, Ghana, Brazil, Mexico)
- AI-optimized endpoints with minimal response payloads
- Config injected by OpenClaw — no manual environment variable management required
Installation
# Install via OpenClaw CLI
openclaw plugins install opera-news-plugin
# Or from local directory
openclaw plugins install /path/to/opera-news-plugin
# Verify
openclaw plugins list
Plugin Configuration
Configure via OpenClaw's plugin settings UI or config file:
{
"plugins": {
"opera-news": {
"apiBaseUrl": "https://news-af.feednews.com",
"defaultCountry": "us",
"defaultLanguage": "en",
"defaultProduct": "openclaw",
"cacheTTL": 300000,
"requestTimeout": 10000
}
}
}
| Field | Type | Default | Description |
|---|---|---|---|
apiBaseUrl | string | https://news-af.feednews.com | Opera News API base URL |
defaultCountry | string | us | 2-letter country code |
defaultLanguage | string | en | Language code |
defaultProduct | string | openclaw | Product identifier |
cacheTTL | number | 300000 | Cache TTL in milliseconds |
requestTimeout | number | 10000 | API request timeout in milliseconds |
Available Tools
1. get_news_feed — Get Main News Feed
Fetches the main Opera News feed with optional filtering by region, language, and product. Supports pagination.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | No | Country code: us, gb, ng, za, ke, gh, br, mx (defaults to plugin config) |
language | string | No | Language code, e.g. en, pt, es, sw (defaults to plugin config) |
product | string | No | Product identifier, e.g. opera, ofa, mini |
page | number | No | Page number for pagination (starting from 1) |
limit | number | No | Number of articles per page |
Response: JSON with an articles array. Each article contains:
| Field | Type | Description |
|---|---|---|
title | string | Article headline |
summary | string | Short excerpt of the article |
thumbnail | string[] | Array of image URLs (may be empty) |
transcoded_url | string | Link to the full article — use this for "Read more" links |
2. get_category_news — Get News by Category
Fetches news articles for a specific category such as technology, sports, or entertainment. Use get_categories first to retrieve valid category IDs.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
categoryId | string | Yes | Category ID (retrieve via get_categories) |
country | string | No | Country code (see supported regions) |
language | string | No | Language code |
product | string | No | Product identifier |
page | number | No | Page number for pagination |
limit | number | No | Number of articles per page |
Response: Same structure as get_news_feed — JSON with an articles array containing title, summary, thumbnail, transcoded_url.
3. mcp_search_news — Search News (AI-Optimized)
Searches news by keyword and returns a minimal set of fields. Optimized for AI tool consumption to reduce token usage.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search keyword(s) |
country | string | No | Country code (see supported regions) |
language | string | No | Language code |
product | string | No | Product identifier |
page | number | No | Page number for pagination |
limit | number | No | Number of results per page |
sort | string | No | Sort order: relevance or date |
Response: JSON with an articles array. Each article contains only:
| Field | Type | Description |
|---|---|---|
title | string | Article headline |
summary | string | Short excerpt of the article |
transcoded_url | string | Link to the full article |
4. mcp_get_top_news — Get Top Headlines (AI-Optimized)
Fetches current top headlines. Optimized for AI tool consumption with minimal fields.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | No | Country code (see supported regions) |
language | string | No | Language code |
product | string | No | Product identifier |
page | number | No | Page number for pagination |
limit | number | No | Number of articles per page |
Response: Same minimal structure as mcp_search_news — title, summary, transcoded_url only.
5. search_news — Search News (Standard)
Searches news by keyword and returns full article fields including images.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search keyword(s) |
country | string | No | Country code (see supported regions) |
language | string | No | Language code |
product | string | No | Product identifier |
page | number | No | Page number for pagination |
limit | number | No | Number of results per page |
sort | string | No | Sort order: relevance or date |
Response: Same full structure as get_news_feed — title, summary, thumbnail, transcoded_url.
vs
mcp_search_news: Returns complete article fields includingthumbnail. Usemcp_search_newswhen only title/summary/url are needed (saves tokens).
6. get_categories — Get News Categories
Returns the list of available news categories for a given region. Use the returned IDs with get_category_news.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | No | Country code (defaults to plugin config) |
language | string | No | Language code (defaults to plugin config) |
Response: A JSON array of category objects. Each item contains:
| Field | Type | Description |
|---|---|---|
id | string | Category ID — pass this to get_category_news |
name | string | Human-readable category name |
thumbnail | string | Category thumbnail image URL |
location | string | Display position of the category tab (e.g. bottom) |
Supported Regions
This plugin supports news content for the following regions. Asian markets (e.g. Indonesia, India) are not supported.
| Region | Country | Code | Languages |
|---|---|---|---|
| North America | United States | us | en |
| Europe | United Kingdom | gb | en |
| Africa | Nigeria | ng | en |
| Africa | South Africa | za | en |
| Africa | Kenya | ke | en, sw |
| Africa | Ghana | gh | en |
| Latin America | Brazil | br | pt |
| Latin America | Mexico | mx | es |
Development
Prerequisites
- Node.js >= 18.0.0
- npm
Setup
git clone https://github.com/zerokileom/opera-news-plugin.git
cd opera-news-plugin
npm install
npm run build
npm test
Project Structure
opera-news-plugin/
├── src/
│ ├── openclaw-entry.ts # Plugin entry — definePluginEntry + all 6 tools
│ ├── client/
│ │ ├── news-client.ts # HTTP client (accepts ClientConfig from OpenClaw)
│ │ └── types.ts # API type definitions
│ └── utils/
│ ├── config.ts # Env-var fallback config (for local dev/testing)
│ ├── logger.ts # Structured logging with sensitive field redaction
│ └── error-handler.ts # Error categorization and retry logic
├── openclaw.plugin.json # Plugin manifest and configSchema
├── manifest.json # Entry point declaration
└── package.json
Error Handling
- 7 error categories: NETWORK, TIMEOUT, RATE_LIMIT, AUTH, VALIDATION, SERVER, NOT_FOUND
- Exponential backoff with jitter for retryable errors
- Maximum 3 retries for network, timeout, and rate-limit errors
Logging
Structured JSON logging. Sensitive fields (query, device_id) are always redacted before writing to logs.
LOG_LEVEL=debug # debug | info | warn | error (local dev only)
LOG_FORMAT=text # json | text
Contributing
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
License
MIT License — see LICENSE
