# Reddit: Trending Subreddit Actor (`pintostudio/reddit-trending-subreddit-actor`) Actor

The Reddit: Trending Subreddit Actor allows you to retrieve a paginated list of trending/popular subreddits from Reddit, including rich metadata such as subscriber counts, descriptions, NSFW status, creation date, and more.

- **URL**: https://apify.com/pintostudio/reddit-trending-subreddit-actor.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Categories:** Social media, Other, Automation
- **Stats:** 9 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.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 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: Trending Subreddit Actor

The **Reddit: Trending Subreddit Actor** allows you to retrieve a paginated list of **trending/popular subreddits** from Reddit, including rich metadata such as subscriber counts, descriptions, NSFW status, creation date, and more.

This actor is ideal for:

- Market research
- Trend analysis
- Content discovery
- Social media monitoring
- Data enrichment pipelines

***

### 🚀 How It Works

You provide pagination parameters (`limit` and `page`), and the actor returns a structured list of trending subreddits for that page.

The results are:

- Stored in the **default dataset**
- Saved under the **OUTPUT** key for easy retrieval

***

### 🔧 Input Parameters

The actor expects a JSON input with the following fields:

#### Input Schema

| Field   | Type    | Required | Description                             |
| ------- | ------- | -------- | --------------------------------------- |
| `limit` | integer | ✅ Yes    | Number of subreddits to return per page |
| `page`  | integer | ✅ Yes    | Page number to fetch (1-based index)    |

#### Constraints

- `limit`: minimum **1**, maximum **100**
- `page`: minimum **1**

#### Default Values

```json
{
  "limit": 25,
  "page": 1
}
```

***

### 📝 Example Input

```json
{
  "limit": 25,
  "page": 1
}
```

***

### 📤 Output

The actor returns a JSON object describing the requested page of trending subreddits.

#### Output Structure

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "type": "popular",
    "page": 1,
    "limit": 25,
    "count": 25,
    "after": "t5_2cneq",
    "subreddits": [ ... ]
  },
  "error": null
}
```

***

### 📊 Output Fields Explained

#### Root Fields

| Field     | Type          | Description                             |
| --------- | ------------- | --------------------------------------- |
| `success` | boolean       | Indicates if the request was successful |
| `message` | string        | Status message                          |
| `data`    | object        | Main payload with subreddit data        |
| `error`   | string | null | Error message if the request fails      |

***

#### `data` Object

| Field        | Type   | Description                   |
| ------------ | ------ | ----------------------------- |
| `type`       | string | Type of listing (`popular`)   |
| `page`       | number | Current page number           |
| `limit`      | number | Items requested per page      |
| `count`      | number | Number of subreddits returned |
| `after`      | string | Pagination cursor             |
| `subreddits` | array  | List of subreddit objects     |

***

#### `subreddits` Object

Each subreddit contains the following fields:

| Field               | Type           | Description                 |
| ------------------- | -------------- | --------------------------- |
| `name`              | string         | Subreddit name              |
| `title`             | string         | Display title               |
| `description`       | string         | Full subreddit description  |
| `subscribers`       | number         | Total subscribers           |
| `activeUsers`       | number | null  | Active users (if available) |
| `created`           | string (ISO)   | Creation date               |
| `nsfw`              | boolean        | NSFW flag                   |
| `language`          | string         | Detected language           |
| `url`               | string         | Subreddit URL               |
| `icon`              | string         | Icon image URL              |
| `banner`            | string         | Banner image URL            |
| `submitText`        | string         | Submission guidelines       |
| `isQuarantined`     | boolean        | Quarantine status           |
| `communityReviewed` | boolean        | Community review status     |
| `allowVideos`       | boolean        | Video posting enabled       |
| `allowDiscussions`  | boolean | null | Discussion support          |
| `allowDiscovery`    | boolean        | Discoverability enabled     |
| `isAdvertiserOnly`  | boolean | null | Advertiser-only flag        |

***

### 📦 Dataset & Storage

- All results are pushed to the **default Apify dataset**
- The full response is also stored under the key:

```
OUTPUT
```

You can retrieve it via:

- Apify Console
- Apify API
- Apify SDK (`Actor.getValue('OUTPUT')`)

***

### ⚠️ Error Handling

If an error occurs:

- The actor fails execution
- An error record is pushed to the dataset

#### Error Output Example

```json
{
  "data": null,
  "error": "limit and page are required in the input",
  "timestamp": "2026-01-09T10:15:30.000Z"
}
```

***

### ✅ Best Practices

- Use smaller `limit` values for faster pagination
- Increment `page` to retrieve more trending subreddits
- Combine with scheduled runs to track trends over time

***

### 📌 Summary

- ✔ Fetch trending Reddit subreddits
- ✔ Paginated and structured output
- ✔ Rich metadata per subreddit
- ✔ Easy dataset and OUTPUT access

***

### Support

For issues, questions, or feature requests, please refer to the Apify platform documentation or:

1. Create an issue and share your resource
2. Send us private message
3. Contact us via Telegram: @pintoflow

# Actor input Schema

## `limit` (type: `integer`):

The number of subreddits to return per page

## `page` (type: `integer`):

The page number to return (1-based)

## Actor input object example

```json
{
  "limit": 25,
  "page": 1
}
```

# 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 = {
    "limit": 25,
    "page": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pintostudio/reddit-trending-subreddit-actor").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 = {
    "limit": 25,
    "page": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("pintostudio/reddit-trending-subreddit-actor").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 '{
  "limit": 25,
  "page": 1
}' |
apify call pintostudio/reddit-trending-subreddit-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pintostudio/reddit-trending-subreddit-actor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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