# Reddit Search Posts (`igview-owner/reddit-post-viewer`) Actor

Scrape Reddit search results into clean datasets without login. Get post text, author info, subreddit details, engagement metrics, and media URLs for any keyword or topic. Perfect for research, sentiment analysis, and trend tracking.

- **URL**: https://apify.com/igview-owner/reddit-post-viewer.md
- **Developed by:** [Sachin Kumar Yadav](https://apify.com/igview-owner) (community)
- **Categories:** Automation, Developer tools, Social media
- **Features:** Limited permissions
- **Stats:** 124 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Search Post Scraper

**Search and scrape Reddit posts with comprehensive data extraction. Get post content, author info, subreddit details, engagement metrics, media URLs, and more. Perfect for content research, sentiment analysis, and data collection.**

### 📋 Table of Contents

- [🚀 Features](#-features)
- [🎯 Use Cases](#-use-cases)
- [⚡ Quick Start](#-quick-start)
- [📊 Input Parameters](#-input-parameters)
- [📤 Output Format](#-output-format)
- [ Best Practices](#-best-practices)
- [❓ FAQ](#-faq)

### 🚀 Features

- ✅ **No Login Required** - Search Reddit without authentication
- ✅ **Comprehensive Data** - Extract 30+ fields per post
- ✅ **Advanced Filters** - Sort by relevance, hot, top, new, or comments
- ✅ **Time Range** - Filter by hour, day, week, month, year, or all-time
- ✅ **NSFW Control** - Include or exclude adult content
- ✅ **Auto Pagination** - Automatically fetch multiple pages until limit
- ✅ **Post Content** - Get markdown, HTML, and text preview
- ✅ **Subreddit Info** - Name, subscribers, type, and NSFW status
- ✅ **Author Data** - Username, profile icon, and cake day status
- ✅ **Engagement Metrics** - Score, upvote ratio, comments, and views
- ✅ **Media URLs** - Thumbnails and media links when available
- ✅ **Post Metadata** - Flair, timestamps, locked/archived status

### 🎯 Use Cases

- 📊 **Sentiment Analysis** - Analyze public opinion on topics
- 🎓 **Academic Research** - Collect data for social media studies
- 📈 **Trend Analysis** - Track trending topics and discussions
- 💼 **Market Research** - Understand audience preferences and behavior
- 📢 **Brand Monitoring** - Track brand mentions and reputation
- 🔍 **Content Discovery** - Find relevant posts for your niche
- � **Social Listening** - Monitor conversations and feedback
- 🤖 **AI Training Data** - Collect text data for machine learning

### ⚡ Quick Start

#### 1️⃣ Basic Search

```json
{
  "query": "artificial intelligence",
  "sort": "relevance",
  "time": "all",
  "nsfw": false,
  "maxResults": 25
}
```

#### 2️⃣ Top Posts from Past Week

```json
{
  "query": "technology news",
  "sort": "top",
  "time": "week",
  "nsfw": false,
  "maxResults": 50
}
```

#### 3️⃣ Latest Discussions

```json
{
  "query": "climate change",
  "sort": "new",
  "time": "day",
  "nsfw": false,
  "maxResults": 100
}
```

### 📊 Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `query` | String | ✅ | - | Search query (1-300 characters) |
| `sort` | String | ❌ | `relevance` | Sort: relevance, hot, top, new, comments |
| `time` | String | ❌ | `all` | Time: all, year, month, week, day, hour |
| `nsfw` | Boolean | ❌ | `false` | Include NSFW content |
| `maxResults` | Integer | ❌ | `25` | Max posts: 1-100 (auto-pagination) |

#### Sort Options

- **relevance** - Most relevant to query
- **hot** - Currently trending
- **top** - Highest rated
- **new** - Latest posts
- **comments** - Most discussed

#### Time Filters

- **all** - All time
- **year** - Past 12 months
- **month** - Past 30 days
- **week** - Past 7 days
- **day** - Past 24 hours
- **hour** - Past 60 minutes

### 📤 Output Format

Each post contains 30+ fields with comprehensive data:

```json
{
  "postId": "t3_x56f42",
  "postTitle": "Please tell me how I can delete DELETED pictures from my phone",
  "url": "https://www.reddit.com/r/privacy/comments/x56f42/...",
  "permalink": "https://reddit.com/r/privacy/comments/x56f42/...",
  "contentPreview": "I am in a lot of trouble right now and I need help...",
  "contentMarkdown": "Full markdown content...",
  "contentHtml": "Full HTML content...",
  "subredditId": "t5_2qhlc",
  "subredditName": "privacy",
  "subredditPrefixedName": "r/privacy",
  "subredditTitle": "Privacy in the digital age",
  "subredditSubscribers": 1543277,
  "subredditIsNsfw": false,
  "subredditType": "PUBLIC",
  "authorId": "t2_pfuj49vx",
  "authorName": "Level-Monk6085",
  "authorIcon": "https://styles.redditmedia.com/...",
  "authorIsCakeDay": false,
  "score": 189,
  "upvoteRatio": 87.06,
  "commentCount": 166,
  "viewCount": null,
  "createdAt": "2022-09-03T22:17:42.128000+0000",
  "editedAt": "2022-09-04T21:01:48.903000+0000",
  "isNsfw": false,
  "isSpoiler": false,
  "isLocked": false,
  "isArchived": true,
  "isStickied": false,
  "isGildable": true,
  "isSelfPost": true,
  "flair": "discussion",
  "flairType": "text",
  "flairBackgroundColor": "#DADADA",
  "flairTextColor": "DARK",
  "mediaType": "Text",
  "hasMedia": false,
  "thumbnail": null,
  "mediaUrl": null,
  "mediaDownloadUrl": null,
  "mediaStreamingUrl": null,
  "domain": "self.privacy",
  "postHint": null,
  "distinguishedAs": null,
  "scrapedAt": "2025-11-30T15:30:00.000Z"
}
```

#### Key Fields

| Category | Fields |
|----------|--------|
| **Post** | postId, postTitle, url, permalink, contentPreview, contentMarkdown, contentHtml |
| **Subreddit** | subredditName, subredditSubscribers, subredditType, subredditIsNsfw |
| **Author** | authorName, authorIcon, authorIsCakeDay |
| **Engagement** | score, upvoteRatio, commentCount, viewCount |
| **Metadata** | createdAt, editedAt, flair, isNsfw, isSpoiler, isLocked, isArchived |
| **Media** | mediaType, hasMedia, thumbnail, mediaUrl, mediaDownloadUrl |

### Best Practices

1. **Use specific queries** - More targeted searches yield better results
2. **Choose appropriate sort** - Use 'top' for popular content, 'new' for latest
3. **Set time ranges** - Filter by time period for relevant results
4. **Start small** - Test with 25-50 posts before scaling up
5. **Use dataset views** - Apify provides 4 table views (Overview, Detailed, Engagement, Media)
6. **Handle pagination** - Actor automatically paginates until maxResults

#### Important Notes

- ✅ No Reddit login required
- ✅ Extracts all post types (text, image, video, link)
- ✅ Automatic pagination support
- ⚠️ Maximum 100 posts per run
- ⚠️ Deleted posts show `[deleted]` as author

### ❓ FAQ

**Q: Do I need a Reddit account?**\
A: No! Works without any login or authentication.

**Q: How many posts can I scrape?**\
A: Up to 100 posts per run with automatic pagination.

**Q: What data is extracted?**\
A: 30+ fields including post content, author info, subreddit details, engagement metrics, and media URLs.

**Q: Can I search specific subreddits?**\
A: Actor searches all subreddits. Include subreddit name in query for better targeting (e.g., "AI r/technology").

**Q: Are media URLs included?**\
A: Yes! Thumbnails and media URLs are extracted when available.

**Q: How fast is the scraper?**\
A: Typically 3-8 seconds per page. Pagination adds ~1 second delay between pages.

**Q: Is this legal?**\
A: Yes, scrapes publicly available Reddit content. Follow Reddit's Terms of Service and use responsibly.

***

### 🚀 **Get Started Now**

**Ready to search Reddit and download media content?**

1. Click ["Try for free"](https://apify.com?fpr=ykgg9c) to test the actor
2. Enter your search query and configure filters
3. Get comprehensive media data with direct download links

**⭐ If this actor helps your workflow, please give it a star!**

***

### Related Actors 🤝

- **[Reddit User Data Scraper](https://apify.com/igview-owner/reddit-user-data-scraper)** - Extract user profiles and post history
- **[Reddit Search Scraper](https://apify.com/igview-owner/reddit-search-scraper)** - Search Reddit posts by keywords
- **[Reddit Comments Scraper](https://apify.com/igview-owner/reddit-comments-scraper)** – extract comments from specific threads.
- **[Reddit Post Viewer](https://apify.com/igview-owner/reddit-post-viewer)** – fetch detailed data for individual Reddit posts.

***

### 🏷️ Tags

`reddit scraper` `reddit search` `reddit api` `reddit data extraction` `reddit post scraper` `reddit content scraper` `reddit automation` `reddit data mining` `reddit trend analysis` `reddit sentiment analysis` `reddit research` `reddit posts` `apify reddit` `reddit dataset`

***

**Disclaimer**: Scrapes publicly available Reddit content only. Users must comply with Reddit's Terms of Service. Use responsibly and ethically.

# Actor input Schema

## `query` (type: `string`):

🎯 Enter your Reddit search query to find relevant posts. The search will look for the term in the title and selftext of the post.

## `subreddit` (type: `string`):

Limit your search to a specific subreddit. Example: 'askscience' or 'technology'. Do NOT include 'r/' before the subreddit name.

## `author` (type: `string`):

Limit your search to submissions made by a specific Reddit user. Example: 'spez' or 'MockDeath'. Do NOT include 'u/' before the author name.

## `sort` (type: `string`):

🎚️ Choose how to sort search results chronologically:

## `time` (type: `string`):

📅 Filter posts made after a certain time period:

## `nsfw` (type: `boolean`):

🚨 Control NSFW (Not Safe For Work) content filtering:
Default is disabled for safe browsing. Note: The scraper will filter out NSFW markers from the fetched data.

## `maxResults` (type: `integer`):

🔢 Set the maximum number of posts to scrape. The scraper will fetch up to 100 per request. Recommended range: 10-1000 posts.

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

Select proxies to be used by the scraper. Apify Residential Proxy is enabled by default for high reliability.

## Actor input object example

```json
{
  "query": "technology",
  "sort": "desc",
  "time": "all",
  "nsfw": false,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Open the dataset view with an overview of all Reddit posts including title, subreddit, author, score, and comments.

## `detailed` (type: `string`):

View detailed information including content previews, subreddit metrics, flair, domains, and precise engagement ratios.

## `engagement` (type: `string`):

Analyze post performance with score, upvote ratio, comments, views, and post statuses like locked or archived.

## `media` (type: `string`):

Access media metadata including thumbnails, media type hints, external links, and primary content URLs.

# 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 = {
    "query": "technology",
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("igview-owner/reddit-post-viewer").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 = {
    "query": "technology",
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("igview-owner/reddit-post-viewer").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 '{
  "query": "technology",
  "maxResults": 100
}' |
apify call igview-owner/reddit-post-viewer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,igview-owner/reddit-post-viewer"
        }
    }
}
```

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/N4COTpEuVpkQvRNju/builds/ydp7tWWYqQasxWBNI/openapi.json
