# Reddit Dataset for Academic Research (Posts and Comments)

**Use case:** 

Build a research dataset of Reddit posts and their comments from the subreddits you study, without waiting for Reddit API approval. The example pulls the top 100 posts of the past year, with comments, from r/gaming and r/pcgaming. Export to CSV or JSON for content analysis or NLP. Time windows are relative (past day to all time), not fixed dates.

## Input

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/gaming/"
    },
    {
      "url": "https://www.reddit.com/r/pcgaming/"
    }
  ],
  "sort": "top",
  "time": "year",
  "maxItems": 100,
  "includeNSFW": false,
  "skipComments": false,
  "skipUserPosts": false,
  "skipCommunity": true,
  "ignorestartUrls": false,
  "searchPosts": true,
  "searchComments": false,
  "fetchPostComments": true,
  "searchCommunities": false,
  "searchUsers": false
}
```

## Output

```json
{
  "dataType": {
    "label": "Type",
    "format": "text"
  },
  "title": {
    "label": "Title",
    "format": "text"
  },
  "body": {
    "label": "Body",
    "format": "text"
  },
  "communityName": {
    "label": "Community",
    "format": "text"
  },
  "username": {
    "label": "Author",
    "format": "text"
  },
  "upVotes": {
    "label": "Upvotes",
    "format": "number"
  },
  "numberOfComments": {
    "label": "Comments",
    "format": "number"
  },
  "createdAt": {
    "label": "Created at",
    "format": "date"
  },
  "url": {
    "label": "URL",
    "format": "link"
  }
}
```

## How it works

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

The Fast Reddit Scraper ($2/1k): Cheap & Bulk Data Actor is ready to run with the inputs already set for "Reddit Dataset for Academic Research (Posts and Comments)". [Sign up or log in](https://console.apify.com/create-task-from-example/qXvkRXRXS1c8Ws8ie) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Reddit Dataset for Academic Research (Posts and Comments)" task

The Fast Reddit Scraper ($2/1k): Cheap & Bulk Data Actor will start running based on the input automatically. You can also change all the input fields, like start urls, sort by, and more, to match your specific use case.

### 3. Receive the "Reddit Dataset for Academic Research (Posts and Comments)" 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, title, body, 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 "Reddit Dataset for Academic Research (Posts and Comments)" task via API](https://apify.com/practicaltools/apify-reddit-api.md).

## FAQ

### What output fields does the Reddit Dataset for Academic Research task provide?

The task provides output fields for data type, title, body, community name, username, upvotes, number of comments, created date, and URL.

### Can I automatically schedule the Reddit Dataset for Academic Research task to run?

Yes, the task can be scheduled to run automatically in Apify Console.

### What subreddits does the Reddit Dataset for Academic Research task target?

The example targets r/gaming and r/pcgaming. Replace them with the subreddits you study in the Start URLs field.

### What time period does the Reddit Dataset for Academic Research task cover?

The Reddit Dataset for Academic Research task uses relative windows (past hour, day, week, month, year or all time), set to the past year here. It does not support fixed date ranges.

### How can the data from this task be exported?

The task allows users to export data in CSV or JSON formats for analysis.

## About this Actor

This example demonstrates how to use [Fast Reddit Scraper ($2/1k): Cheap & Bulk Data](https://apify.com/practicaltools/apify-reddit-api.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/practicaltools/apify-reddit-api.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/practicaltools/apify-reddit-api.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`).
