# 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:** 2 total users, 0 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/platform/actors/running/actors-in-store#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.

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## 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("💾 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 apiagent/ai-agent-news-aggregator --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AI Agent News Aggregator",
        "description": "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.",
        "version": "1.0",
        "x-build-id": "MXeWAXbbp9GqezkQP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apiagent~ai-agent-news-aggregator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apiagent-ai-agent-news-aggregator",
                "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/apiagent~ai-agent-news-aggregator/runs": {
            "post": {
                "operationId": "runs-sync-apiagent-ai-agent-news-aggregator",
                "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/apiagent~ai-agent-news-aggregator/run-sync": {
            "post": {
                "operationId": "run-sync-apiagent-ai-agent-news-aggregator",
                "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": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Search keywords to monitor across platforms.",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "AI Agent"
                        ]
                    },
                    "sources": {
                        "title": "Data Sources",
                        "type": "array",
                        "description": "Select platforms to scrape. Options: hackernews, github, twitter (requires cookie). Coming soon: Reddit News & Business Subscription!",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "hackernews",
                            "github"
                        ]
                    },
                    "timeRange": {
                        "title": "Time Range",
                        "enum": [
                            "1h",
                            "6h",
                            "24h",
                            "7d",
                            "30d"
                        ],
                        "type": "string",
                        "description": "Time range for the posts.",
                        "default": "24h"
                    },
                    "maxItems": {
                        "title": "Max Output Items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of items to return in the final dataset.",
                        "default": 30
                    },
                    "minEngagement": {
                        "title": "Min Engagement",
                        "type": "integer",
                        "description": "Minimum engagement threshold (likes + retweets + replies).",
                        "default": 0
                    },
                    "twitterCookies": {
                        "title": "X/Twitter Session Cookies (Optional)",
                        "type": "string",
                        "description": "Paste JSON cookies from x.com to enable Twitter aggregation."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify residential proxy settings to prevent IP blocking.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
