# Reddit Advanced Search: Keyword Inside a Subreddit

Searches inside a single subreddit (searchSubreddit) for your keyword and returns the matching posts, sorted by relevance, top or new, with a time filter. Good for finding every discussion of a tool or topic in one community.

- Actor: openclawai/reddit-scraper (Reddit Scraper), https://datapika.com/actors/reddit-scraper
- Run on Apify: https://apify.com/openclawai/reddit-scraper
- Tested: 2026-11-23, 5 rows in 13 seconds, $0.01 at free-plan prices

## Input

```json
{
  "searches": [
    "uv package manager"
  ],
  "searchSubreddit": "Python",
  "sort": "relevance",
  "maxItems": 100
}
```

## Output fields

- `title`: Title
- `subreddit`: Subreddit
- `author`: Author
- `score`: Score
- `upvoteRatio`: Upvote %
- `numComments`: Comments
- `flair`: Flair
- `createdAt`: Posted
- `url`: Link

## Sample rows (personal data masked)

```json
[
  {
    "title": "Is UV still worth learning/switching to now that it's owned by OpenAI?",
    "subreddit": "Python",
    "author": "WellEndowedWizard",
    "score": 363,
    "upvoteRatio": 0.9,
    "numComments": 166,
    "flair": "Discussion",
    "createdAt": "2026-05-21T15:50:51Z",
    "url": "https://www.reddit.com/r/Python/comments/1tjonyf/is_uv_still_worth_learningswitching_to_now_that/"
  },
  {
    "title": "Anyone used UV package manager in production",
    "subreddit": "Python",
    "author": "batman-iphone",
    "score": 229,
    "upvoteRatio": 0.93,
    "numComments": 88,
    "flair": "Discussion",
    "createdAt": "2025-02-25T10:29:34Z",
    "url": "https://www.reddit.com/r/Python/comments/1ixryec/anyone_used_uv_package_manager_in_production/"
  },
  {
    "title": "What are you using to manage your dev environments in 2026?",
    "subreddit": "Python",
    "author": "Prime_Director",
    "score": 90,
    "upvoteRatio": 0.83,
    "numComments": 159,
    "flair": "Discussion",
    "createdAt": "2026-08-04T02:34:03Z",
    "url": "https://www.reddit.com/r/Python/comments/1vexrvf/what_are_you_using_to_manage_your_dev/"
  }
]
```

Full sample: https://datapika.com/data/tasks/reddit-search-inside-subreddit.json

## How to run it

1. **Open the actor on Apify.** Click Copy input, then Run on Apify to open the Reddit Scraper. Sign in or create a free account, open the JSON tab of the input form and paste the input.
2. **Start the "Reddit Advanced Search: Keyword Inside a Subreddit" task.** Press Start. Change any input field first if you need a different topic, account or size; the fields are listed above.
3. **Get the results.** Rows arrive in a dataset while the run works. Our test returned 5 rows in 13 seconds.
4. **Use the data.** Download JSON, CSV or Excel, call the run from the API, schedule it, or let an AI agent run it through MCP.

API (replace the token):

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/openclawai~reddit-scraper/run-sync-get-dataset-items?maxTotalChargeUsd=1" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searches":["uv package manager"],"searchSubreddit":"Python","sort":"relevance","maxItems":100}'
```

## Change it

- Put your own keywords in searches; each keyword runs as its own search.
- Set searchSubreddit to keep the search inside one community.
- Raise maxItems for a bigger dataset; you pay per result delivered.

## FAQ

### Can I combine keyword and subreddit filters?

Yes. searches holds the keywords and searchSubreddit the community; sort and time narrow the results further.

### Do I need a Reddit account or API key?

No. It reads public Reddit data anonymously, with no login, cookie, app registration or API key.

### How much does it cost?

You pay per result delivered to your dataset: posts, comments, users or communities. There is no start fee. The current prices are on the Pricing tab.

### How do I export the results?

Download the dataset as JSON, CSV or Excel, read it through the Apify API, or run the task from an AI agent through the Apify MCP server.
