# AI Agent News Aggregator (`apiagent/ai-agent-news-aggregator`) Actor

One API call to fetch real-time AI Agent news from **GitHub**, **Hacker News**, and **X (Twitter)**. Quality-ranked by exponential decay scoring, cross-source deduplicated, structured JSON output — instantly ready for AI Agents, content creators, and researchers.

- **URL**: https://apify.com/apiagent/ai-agent-news-aggregator.md
- **Developed by:** [Agent Wang](https://apify.com/apiagent) (community)
- **Categories:** AI, Agents, News
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## AI Agent News Aggregator - GitHub, HN & X Multi-Source Feed

One API call to fetch real-time AI Agent news from **GitHub**, **Hacker News**, and **X (Twitter)**. Quality-ranked by exponential decay scoring, cross-source deduplicated, structured JSON output — instantly ready for AI Agents, content creators, and researchers.

***

### Why This Actor?

| Feature | This Actor | Single-Source Scrapers |
|---------|-----------|----------------------|
| Data Sources | 3 (GitHub + HN + X) | 1 |
| Quality Ranking | ✅ Exponential decay (12h half-life) | ❌ Chronological only |
| Cross-Source Dedup | ✅ URL normalization + MD5 fingerprint | ❌ |
| Zero Setup | ✅ GitHub & HN work instantly | Varies |
| AI-Ready Output | ✅ Structured JSON with engagement metrics | Raw data |
| x402 Micropayment | ✅ Agent-to-Agent billing ready | ❌ |

***

### Use Cases

- **AI Agent Developers** — Feed real-time industry news to your agent's knowledge base
- **Content Creators** — Track trending AI topics across platforms for content ideas
- **Researchers** — Monitor AI Agent ecosystem developments and sentiment
- **Investors** — Track GitHub stars, HN discussions, and X conversations

***

### ⚡ Quick Start (No Setup Required)

1. Click **"Run"** with default settings → instant GitHub + HN data (no API keys needed)
2. *(Optional)* To enable **X (Twitter)**, paste your X session cookies into `twitterCookies`
3. Coming soon: Reddit News & Business Subscription!

***

### 📋 Input Presets

#### Preset A: Zero-Setup Mode (Fastest)

```json
{
  "keywords": ["AI Agent", "LLM"],
  "sources": ["hackernews", "github"],
  "timeRange": "24h",
  "maxItems": 30
}
```

#### Preset B: Full Cross-Platform Mode (Includes X)

Requires X burner account cookies (see [How to Get Cookies](#-how-to-get-xtwitter-cookies)):

```json
{
  "keywords": ["AI Agent", "Claude Code"],
  "sources": ["hackernews", "github", "twitter"],
  "timeRange": "7d",
  "maxItems": 50,
  "twitterCookies": "[{\"name\":\"auth_token\",\"value\":\"...\"},{\"name\":\"ct0\",\"value\":\"...\"}]"
}
```

***

### 🛠️ Input Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `keywords` | `array` | `["AI Agent"]` | Search keywords. Supports English/Chinese mixed terms. |
| `sources` | `array` | `["hackernews","github"]` | Platforms: `hackernews`, `github`, `twitter`. |
| `timeRange` | `string` | `"24h"` | Time horizon: `"1h"`, `"6h"`, `"24h"`, `"7d"`. |
| `maxItems` | `integer` | `30` | Max deduplicated items in output. |
| `twitterCookies` | `string` | `""` | Optional. X session cookies (JSON array or Netscape .txt). |

***

### 📊 Output Schema

Unified output with quality scoring across all sources:

```json
{
  "id": "github_1223170290",
  "source": "github",
  "title": "open-design",
  "url": "https://github.com/nexu-io/open-design",
  "author": { "handle": "nexu-io", "followers": 0 },
  "content": "The open-source Claude Design alternative...",
  "engagement": { "likes": 80235, "retweets": 9251, "replies": 0, "views": 0, "comments": 0 },
  "metrics": { "score": 108354.28, "engagementRate": 0.0, "viralityScore": 0 },
  "publishedAt": "2026-07-21T12:00:19Z",
  "fetchedAt": "2026-07-21T12:02:46Z"
}
```

**Score Formula:** `S = Engagement × e^(-λ × hours_old) × SourceWeight`

- `λ = ln(2) / 12` (12-hour half-life)
- Source weights: HN 1.5×, Twitter 1.2×, GitHub 1.1×

***

### 🍪 How to Get X/Twitter Cookies

> **⚠️ WARNING**: Always use a **burner/alt X account**. Never use your personal main account. Automated scraping may trigger X's anti-abuse system.

Since `auth_token` is `HttpOnly`, you **must use a browser extension**:

1. Log into [x.com](https://x.com) with your **burner account**
2. Install a cookie export extension:
   - **Cookie-Editor** (Chrome/Firefox/Edge) → Export as JSON
   - **Get cookies.txt** (Chrome/Firefox) → Export as .txt
3. Paste the exported content into `twitterCookies`

The Actor auto-parses both JSON arrays and Netscape `.txt` formats.

**Cookies expire in 2-4 weeks.** Re-export when you see `401` or `403` errors.

***

### 🛡️ Anti-Detection (X/Twitter)

| Protection | Implementation |
|------------|---------------|
| **Sticky Session Proxy** | Fixed residential IP per account |
| **Error Recovery** | Auto-detect 401/403/rate-limit, graceful degradation |

***

### 💰 Pricing & Billing

All resource consumption (Compute Units + Apify Residential Proxy) is deducted from your Apify subscription credits. No additional fees until credits are consumed.

***

### 📈 Performance

| Source | Items per Query | Latency |
|--------|----------------|---------|
| GitHub | 50-100 repos | ~5s |
| Hacker News | 30-60 stories | ~3s |
| X/Twitter | 10-30 tweets | ~15s |
| **Full 3-Source** | **100-200 items** | **< 30s** |

Cross-source dedup typically removes 20-40% overlap.

***

### 🔗 Related

- [Apify Actor Page](https://console.apify.com/actors/m80mvY0ya02p4qGHR)

# Actor input Schema

## `keywords` (type: `array`):

Search keywords to monitor across platforms.

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

Select platforms to scrape. Options: hackernews, github, twitter (requires cookie). Coming soon: Reddit News & Business Subscription!

## `timeRange` (type: `string`):

Time range for the posts.

## `maxItems` (type: `integer`):

Maximum number of items to return in the final dataset.

## `minEngagement` (type: `integer`):

Minimum engagement threshold (likes + retweets + replies).

## `twitterCookies` (type: `string`):

Paste JSON cookies from x.com to enable Twitter aggregation.

## `proxyConfiguration` (type: `object`):

Apify residential proxy settings to prevent IP blocking.

## Actor input object example

```json
{
  "keywords": [
    "AI Agent"
  ],
  "sources": [
    "hackernews",
    "github"
  ],
  "timeRange": "24h",
  "maxItems": 30,
  "minEngagement": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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("apiagent/ai-agent-news-aggregator").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("apiagent/ai-agent-news-aggregator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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 apiagent/ai-agent-news-aggregator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apiagent/ai-agent-news-aggregator"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/m80mvY0ya02p4qGHR/builds/MXeWAXbbp9GqezkQP/openapi.json
