# Subreddit Top Posts & Comments Scraper (Weekly)

**Use case:** 

Research what a community cares about this week, starting with r/startups and r/Entrepreneur. Gets the 50 top posts of the week from each, every comment as a readable thread with nested replies, and the subreddit stats (members, weekly visitors). Great for market research, content ideas and feeding AI. Swap in any subreddits.

## Input

```json
{
  "subreddits": [
    "startups",
    "Entrepreneur"
  ],
  "maxPostsPerSource": 50,
  "deepMode": false,
  "sort": "top",
  "searchSort": "relevance",
  "time": "week",
  "searchFor": "posts",
  "strictKeywordMatch": false,
  "includeComments": true,
  "maxCommentsPerPost": 0,
  "commentSort": "top",
  "commentFormat": "threads",
  "userContent": "posts",
  "includeUserProfile": true,
  "includeCommunityInfo": true,
  "includeNsfw": true
}
```

## Output

```json
{
  "dataType": {
    "label": "Type",
    "format": "text"
  },
  "title": {
    "label": "Title",
    "format": "text"
  },
  "url": {
    "label": "URL",
    "format": "link"
  },
  "subreddit": {
    "label": "Subreddit",
    "format": "text"
  },
  "author": {
    "label": "Author",
    "format": "text"
  },
  "score": {
    "label": "Score",
    "format": "number"
  },
  "upvoteRatio": {
    "label": "Upvote ratio",
    "format": "number"
  },
  "commentCount": {
    "label": "Comments",
    "format": "number"
  },
  "createdAt": {
    "label": "Posted",
    "format": "date"
  },
  "postType": {
    "label": "Post type",
    "format": "text"
  },
  "flair": {
    "label": "Flair",
    "format": "text"
  },
  "body": {
    "label": "Text",
    "format": "text"
  },
  "link": {
    "label": "Link",
    "format": "link"
  },
  "images": {
    "label": "Images",
    "format": "array"
  },
  "videoUrl": {
    "label": "Video",
    "format": "link"
  },
  "nsfw": {
    "label": "NSFW",
    "format": "boolean"
  },
  "input": {
    "label": "Source",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [Reddit Scraper](https://apify.com/calm_builder/reddit-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/calm_builder/reddit-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/calm_builder/reddit-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`).
