# Subreddit scraper: top posts of the week with upvotes

**Use case:** 

The most upvoted posts of the week in any subreddit, with title, text, author, date, upvotes and comment count. Change the community and the period to research any niche. Example: r/SaaS.

## Input

```json
{
  "searchQueries": [
    "coffee"
  ],
  "subreddits": [
    "SaaS"
  ],
  "maxPosts": 100,
  "sort": "top",
  "timeFilter": "week",
  "includeComments": false,
  "maxComments": 20,
  "searchComments": false,
  "includeAutoModeratorAndDeleted": false
}
```

## Output

```json
{
  "type": {
    "label": "Type",
    "format": "string"
  },
  "matchType": {
    "label": "Comment origin",
    "format": "string"
  },
  "subreddit": {
    "label": "Subreddit",
    "format": "string"
  },
  "postTitle": {
    "label": "Post",
    "format": "string"
  },
  "text": {
    "label": "Text",
    "format": "string"
  },
  "author": {
    "label": "Author",
    "format": "string"
  },
  "score": {
    "label": "Upvotes",
    "format": "integer"
  },
  "commentCount": {
    "label": "Comments",
    "format": "integer"
  },
  "depth": {
    "label": "Reply level",
    "format": "integer"
  },
  "createdAt": {
    "label": "Published",
    "format": "string"
  },
  "url": {
    "label": "Link",
    "format": "string"
  },
  "source": {
    "label": "Found by",
    "format": "string"
  }
}
```

## How it works

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

The Reddit Scraper | $0.30/1K | Posts, Search, Subreddits, Comments Actor is ready to run with the inputs already set for "Subreddit scraper: top posts of the week with upvotes". [Sign up or log in](https://console.apify.com/create-task-from-example/FxZLYJiggeQS4PNNz) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Subreddit scraper: top posts of the week with upvotes" task

The Reddit Scraper | $0.30/1K | Posts, Search, Subreddits, Comments Actor will start running based on the input automatically. You can also change all the input fields, like 🔎 keywords, 👥 subreddits, and more, to match your specific use case.

### 3. Receive the "Subreddit scraper: top posts of the week with upvotes" 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 type, comment origin, subreddit, 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 "Subreddit scraper: top posts of the week with upvotes" task via API](https://apify.com/monkey.d.scraping/reddit-scraper.md).

## FAQ

### Can I scrape several subreddits at once?

Yes. Add one subreddit name per line; each one returns its own posts.

### Can I get the comments too?

Yes. Switch on Include comments and choose how many comments per post you want. They are saved right after their post, with upvotes and reply level.

### Which periods can I choose?

Past hour, past 24 hours, past week, past month, past year or any time, for Top posts and keyword results.

### How much does it cost?

From $0.30 to $0.45 per 1,000 posts or comments depending on your Apify plan, plus $0.005 per run. Platform usage is included.

## About this Actor

This example demonstrates how to use [Reddit Scraper | $0.30/1K | Posts, Search, Subreddits, Comments](https://apify.com/monkey.d.scraping/reddit-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/monkey.d.scraping/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/monkey.d.scraping/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`).
