# Download a Reddit Dataset as JSON or CSV

Downloads the year's top posts of a subreddit as a ready dataset with consistent columns (id, title, body, author, score, upvote ratio, comments, flair, media, date). Change the subreddit for any topic.

- Actor: openclawai/reddit-scraper (Reddit Scraper), https://datapika.com/actors/reddit-scraper
- Run on Apify: https://apify.com/openclawai/reddit-scraper
- Tested: 2026-11-23, 4 rows in 12 seconds, $0.01 at free-plan prices

## Input

```json
{
  "subreddits": [
    "datasets"
  ],
  "sort": "top",
  "time": "year",
  "maxItems": 200
}
```

## Output fields

- `title`: Title
- `subreddit`: Subreddit
- `author`: Author
- `score`: Score
- `upvoteRatio`: Upvote %
- `numComments`: Comments
- `flair`: Flair
- `createdAt`: Posted
- `url`: Link

## Sample rows (personal data masked)

```json
[
  {
    "title": "Scientists just released a map of all 2.75 billion buildings on Earth, in 3D",
    "subreddit": "datasets",
    "author": "cavedave",
    "score": 428,
    "upvoteRatio": 0.98,
    "numComments": 33,
    "flair": "dataset",
    "createdAt": "2025-12-08T21:30:30Z",
    "url": "https://www.reddit.com/r/datasets/comments/1phoyz8/scientists_just_released_a_map_of_all_275_billion/"
  },
  {
    "title": "1.4M Epstein court documents — fully indexed and searchable",
    "subreddit": "datasets",
    "author": "joelkunst",
    "score": 399,
    "upvoteRatio": 1,
    "numComments": 16,
    "flair": "resource",
    "createdAt": "2026-02-25T08:38:24Z",
    "url": "https://www.reddit.com/r/datasets/comments/1re7v5b/14m_epstein_court_documents_fully_indexed_and/"
  },
  {
    "title": "I processed the entire arXiv LaTeX source corpus (3M+ papers) into a metadata-aligned Parquet dataset to save on S3 egress fees",
    "subreddit": "datasets",
    "author": "Invicto_50",
    "score": 85,
    "upvoteRatio": 0.99,
    "numComments": 14,
    "flair": "dataset",
    "createdAt": "2026-06-25T11:36:11Z",
    "url": "https://www.reddit.com/r/datasets/comments/1uf7i8w/i_processed_the_entire_arxiv_latex_source_corpus/"
  }
]
```

Full sample: https://datapika.com/data/tasks/reddit-dataset-json-csv.json

## How to run it

1. **Open the actor on Apify.** Click Copy input, then Run on Apify to open the Reddit Scraper. Sign in or create a free account, open the JSON tab of the input form and paste the input.
2. **Start the "Download a Reddit Dataset as JSON or CSV" task.** Press Start. Change any input field first if you need a different topic, account or size; the fields are listed above.
3. **Get the results.** Rows arrive in a dataset while the run works. Our test returned 4 rows in 12 seconds.
4. **Use the data.** Download JSON, CSV or Excel, call the run from the API, schedule it, or let an AI agent run it through MCP.

API (replace the token):

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/openclawai~reddit-scraper/run-sync-get-dataset-items?maxTotalChargeUsd=1" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subreddits":["datasets"],"sort":"top","time":"year","maxItems":200}'
```

## Change it

- Put any community in subreddits, e.g. startups or marketing; several run in one go.
- sort takes hot, new, top, rising or controversial.
- time narrows the period: hour, day, week, month, year or all.
- Raise maxItems for a bigger dataset; you pay per result delivered.

## FAQ

### How do I export the results?

Download the dataset as JSON, CSV or Excel, read it through the Apify API, or run the task from an AI agent through the Apify MCP server.

### Can I include comments in the dataset?

Yes. Turn on includeComments and set maxCommentsPerPost.

### Do I need a Reddit account or API key?

No. It reads public Reddit data anonymously, with no login, cookie, app registration or API key.

### How much does it cost?

You pay per result delivered to your dataset: posts, comments, users or communities. There is no start fee. The current prices are on the Pricing tab.
