top_headlines

Pack: gnews · Endpoint: https://gateway.pipeworx.io/gnews/mcp

Fetch current top news headlines from GNews (requires BYO API key). Optionally filter by category (general, world, nation, business, technology, entertainment, sports, science, health), country code, and language. Returns up to 100 articles with title, description, source, and publication date.

Parameters

NameTypeRequiredDescription
_apiKeystringyesGNews API key
categorystringnoNews category: general, world, nation, business, technology, entertainment, sports, science, health
countrystringnoCountry code (e.g., “us”, “gb”). Omit for global
langstringnoLanguage code (e.g., “en”). Default: “en”
maxnumbernoMax articles to return (1-100, default 10)

Example call

Arguments

{
  "_apiKey": "your-gnews-api-key"
}

curl

curl -X POST https://gateway.pipeworx.io/gnews/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"top_headlines","arguments":{"_apiKey":"your-gnews-api-key"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('top_headlines', {
  "_apiKey": "your-gnews-api-key"
});

More examples

{
  "_apiKey": "your-gnews-api-key",
  "category": "technology",
  "country": "gb",
  "max": 15
}

Response shape

Always returns: total_articles, returned, articles

FieldTypeDescription
total_articlesnumberTotal number of top headline articles
returnednumberNumber of articles returned in this response
articlesarrayList of top news headlines
Full JSON Schema
{
  "type": "object",
  "properties": {
    "total_articles": {
      "type": "number",
      "description": "Total number of top headline articles"
    },
    "returned": {
      "type": "number",
      "description": "Number of articles returned in this response"
    },
    "articles": {
      "type": "array",
      "description": "List of top news headlines",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Article headline"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Brief summary of the article"
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full article content snippet"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Article URL"
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Featured image URL"
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Publication timestamp (ISO 8601)"
          },
          "source_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the news source"
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Homepage URL of the news source"
          }
        }
      }
    }
  },
  "required": [
    "total_articles",
    "returned",
    "articles"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "gnews": {
      "url": "https://gateway.pipeworx.io/gnews/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 21, 2026