# Reddit Research Agent (`berkbirkan/reddit-research-agent`) Actor

Research Reddit using redditapis MCP and OpenRouter.

- **URL**: https://apify.com/berkbirkan/reddit-research-agent.md
- **Developed by:** [NEURALABZ LTD](https://apify.com/berkbirkan) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 llm usages

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/actors/running/actors-in-store.md#pay-per-event

## 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

## Reddit Research Agent

Research Reddit with natural-language tasks and receive a structured JSON answer. The Actor uses the official `redditapis-mcp` server for Reddit data and an OpenRouter model selected in the input.

### Quick start on Apify

1. Open the **Input** tab.
2. Enter a research task, or use the example below.
3. Select an OpenRouter model. `openrouter/auto` is selected by default.
4. Set the output schema and call limit if needed.
5. Click **Start**. The result is written to the run’s default dataset.

The input form is generated from `.actor/input_schema.json`, so users can run their own tasks directly from Apify without changing the source code.

### Example: WordPress in the last 24 hours

```json
{
  "task": "Son 24 saat içinde Reddit'te WordPress ile ilgili açılmış başlıkları araştır. En fazla 10 Reddit API çağrısı yap. Bulguları Türkçe özetle.",
  "model": "openrouter/auto",
  "output_schema": {"type":"object","properties":{"ozet":{"type":"string"}},"required":["ozet"]},
  "max_tokens": 1200,
  "max_api_calls": 10
}
```

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---:|---|
| `task` | string | — | Natural-language research instruction. Required. Include topic, time range, subreddit, language, and desired analysis. |
| `model` | select | `openrouter/auto` | OpenRouter model. The dropdown contains the current catalog plus Auto Router. |
| `output_schema` | object | `{ "type": "object" }` | JSON Schema for the required answer shape. |
| `max_tokens` | integer | `3000` | Maximum generated output tokens; allowed range `128–16000`. Larger values can increase LLM cost. |
| `max_api_calls` | integer | `5` | Hard maximum Reddit MCP/API tool calls; allowed range `1–10`. |

#### Output schema example

```json
{
  "type": "object",
  "properties": {"ozet": {"type": "string"}},
  "required": ["ozet"]
}
```

### Model selection

The model dropdown is generated from the OpenRouter catalog at deployment time and includes all models returned by OpenRouter plus `openrouter/auto`. Auto Router selects a suitable model automatically and the run metrics report the actual model and usage. The catalog changes over time; refresh the schema when publishing a new model snapshot.

### Billing

This is a pay-per-event Actor. The Actor charges the actual OpenRouter request cost and Reddit API usage, with the configured 25% commission applied before conversion to Apify PPE units.

- Reddit read API call: `$0.002`.
- `reddit_post_visibility`: `$0.004` because it performs two upstream reads.
- OpenRouter: actual provider-reported request cost.
- Apify applies the event unit price and the user’s maximum run charge. Review the Pricing tab for the active event price and platform-cost treatment.

### Data access and safety

Only public Reddit read tools are registered with Agno. Tools that manage the owner’s RedditAPIs account—monitors, webhooks, feedback, account information, and personal home feed—are excluded and cannot be called by the model. Posting, commenting, voting, and direct messages are not exposed by the upstream MCP server.

Do not place API keys in the task or output. Authentication is configured as secret Actor environment variables by the owner.

### Limitations

- Results depend on Reddit availability, indexing, deleted content, and the selected model.
- `max_api_calls` limits MCP tool calls, not posts returned by one endpoint.
- Large tool results increase LLM context and cost; focused tasks are recommended.

### Technical details

The Actor runs `redditapis-mcp@0.6.1` over stdio, uses Agno for orchestration, and uses OpenRouter through Agno’s OpenRouter integration. The production entrypoint is `src.actor`.

# Actor input Schema

## `task` (type: `string`):

Question or research task.

## `model` (type: `string`):

Any model ID from GET /models. Defaults to OpenRouter Auto Router.

## `output_schema` (type: `object`):

JSON schema for the research response.

## `max_tokens` (type: `integer`):

Maximum number of generated tokens.

## `max_api_calls` (type: `integer`):

Hard maximum number of MCP tool calls per run.

## Actor input object example

```json
{
  "model": "openrouter/auto",
  "output_schema": {
    "type": "object"
  },
  "max_tokens": 3000,
  "max_api_calls": 5
}
```

# 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("berkbirkan/reddit-research-agent").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("berkbirkan/reddit-research-agent").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 berkbirkan/reddit-research-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,berkbirkan/reddit-research-agent"
        }
    }
}
```

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/dIk9XbhBkxKwqGXBC/builds/rtdLDKgZLAFiJfrlm/openapi.json
