# Reddit Trends Scraper 🔍 (`easyapi/reddit-trends-scraper`) Actor

Extract trending posts and discussions from Reddit with advanced filtering capabilities. Scrapes post details, engagement metrics, and user information while handling dynamic content loading.

- **URL**: https://apify.com/easyapi/reddit-trends-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media, Integrations, Other
- **Stats:** 123 total users, 2 monthly users, 96.6% runs succeeded, 8 bookmarks
- **User rating**: 2.13 out of 5 stars

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Reddit Trends Scraper 🔍

### 📋 Overview

Reddit Trends Scraper is a powerful tool that helps you extract trending content and discussions from Reddit. It automatically scrolls through Reddit pages and captures comprehensive data about posts, including engagement metrics, author information, and community details.

### ✨ Features

- 🔄 Handles dynamic content loading through infinite scrolling
- 📊 Captures detailed post metrics (upvotes, comments)
- 👥 Extracts user and community information
- ⚡ Supports proxy configuration for reliable scraping
- 🎯 Customizable maximum items limit
- 🕒 Includes post timestamp and engagement data
- 🔗 Provides direct links to posts, subreddits, and user profiles

### 📊 Output Data Structure

The actor extracts the following data for each Reddit post:

- `title` - Post title
- `postUrl` - Direct link to the post
- `upvotes` - Number of upvotes
- `comments` - Number of comments
- `subreddit` - Community name
- `subredditUrl` - Link to the subreddit
- `subredditType` - Type of post (link, image, text, etc.)
- `author` - Username of the poster
- `authorProfile` - Link to author's profile
- `postTime` - Timestamp of the post

### 💡 Use Cases

- 📈 Track trending topics and discussions
- 🎯 Monitor specific subreddits for content
- 📊 Analyze engagement patterns
- 🔍 Research community interests
- 📱 Social media monitoring
- 🎨 Content inspiration and curation

### 💪 Benefits

- Automated data collection from Reddit
- Real-time trend monitoring
- Comprehensive post analytics
- Clean, structured data output
- Reliable performance with proxy support

### ⚙️ Setup & Usage

1. Set your desired maximum number of items to scrape
2. Configure proxy settings (optional)
3. Run the actor and collect your data

### 📝 Input Parameters

- `maxItems` - Maximum number of posts to scrape (default: 100)
- `proxyConfiguration` - Optional proxy settings for reliable scraping

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
    {
        "title": "Democratic Rep. Al Green removed after disrupting Trump's speech",
        "postUrl": "https://www.reddit.com/r/politics/comments/1j3sv5s/democratic_rep_al_green_removed_after_disrupting/",
        "upvotes": 20799,
        "comments": 1270,
        "subreddit": "r/politics",
        "subredditUrl": "https://www.reddit.com/r/politics/",
        "subredditType": "link",
        "author": "nbcnews",
        "authorProfile": "https://www.reddit.com/user/nbcnews",
        "postTime": "2025-03-05 02:38:36"
    },
    ...
]
```

### 🤝 Related Actors

- 🎥 [TikTok Videos Scraper](https://apify.com/easyapi/tiktok-videos-scraper) - Extract comprehensive video metadata with advanced filtering capabilities
- 📱 [TikTok LIVE Scraper](https://apify.com/easyapi/tiktok-live-scraper) - Get real-time data from TikTok live streams with viewer metrics
- 👥 [TikTok Following Scraper](https://apify.com/easyapi/tiktok-following-scraper) - Extract detailed TikTok following list information
- 🔵 [Facebook Following Scraper](https://apify.com/easyapi/facebook-following-scraper) - Scrape Facebook following relationships and profile details
- 📝 [Reddit Posts Search Scraper](https://apify.com/easyapi/reddit-posts-search-scraper) - Extract Reddit posts with rich metadata and engagement metrics
- 👻 [Snapchat User Stories Scraper](https://apify.com/easyapi/snapchat-user-stories-scraper) - Scrape public Snapchat user stories and media content
- 🎯 [Snapchat Spotlight Detail Scraper](https://apify.com/easyapi/snapchat-spotlight-detail-scraper) - Extract Snapchat Spotlight videos with engagement data
- 👥 [VK Groups Scraper](https://apify.com/easyapi/vk-groups-scraper) - Comprehensive VK group and community data extraction
- 👤 [VK People Scraper](https://apify.com/easyapi/vk-people-scraper) - Extract detailed VK user profile information
- 📸 [Instagram Profile Scraper](https://apify.com/easyapi/instagram-profile-scraper) - Gather comprehensive Instagram profile metrics
- 🖼️ [Instagram Post Detail Scraper](https://apify.com/easyapi/instagram-post-detail-scraper) - Extract detailed Instagram post information
- 📊 [Instagram Hashtag Scraper](https://apify.com/easyapi/instagram-hashtag-scraper) - Scrape Instagram hashtag posts and metrics
- 💬 [Instagram Comments Scraper](https://apify.com/easyapi/instagram-comments-scraper) - Extract Instagram post comments and engagement
- 📱 [Instagram Story Scraper](https://apify.com/easyapi/instagram-story-scraper) - Collect Instagram story content and metrics
- 🛍️ [Tokopedia Product Search Scraper](https://apify.com/easyapi/tokopedia-product-search-scraper) - Extract detailed product data from Tokopedia search results

# Actor input Schema

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

Maximum number of Reddit posts to scrape

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

Proxy settings for the scraper

## Actor input object example

```json
{
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "maxItems": 30,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/reddit-trends-scraper").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 = {
    "maxItems": 30,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/reddit-trends-scraper").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 '{
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call easyapi/reddit-trends-scraper --silent --output-dataset

```

## MCP server setup

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

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/IZT0gcMFhWf9TJuAp/builds/oIgMap78Ce5DCkZV1/openapi.json
