latest_news
Pack: mediastack · Endpoint: https://gateway.pipeworx.io/mediastack/mcp
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/latest_news for the schema, then POST the same URL with its arguments for the data.
Get the latest news headlines. Optionally filter by category, country, or language. Returns the most recent articles with titles, descriptions, sources, and URLs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | Mediastack API key |
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”) |
limit | number | no | Max results to return (1-100, default 25) |
Example call
Arguments
{
"_apiKey": "your-mediastack-api-key"
}
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":"latest_news","arguments":{"_apiKey":"your-mediastack-api-key"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('latest_news', {
"_apiKey": "your-mediastack-api-key"
});
More examples
{
"_apiKey": "your-mediastack-api-key",
"categories": "business,technology",
"countries": "us",
"limit": 30
}
Response shape
Always returns: total, count, articles
| Field | Type | Description |
|---|---|---|
total | number | Total number of latest articles available |
count | number | Number of articles returned in this response |
articles | array | List of latest news articles |
Full JSON Schema
{
"type": "object",
"properties": {
"total": {
"type": "number",
"description": "Total number of latest articles available"
},
"count": {
"type": "number",
"description": "Number of articles returned in this response"
},
"articles": {
"type": "array",
"description": "List of latest news articles",
"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.