# Build a Reddit RAG corpus

**Use case:** 

Turn Reddit posts and comments into self-contained Markdown chunks with stable IDs and metadata for vector databases and RAG pipelines.

## Input

```json
{
  "subreddits": [
    "programming"
  ],
  "searches": [],
  "startUrls": [],
  "sort": "top",
  "time": "week",
  "postDateLimit": "7d",
  "includeNSFW": false,
  "trackingKeywords": [],
  "excludeKeywords": [],
  "skipComments": false,
  "maxComments": 50,
  "maxCommentDepth": 8,
  "onlyNew": false,
  "outputFormat": "rag-markdown",
  "minimumRelevanceScore": 25,
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "recordType": {
    "label": "Type",
    "format": "string"
  },
  "chunkId": {
    "label": "Chunk ID",
    "format": "string"
  },
  "title": {
    "label": "Title",
    "format": "string"
  },
  "markdown": {
    "label": "Markdown",
    "format": "string"
  },
  "messages": {
    "label": "Messages",
    "format": "array"
  },
  "metadata": {
    "label": "Metadata",
    "format": "object"
  },
  "createdAt": {
    "label": "Created",
    "format": "string"
  },
  "url": {
    "label": "Reddit URL",
    "format": "string"
  }
}
```

## About this Actor

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