# Find Reddit comments that mention a keyword

**Use case:** 

Searches the comments of all Reddit for a keyword (here "web scraping"): comment text, author, score, date, subreddit, the title of the post it answers, its depth in the thread and its link. Use it for brand monitoring, to find leads asking for help or to read what people really say about a topic.

## Input

```json
{
  "postUrls": [],
  "startUrls": [],
  "query": "web scraping",
  "searchQueries": [],
  "searchSorts": [
    "new",
    "relevance",
    "top"
  ],
  "strictSearch": false,
  "subreddits": [],
  "subredditSource": "latestComments",
  "sort": "new",
  "timeFilter": "all",
  "maxThreadsPerSubreddit": 25,
  "minComments": 0,
  "usernames": [],
  "maxItems": 50,
  "maxItemsPerQuery": 0,
  "maxCommentsPerPost": 0,
  "maxCommentDepth": 10,
  "expandMoreComments": true,
  "commentSort": "top",
  "includePosts": false,
  "includeNsfw": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "minScore": 0,
  "authors": [],
  "excludeAuthors": [],
  "onlySubmitter": false,
  "opReplyFilter": "any",
  "skipRemoved": true,
  "onlyNew": false,
  "stateKey": "default",
  "resetState": false,
  "customLabels": {},
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 2,
  "maxRequestsPerMinute": 24,
  "minRequestIntervalMs": 2500,
  "maxRequestRetries": 5,
  "debugLog": false
}
```

## Output

```json
{
  "dataType": {
    "label": "Row type",
    "format": "string"
  },
  "body": {
    "label": "Text",
    "format": "string"
  },
  "author": {
    "label": "Author",
    "format": "string"
  },
  "score": {
    "label": "Score",
    "format": "integer"
  },
  "publishedAt": {
    "label": "Published at",
    "format": "string"
  },
  "subreddit": {
    "label": "Community",
    "format": "string"
  },
  "postTitle": {
    "label": "Post title",
    "format": "string"
  },
  "depth": {
    "label": "Reply depth",
    "format": "integer"
  },
  "url": {
    "label": "URL",
    "format": "string"
  },
  "source": {
    "label": "Found through",
    "format": "string"
  },
  "searchTerm": {
    "label": "Search term",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Reddit Comments Scraper Actor is ready to run with the inputs already set for "Find Reddit comments that mention a keyword". [Sign up or log in](https://console.apify.com/create-task-from-example/o2g52R8AaudcuJr95) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Find Reddit comments that mention a keyword" task

The Reddit Comments Scraper Actor will start running based on the input automatically. You can also change all the input fields, like post and comment links, any reddit urls, and more, to match your specific use case.

### 3. Receive the "Find Reddit comments that mention a keyword" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as row type, text, author, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Find Reddit comments that mention a keyword" task via API](https://apify.com/nice_dev/reddit-comments-scraper.md).

## About this Actor

This example demonstrates how to use [Reddit Comments Scraper](https://apify.com/nice_dev/reddit-comments-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/nice_dev/reddit-comments-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/nice_dev/reddit-comments-scraper.md

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`).
