# Reddit Search Actor (`pintostudio/reddit-search-actor`) Actor

The Reddit Search Actor allows you to search Reddit and retrieve various types of content including posts, communities, media, and user profiles.

- **URL**: https://apify.com/pintostudio/reddit-search-actor.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Categories:** Social media, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 40 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.99 / 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/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 Actor Documentation

### Overview

The Reddit Search Actor allows you to search Reddit and retrieve various types of content including posts, communities, media, and user profiles. This tool is perfect for market research, trend analysis, content discovery, or monitoring specific topics across Reddit.

### Quick Start

#### Basic Search

To search for posts about "wallstreetbets":

```json
{
  "query": "wallstreetbets"
}
```

That's it! The actor will return the top 25 most relevant posts from all of Reddit.

### Input Parameters

#### Required Parameters

- **`query`** (string) - What you want to search for
  - Example: `"artificial intelligence"`, `"crypto news"`, `"gaming"`

#### Optional Parameters

##### Search Type (`type`)

Choose what kind of content to search for:

- `"posts"` (default) - Regular Reddit posts
- `"communities"` - Subreddits/communities
- `"media"` - Posts containing images or videos
- `"people"` - Reddit user profiles
- `"all"` - Returns all types in a single response

**Example:**

```json
{
  "query": "javascript",
  "type": "communities"
}
```

##### Subreddit Filter (`subredditUrl`)

Limit your search to a specific subreddit by providing its URL:

- Example: `"https://www.reddit.com/r/wallstreet"`
- Leave empty to search all of Reddit

##### Time Filter (`time`)

Filter results by time period:

- `"all"` (default) - All time
- `"hour"` - Past hour
- `"day"` - Past 24 hours
- `"week"` - Past week
- `"month"` - Past month
- `"year"` - Past year

**Example - Get today's trending posts:**

```json
{
  "query": "technology",
  "time": "day",
  "sortBy": "top"
}
```

##### Sort Order (`sortBy`)

Choose how to sort results:

- `"relevance"` (default) - Most relevant to your query
- `"hot"` - Currently trending
- `"new"` - Most recent first
- `"top"` - Highest voted
- `"rising"` - Gaining popularity
- `"controversial"` - Most debated

##### Pagination (`limit` and `page`)

- **`limit`** (1-100, default: 25) - Number of results per page
- **`page`** (1-50, default: 1) - Which page of results to fetch

**Example - Get 50 results from page 2:**

```json
{
  "query": "stocks",
  "limit": 50,
  "page": 2
}
```

### Usage Examples

#### Example 1: Find Popular Gaming Communities

```json
{
  "query": "gaming",
  "type": "communities",
  "sortBy": "relevance"
}
```

#### Example 2: Get This Week's Top Posts About AI

```json
{
  "query": "artificial intelligence",
  "type": "posts",
  "time": "week",
  "sortBy": "top",
  "limit": 50
}
```

#### Example 3: Search for Media in a Specific Subreddit

```json
{
  "query": "memes",
  "type": "media",
  "subredditUrl": "https://www.reddit.com/r/funny",
  "time": "day"
}
```

#### Example 4: Get All Content Types at Once

```json
{
  "query": "cryptocurrency",
  "type": "all",
  "time": "week"
}
```

#### Example 5: Find Users Discussing a Topic

```json
{
  "query": "data science",
  "type": "people"
}
```

### Response Format

#### Response Structure

All responses follow this structure:

```json
{
  "success": true,
  "message": "Success",
  "data": {
    // Response data here
  },
  "error": null
}
```

#### Response Data by Type

##### Posts Response (`type: "posts"`)

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "query": "wallstreetbets",
    "subreddit": "wallstreet",
    "page": 1,
    "limit": 25,
    "sort": "relevance",
    "time": "all",
    "type": "posts",
    "count": 25,
    "after": "t3_1g5hecm",
    "results": [
      {
        "id": "1nf54jp",
        "title": "Overheard two bankers discussing unannounced M&A deal at Starbucks...",
        "author": "deletedusssr",
        "subreddit": "wallstreet",
        "score": 954,
        "upvoteRatio": 0.92,
        "numComments": 493,
        "created": "2025-09-12T14:43:51.000Z",
        "url": "https://www.reddit.com/r/wallstreet/comments/1nf54jp/...",
        "permalink": "https://reddit.com/r/wallstreet/comments/1nf54jp/...",
        "isVideo": false,
        "isSelf": true,
        "selftext": "Just overheard the most insane conversation...",
        "thumbnail": "self",
        "domain": "self.wallstreet",
        "gilded": 0,
        "locked": false,
        "spoiler": false,
        "nsfw": false
      }
    ]
  },
  "error": null
}
```

**Post Object Fields:**

- `id` - Unique post identifier
- `title` - Post title
- `author` - Username who posted it
- `subreddit` - Which subreddit it's from
- `score` - Upvotes minus downvotes
- `upvoteRatio` - Percentage of upvotes (0.0 to 1.0)
- `numComments` - Number of comments
- `created` - ISO timestamp when posted
- `url` - Link to content (image, article, video, etc.)
- `permalink` - Link to the Reddit discussion page
- `isVideo` - Whether the post contains a video
- `isSelf` - Whether it's a text post
- `selftext` - Text content of the post (for text posts)
- `thumbnail` - Thumbnail image URL
- `domain` - Source domain of the link
- `gilded` - Number of Reddit awards
- `locked` - Whether comments are locked
- `spoiler` - Whether marked as spoiler
- `nsfw` - Whether marked as NSFW

##### Communities Response (`type: "communities"`)

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "query": "wallstreetbets",
    "subreddit": "all",
    "page": 1,
    "limit": 25,
    "sort": "relevance",
    "time": "all",
    "type": "communities",
    "count": 25,
    "after": "t5_3v3ihg",
    "results": [
      {
        "name": "wallstreetbets",
        "title": "wallstreetbets",
        "description": "Like 4chan found a Bloomberg Terminal.",
        "subscribers": 19706992,
        "icon": "https://a.thumbs.redditmedia.com/w-gbSE-QjkUuNjq2yPpekzEtN4CXRiL4tTO_XfloH80.png",
        "url": "https://reddit.com/r/wallstreetbets/"
      },
      {
        "name": "wallstreetbetsGER",
        "title": "wallstreetbetsGER",
        "description": "Alles rund um die Themen Aktien, Derivate & co!",
        "subscribers": 227665,
        "icon": "",
        "url": "https://reddit.com/r/wallstreetbetsGER/"
      }
    ]
  },
  "error": null
}
```

**Community Object Fields:**

- `name` - Subreddit name (without r/ prefix)
- `title` - Display title
- `description` - Community description
- `subscribers` - Number of members
- `icon` - Community icon/logo URL
- `url` - Direct link to the subreddit

##### Media Response (`type: "media"`)

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "query": "wallstreetbets",
    "subreddit": "all",
    "page": 1,
    "limit": 25,
    "sort": "relevance",
    "time": "all",
    "type": "media",
    "count": 25,
    "after": "t3_lhal3x",
    "results": [
      {
        "id": "1pw6ctr",
        "title": "WallStreetBets stock picks for 2026",
        "author": "GoodFortune67",
        "subreddit": "TheRaceTo10Million",
        "score": 1150,
        "upvoteRatio": 0.99,
        "numComments": 157,
        "created": "2025-12-26T15:05:13.000Z",
        "url": "https://i.redd.it/i5gbl4p1dk9g1.png",
        "permalink": "https://reddit.com/r/TheRaceTo10Million/comments/1pw6ctr/...",
        "isVideo": false,
        "isSelf": false,
        "selftext": "Last year, WSB ran a "one stock pick for 2025" thread...",
        "thumbnail": "https://b.thumbs.redditmedia.com/K48pof4NSP8B5HQezGuwwMa-ClXVHrZ4gU0S1Z7WMWI.jpg",
        "domain": "i.redd.it",
        "gilded": 0,
        "locked": false,
        "spoiler": false,
        "nsfw": false,
        "mediaType": "image"
      }
    ]
  },
  "error": null
}
```

**Media Object Fields:**

- All fields from Post Object, plus:
- `mediaType` - Type of media: `"image"` or `"video"`

##### People Response (`type: "people"`)

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "query": "wallstreetbets",
    "subreddit": "all",
    "page": 1,
    "limit": 25,
    "sort": "relevance",
    "time": "all",
    "type": "people",
    "count": 21,
    "after": null,
    "results": [
      {
        "username": "wallstreetbets",
        "karma": 942,
        "icon": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_7.png",
        "url": "https://reddit.com/user/wallstreetbets"
      },
      {
        "username": "WallstreetbetsElite",
        "karma": 1,
        "icon": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_2.png",
        "url": "https://reddit.com/user/WallstreetbetsElite"
      }
    ]
  },
  "error": null
}
```

**User Object Fields:**

- `username` - Reddit username
- `karma` - Total karma points
- `icon` - Profile picture URL
- `url` - Link to user's profile

##### All Types Response (`type: "all"`)

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "query": "wallstreetbets",
    "subreddit": "all",
    "page": 1,
    "limit": 25,
    "sort": "relevance",
    "time": "all",
    "type": "all",
    "results": {
      "posts": {
        "query": "wallstreetbets",
        "subreddit": "all",
        "page": 1,
        "limit": 25,
        "sort": "relevance",
        "time": "all",
        "type": "posts",
        "count": 25,
        "after": "t3_lhal3x",
        "results": [
          // Array of post objects (see Posts Response)
        ]
      },
      "communities": {
        "query": "wallstreetbets",
        "subreddit": "all",
        "page": 1,
        "limit": 25,
        "sort": "relevance",
        "time": "all",
        "type": "communities",
        "count": 25,
        "after": "t5_3v3ihg",
        "results": [
          // Array of community objects (see Communities Response)
        ]
      },
      "media": {
        "query": "wallstreetbets",
        "subreddit": "all",
        "page": 1,
        "limit": 25,
        "sort": "relevance",
        "time": "all",
        "type": "media",
        "count": 25,
        "after": "t3_lhal3x",
        "results": [
          // Array of media objects (see Media Response)
        ]
      },
      "people": {
        "query": "wallstreetbets",
        "subreddit": "all",
        "page": 1,
        "limit": 25,
        "sort": "relevance",
        "time": "all",
        "type": "people",
        "count": 21,
        "after": null,
        "results": [
          // Array of user objects (see People Response)
        ]
      }
    }
  },
  "error": null
}
```

#### Response Metadata Fields

Present in all response types:

- `query` - Your search term
- `subreddit` - Which subreddit was searched (or "all")
- `page` - Current page number
- `limit` - Number of results per page
- `sort` - Sort method used
- `time` - Time filter applied
- `type` - Type of search performed
- `count` - Number of results returned in this response
- `after` - Pagination token (for internal use)

### Tips for Best Results

1. **Be specific with queries** - "tesla stock analysis" works better than just "tesla"
2. **Use time filters for trending topics** - Set `time: "day"` or `time: "week"` for current events
3. **Combine filters** - Search specific subreddits with time filters for focused results
4. **Start small** - Use default `limit: 25` first, then increase if needed
5. **Type "all" for exploration** - Use `type: "all"` to discover communities, users, and posts in one search

### Common Use Cases

- **Market Research**: Track brand mentions and sentiment
- **Content Discovery**: Find trending topics and discussions
- **Community Analysis**: Identify relevant subreddits and active users
- **Trend Monitoring**: Track topics over time using time filters
- **Competitor Analysis**: Monitor discussions about competitors or products

### Rate Limits & Best Practices

- Results are cached for 2 min. to improve performance
- Stick to reasonable pagination limits (page 1-10 for most use cases)
- Use specific subreddit searches when possible to reduce load
- Combine with time filters to narrow results effectively

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

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

The search query to use on Reddit (e.g., 'wallstreetbets')

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

The type of content to search for

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

The time filter for the search results

## `subredditUrl` (type: `string`):

The full Reddit URL of the subreddit to search from (e.g., https://www.reddit.com/r/wallstreet)

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

Maximum number of comments to fetch (for comments operation)

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

Maximum number of comment pages to fetch (for comments operation)

## `sortBy` (type: `string`):

How to sort comments (for comments operation)

## Actor input object example

```json
{
  "query": "wallstreetbets",
  "type": "posts",
  "time": "all",
  "subredditUrl": "",
  "limit": 25,
  "page": 1,
  "sortBy": "hot"
}
```

# 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": "wallstreetbets",
    "type": "posts",
    "time": "all",
    "subredditUrl": "",
    "limit": 25,
    "page": 1,
    "sortBy": "hot"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pintostudio/reddit-search-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 = {
    "query": "wallstreetbets",
    "type": "posts",
    "time": "all",
    "subredditUrl": "",
    "limit": 25,
    "page": 1,
    "sortBy": "hot",
}

# Run the Actor and wait for it to finish
run = client.actor("pintostudio/reddit-search-actor").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": "wallstreetbets",
  "type": "posts",
  "time": "all",
  "subredditUrl": "",
  "limit": 25,
  "page": 1,
  "sortBy": "hot"
}' |
apify call pintostudio/reddit-search-actor --silent --output-dataset

```

## MCP server setup

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

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/igkhYlP2mQf1nLDh4/builds/lCalTX55EfH4S6UxP/openapi.json
