# News Trending Detector (`0xgollum/news-trending-detector`) Actor

Detect topics accelerating in real time across Hacker News, Google News, Bloomberg, CNBC, BBC and The Verge — velocity, not just volume.

- **URL**: https://apify.com/0xgollum/news-trending-detector.md
- **Developed by:** [0xGollum](https://apify.com/0xgollum) (community)
- **Categories:** News, Social media
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 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 Trending Detector 📈

**Find out what's *accelerating* in the news — not just what's being published.**

Most "news scrapers" hand you a firehose of articles and leave you to figure out what matters. This actor is different: it tracks the **velocity** of every topic across multiple sources and surfaces the ones that are *spiking right now* versus their own recent baseline.

---

### Why velocity, not volume?

A topic with 50 mentions isn't news if it always has 50 mentions. A topic that jumped from 4 → 20 in the last hour is. This actor keeps a rolling baseline for every topic (persisted between runs) and flags:

| Status | Meaning |
|--------|---------|
| `emerging` | Brand-new topic, never seen in previous runs |
| `accelerating` | Mention volume is significantly above its own baseline |
| `baseline` | First run only — establishing the reference (no velocity yet) |
| `steady` / `cooling` | Flat or fading — only returned as a fallback (see below) |

Accelerating and emerging topics come first, so you get **signal, not noise**. When nothing is accelerating in a given run, the actor returns the current top topics (labelled `steady`/`cooling`) instead of an empty result — so a scheduled run always gives you a readable snapshot of the landscape.

> ⏱️ **Important:** velocity is measured *across runs*. The **first run just builds the baseline**. Schedule the actor to run on a recurring basis (e.g. every hour) — from the second run onward you get real `accelerating` / `emerging` signals. Apify Schedules make this one click.

---

### Two modes

**1. Watchlist mode** — pass `keywords_filter` (e.g. `openai, nvidia, bitcoin`). Each topic is queried directly against Google News for a strong, focused volume signal, then tracked for acceleration. Perfect for *"tell me when MY topics surge."*

**2. Discovery mode** — leave `keywords_filter` empty. The actor aggregates all sources and surfaces whatever is trending globally.

---

### Sources (all public, no API keys)

- **Hacker News** — tech / startup signal
- **Google News** — broad + per-keyword search
- **Bloomberg** — markets & business
- **CNBC** — business & tech
- **BBC** — general / world
- **The Verge** — tech / consumer
- ➕ your own **custom RSS feeds**

---

### Use cases

- **Traders / hedge funds** — catch market-moving stories early
- **Brand & PR monitoring** — know the moment your brand or a competitor spikes
- **Growth / VC scouts** — spot emerging themes before they're obvious
- **Newsletter & content creators** — auto-sourced "what's hot" sections
- **Researchers** — study how stories propagate and accelerate

---

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `keywords_filter` | string | — | Comma-separated watchlist. Empty = global discovery. |
| `include_hackernews` | boolean | `true` | Include Hacker News. |
| `include_rss_feeds` | boolean | `true` | Include Google News, Bloomberg, CNBC, BBC, The Verge. |
| `custom_rss_feeds` | array | `[]` | Your own RSS feed URLs. |
| `min_frequency` | integer | `3` | Minimum mentions to qualify as a topic. |
| `max_results` | integer | `100` | Cap on trends returned per run. |

#### Example

```json
{
  "keywords_filter": "openai, nvidia, bitcoin",
  "include_hackernews": true,
  "include_rss_feeds": true,
  "min_frequency": 3
}
````

***

### Output

Each dataset item is one trending topic:

```json
{
  "topic": "OpenAI",
  "status": "accelerating",
  "current_mentions": 18,
  "baseline_mentions": 6.2,
  "velocity_score": 12.4,
  "acceleration": 11.8,
  "sources": ["gnews", "hackernews", "theverge"],
  "sample_articles": [
    { "title": "OpenAI raises mega round", "source": "gnews", "url": "https://…" }
  ]
}
```

- **velocity\_score** — single ranking number (higher = accelerating harder / fresher)
- **acceleration** — current mentions minus baseline
- **sample\_articles** — up to 5 example headlines behind the trend

***

### Pricing

**Pay per result:** **$0.002 per topic** returned. A typical run returns a handful to a few dozen items, so most runs cost a few cents. No subscription, no rental — you pay only per item in your dataset.

***

### Tips

- **Run on a schedule** (hourly is a good start) — that's what powers the velocity signal.
- Tighten `min_frequency` if you want only strong trends; loosen it to catch weak/early ones.
- In watchlist mode, fewer, well-chosen keywords give cleaner signal than a huge list.

***

*Built for the international market. All data comes from public, freely available sources.*

# Actor input Schema

## `keywords_filter` (type: `string`):

Comma-separated topics to track (e.g. 'openai, nvidia, bitcoin'). Each is queried against Google News for a strong per-topic volume signal. Leave empty for open discovery of whatever is trending across all sources.

## `include_hackernews` (type: `boolean`):

Include Hacker News top stories (tech/startup signal).

## `include_rss_feeds` (type: `boolean`):

Include Google News, Bloomberg, CNBC, BBC and The Verge.

## `custom_rss_feeds` (type: `array`):

Add your own RSS feed URLs to fold into the trend analysis.

## `min_frequency` (type: `integer`):

A topic must appear in at least this many articles to qualify.

## `max_results` (type: `integer`):

Cap on the number of trending topics returned per run.

## Actor input object example

```json
{
  "keywords_filter": "openai, nvidia, bitcoin",
  "include_hackernews": true,
  "include_rss_feeds": true,
  "custom_rss_feeds": [],
  "min_frequency": 3,
  "max_results": 100
}
```

# 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 = {
    "keywords_filter": "openai, nvidia, bitcoin"
};

// Run the Actor and wait for it to finish
const run = await client.actor("0xgollum/news-trending-detector").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 = { "keywords_filter": "openai, nvidia, bitcoin" }

# Run the Actor and wait for it to finish
run = client.actor("0xgollum/news-trending-detector").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 '{
  "keywords_filter": "openai, nvidia, bitcoin"
}' |
apify call 0xgollum/news-trending-detector --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "News Trending Detector",
        "description": "Detect topics accelerating in real time across Hacker News, Google News, Bloomberg, CNBC, BBC and The Verge — velocity, not just volume.",
        "version": "0.1",
        "x-build-id": "ZdSMOCAnkCZlBkPO3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/0xgollum~news-trending-detector/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-0xgollum-news-trending-detector",
                "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/0xgollum~news-trending-detector/runs": {
            "post": {
                "operationId": "runs-sync-0xgollum-news-trending-detector",
                "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/0xgollum~news-trending-detector/run-sync": {
            "post": {
                "operationId": "run-sync-0xgollum-news-trending-detector",
                "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": {
                    "keywords_filter": {
                        "title": "Keywords / watchlist",
                        "type": "string",
                        "description": "Comma-separated topics to track (e.g. 'openai, nvidia, bitcoin'). Each is queried against Google News for a strong per-topic volume signal. Leave empty for open discovery of whatever is trending across all sources."
                    },
                    "include_hackernews": {
                        "title": "Include Hacker News",
                        "type": "boolean",
                        "description": "Include Hacker News top stories (tech/startup signal).",
                        "default": true
                    },
                    "include_rss_feeds": {
                        "title": "Include news RSS feeds",
                        "type": "boolean",
                        "description": "Include Google News, Bloomberg, CNBC, BBC and The Verge.",
                        "default": true
                    },
                    "custom_rss_feeds": {
                        "title": "Custom RSS feeds (optional)",
                        "type": "array",
                        "description": "Add your own RSS feed URLs to fold into the trend analysis.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "min_frequency": {
                        "title": "Minimum mentions",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "A topic must appear in at least this many articles to qualify.",
                        "default": 3
                    },
                    "max_results": {
                        "title": "Max trends returned",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Cap on the number of trending topics returned per run.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
