# Create Reddit Feed

## User Intent

"How do I sync Reddit posts and comments? Show me Reddit feed configuration."

## Operation

**SDK Method**: `createFeed()` with FeedTypes.Reddit\
**Auth**: Reddit API credentials

***

## Code Example (TypeScript)

```typescript
import { Graphlit } from 'graphlit-client';
import { FeedTypes } from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

const feed = await graphlit.createFeed({
  name: 'r/MachineLearning',
  type: FeedTypes.Reddit,
  reddit: {
    subredditName: 'MachineLearning',
    readLimit: 100,
  },
  // Optional: add workflow for content processing
  // workflow: { id: workflow.createWorkflow.id }
});

console.log(`Created Reddit feed: ${feed.createFeed.id}`);
```

***

## Configuration

**subreddit**: Subreddit name (without r/)\
**readLimit**: Number of posts\
**includeComments**: Sync post comments\
**sortBy**: hot, new, top, rising

***

## Reddit API Setup

1. Reddit → Preferences → Apps
2. Create app (script type)
3. Get client ID and secret
4. Generate access token

***

## What Gets Synced

* Post titles and content
* Author information
* Upvotes/downvotes
* Comments (if enabled)
* Post metadata (flair, awards)

***
