# Subreddit Scraper for Posts and Community Data

**Use case:** 

Scrape public subreddit feed posts and community profile facts such as descriptions, member counts, NSFW flags, URLs, and scores.

## Input

```json
{
  "searchQueries": [
    "openai",
    "chatgpt",
    "openai api"
  ],
  "searchCommunityName": "r/artificial",
  "searchResultType": "postsAndComments",
  "sort": "new",
  "commentSort": "new",
  "time": "all",
  "maxDaysOld": 30,
  "includeNSFW": false,
  "strictSearch": false,
  "collectCommentsUnderSearchPosts": false,
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/artificial/"
    },
    {
      "url": "https://www.reddit.com/r/OpenAI/search/?q=gpt-5&restrict_sr=1"
    }
  ],
  "subredditNames": [
    "OpenAI"
  ],
  "subredditSort": "new",
  "subredditTime": "all",
  "collectCommentsUnderSubredditPosts": false,
  "userNames": [
    "u/spez"
  ],
  "userActivity": "postsAndComments",
  "postRowLimit": 25,
  "commentRowLimit": 0,
  "commentsPerExpandedPost": 0
}
```

## Output

```json
{
  "rowType": {
    "label": "Type",
    "format": "string"
  },
  "title": {
    "label": "Post title",
    "format": "string"
  },
  "commentText": {
    "label": "Comment",
    "format": "string"
  },
  "communityName": {
    "label": "Community",
    "format": "string"
  },
  "username": {
    "label": "User",
    "format": "string"
  },
  "subredditName": {
    "label": "Subreddit",
    "format": "string"
  },
  "authorName": {
    "label": "Author",
    "format": "string"
  },
  "score": {
    "label": "Score",
    "format": "integer"
  },
  "commentCount": {
    "label": "Comments",
    "format": "integer"
  },
  "createdAt": {
    "label": "Created",
    "format": "string"
  },
  "url": {
    "label": "Reddit URL",
    "format": "string"
  },
  "matchedInputs": {
    "label": "Matched inputs",
    "format": "array"
  }
}
```

## About this Actor

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