# News + Trend Summarizer (`delightful_unicorn/news-trend-summarizer`) Actor

Monitor 50+ English news sources via RSS, detect exploding keywords week-over-week, and generate trend reports. Ideal for journalists, marketers, and SEO analysts.

- **URL**: https://apify.com/delightful\_unicorn/news-trend-summarizer.md
- **Developed by:** [Alessandro Amato](https://apify.com/delightful_unicorn) (community)
- **Categories:** News, Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## News + Trend Summarizer

**The first Apify actor for cross-source news trend detection.** Monitors 45+ English-language RSS feeds, identifies exploding keywords week-over-week, and generates structured trend reports. Designed for journalists, marketers, SEO analysts, and content strategists who need to spot rising narratives before they peak.

### Why This Actor?

There are 80+ news actors on Apify, but they are mostly single-source scrapers or article extractors. None has >5K users because they answer *"what happened?"* instead of *"what's trending?"*. This actor is a **trend detection engine** — it aggregates dozens of sources and surfaces the keywords that are gaining momentum across the entire news ecosystem.

### Features

- **45+ Default Sources** — BBC, Guardian, NYT, CNN, Al Jazeera, NPR, Axios, Politico, TechCrunch, The Economist, and many more.
- **Keyword Trend Detection** — Extracts unigrams and bigrams, ranks by frequency × cross-source buzz × freshness.
- **Configurable Time Window** — Analyze last 1–30 days (default 7).
- **Noise Filtering** — Aggressive English stopwords + customizable exclusion list.
- **Optional LLM Summaries** — Generate narrative summaries of top trends via OpenAI (user's own API key).
- **HTTP-Only** — No browser, no proxies, no heavy compute. Runs in seconds.

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `sources` | array[string] | 45 default RSS URLs | Override or extend news sources |
| `timeWindowDays` | integer | 7 | How many days back to analyze |
| `topN` | integer | 20 | Number of trending keywords to return |
| `generateSummaries` | boolean | false | Enable OpenAI narrative summary |
| `openAiApiKey` | string | null | Required if summaries enabled |
| `excludeKeywords` | array[string] | [] | Custom noise words to filter out |
| `minArticleCount` | integer | 3 | Minimum occurrences to qualify |
| `maxConcurrency` | integer | 10 | Max parallel RSS fetches |
| `fetchDelayMs` | integer | 300 | Delay between fetch batches |

### Output Example

```json
{
  "trendingKeywords": [
    {
      "keyword": "ai regulation",
      "trendScore": 847.2,
      "articleCount": 34,
      "uniqueSources": 12,
      "sampleHeadlines": [
        {
          "headline": "EU Parliament passes landmark AI regulation bill",
          "source": "The Guardian",
          "url": "https://www.theguardian.com/...",
          "date": "2026-05-18T08:00:00.000Z"
        }
      ],
      "firstSeen": "2026-05-18T08:00:00.000Z",
      "lastSeen": "2026-05-20T14:30:00.000Z"
    }
  ],
  "summary": "This week, AI regulation dominated headlines...",
  "metadata": {
    "sourcesScanned": 43,
    "totalSourcesAttempted": 45,
    "articlesAnalyzed": 1874,
    "timeWindowDays": 7,
    "generatedAt": "2026-05-20T22:00:00.000Z"
  }
}
````

### Trend Scoring Formula

`trendScore = log(articleCount + 1) × sqrt(uniqueSources + 1) × freshnessBonus`

- **Cross-source buzz:** Keywords appearing in many outlets score higher (dampens single-source spam).
- **Freshness bonus:** Keywords seen today get 1.5×, yesterday 1.2×.

### Default Sources

BBC News, BBC World, Guardian, NYT, CNN, Al Jazeera, NPR, Axios, Politico, TechCrunch, Ars Technica, The Verge, Wired, Engadget, CNET, ZDNet, The Economist, ABC News, CBS News, NBC News, USA Today, Independent, Time, Newsweek, The Hill, Vox, Slate, The Atlantic, New Yorker, Foreign Policy, Scientific American, Nature, Space.com, VentureBeat, Mashable, Gizmodo, Lifehacker, BBC Sport, ESPN, Deadline, Variety, CNBC.

### Pricing

**Pay Per Event**

- Start event: **$0.0005**
- Result event: **$0.0005**

Approx. **$0.02–0.05 per run** depending on source count. No compute-unit charges.

### Use Cases

- **Journalists:** Spot emerging stories before they saturate the cycle.
- **Marketers:** Identify trending topics for content calendars and ad campaigns.
- **SEO Analysts:** Find rising search queries tied to current events.
- **Investors:** Track sector-specific news momentum (tech, biotech, policy).

### Disclaimer

This actor consumes publicly available RSS feeds. Always respect each outlet's Terms of Service and robots.txt. RSS feeds may change or become unavailable; the actor gracefully skips broken sources.

# Actor input Schema

## `sources` (type: `array`):

List of RSS feed URLs to monitor. Defaults to 50 major English-language news outlets.

## `timeWindowDays` (type: `integer`):

How many days back to analyze.

## `topN` (type: `integer`):

Number of trending keywords to return.

## `generateSummaries` (type: `boolean`):

Enable OpenAI-powered narrative summaries of top trending topics.

## `openAiApiKey` (type: `string`):

Required if Generate Summaries is enabled. The user bears the token cost.

## `excludeKeywords` (type: `array`):

Custom noise words to exclude from trend detection (e.g. \['trump', 'biden']).

## `minArticleCount` (type: `integer`):

Minimum occurrences to qualify as trending.

## `maxConcurrency` (type: `integer`):

Max parallel RSS fetches.

## `fetchDelayMs` (type: `integer`):

Delay between RSS fetch batches in milliseconds.

## Actor input object example

```json
{
  "sources": [],
  "timeWindowDays": 7,
  "topN": 20,
  "generateSummaries": false,
  "excludeKeywords": [],
  "minArticleCount": 3,
  "maxConcurrency": 10,
  "fetchDelayMs": 300
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("delightful_unicorn/news-trend-summarizer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("delightful_unicorn/news-trend-summarizer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call delightful_unicorn/news-trend-summarizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=delightful_unicorn/news-trend-summarizer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "News + Trend Summarizer",
        "description": "Monitor 50+ English news sources via RSS, detect exploding keywords week-over-week, and generate trend reports. Ideal for journalists, marketers, and SEO analysts.",
        "version": "1.0",
        "x-build-id": "jAhXLw35Gj5T4e3Ev"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/delightful_unicorn~news-trend-summarizer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-delightful_unicorn-news-trend-summarizer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/delightful_unicorn~news-trend-summarizer/runs": {
            "post": {
                "operationId": "runs-sync-delightful_unicorn-news-trend-summarizer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/delightful_unicorn~news-trend-summarizer/run-sync": {
            "post": {
                "operationId": "run-sync-delightful_unicorn-news-trend-summarizer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "sources": {
                        "title": "RSS Sources",
                        "type": "array",
                        "description": "List of RSS feed URLs to monitor. Defaults to 50 major English-language news outlets.",
                        "default": []
                    },
                    "timeWindowDays": {
                        "title": "Time Window (days)",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "How many days back to analyze.",
                        "default": 7
                    },
                    "topN": {
                        "title": "Top N Trending Keywords",
                        "minimum": 5,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Number of trending keywords to return.",
                        "default": 20
                    },
                    "generateSummaries": {
                        "title": "Generate LLM Summaries",
                        "type": "boolean",
                        "description": "Enable OpenAI-powered narrative summaries of top trending topics.",
                        "default": false
                    },
                    "openAiApiKey": {
                        "title": "OpenAI API Key",
                        "type": "string",
                        "description": "Required if Generate Summaries is enabled. The user bears the token cost."
                    },
                    "excludeKeywords": {
                        "title": "Exclude Keywords",
                        "type": "array",
                        "description": "Custom noise words to exclude from trend detection (e.g. ['trump', 'biden']).",
                        "default": []
                    },
                    "minArticleCount": {
                        "title": "Minimum Article Count",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Minimum occurrences to qualify as trending.",
                        "default": 3
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Max parallel RSS fetches.",
                        "default": 10
                    },
                    "fetchDelayMs": {
                        "title": "Fetch Delay (ms)",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Delay between RSS fetch batches in milliseconds.",
                        "default": 300
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
