search_news
Pack: mediastack · Endpoint: https://gateway.pipeworx.io/mediastack/mcp
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/search_news for the schema, then POST the same URL with its arguments for the data.
Search news articles by keywords. Optionally filter by category (business, technology, science, health, sports, entertainment, general), country (ISO2 codes), or language. Returns headlines, descriptions, sources, and published dates.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | Mediastack API key |
keywords | string | yes | Search keywords (e.g., “artificial intelligence”, “climate summit”) |
categories | string | no | Comma-separated categories: business, technology, science, health, sports, entertainment, general |
countries | string | no | Comma-separated ISO2 country codes (e.g., “us,gb,de”) |
languages | string | no | Comma-separated language codes (e.g., “en,es,fr”) |
limit | number | no | Max results to return (1-100, default 25) |
Example call
Arguments
{
"_apiKey": "your-mediastack-api-key",
"keywords": "artificial intelligence"
}
curl
curl -X POST https://gateway.pipeworx.io/mediastack/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_news","arguments":{"_apiKey":"your-mediastack-api-key","keywords":"artificial intelligence"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('search_news', {
"_apiKey": "your-mediastack-api-key",
"keywords": "artificial intelligence"
});
More examples
{
"_apiKey": "your-mediastack-api-key",
"keywords": "climate summit",
"categories": "science,general",
"countries": "us,gb,de",
"limit": 50
}
Response shape
Always returns: total, count, articles
| Field | Type | Description |
|---|---|---|
total | number | Total number of matching articles available |
count | number | Number of articles returned in this response |
articles | array | List of news articles matching the search criteria |
Full JSON Schema
{
"type": "object",
"properties": {
"total": {
"type": "number",
"description": "Total number of matching articles available"
},
"count": {
"type": "number",
"description": "Number of articles returned in this response"
},
"articles": {
"type": "array",
"description": "List of news articles matching the search criteria",
"items": {
"type": "object",
"properties": {
"title": {
"type": [
"string",
"null"
],
"description": "Article headline"
},
"description": {
"type": [
"string",
"null"
],
"description": "Article summary or excerpt"
},
"url": {
"type": [
"string",
"null"
],
"description": "URL to the full article"
},
"source": {
"type": [
"string",
"null"
],
"description": "News source or publication name"
},
"author": {
"type": [
"string",
"null"
],
"description": "Article author name"
},
"category": {
"type": [
"string",
"null"
],
"description": "Article category (business, technology, science, health, sports, entertainment, general)"
},
"language": {
"type": [
"string",
"null"
],
"description": "Language code of the article"
},
"country": {
"type": [
"string",
"null"
],
"description": "ISO2 country code where article originated"
},
"published_at": {
"type": [
"string",
"null"
],
"description": "Article publication date and time"
}
}
}
}
},
"required": [
"total",
"count",
"articles"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"mediastack": {
"url": "https://gateway.pipeworx.io/mediastack/mcp"
}
}
}
See Getting Started for client-specific install steps.