# RedditPostsLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/reddit/RedditPostsLoader)

Load `Reddit` posts.

Read posts on a subreddit.
First, you need to go to
https://www.reddit.com/prefs/apps/
and create your application

## Signature

```python
RedditPostsLoader(
    self,
    client_id: str,
    client_secret: str,
    user_agent: str,
    search_queries: Sequence[str],
    mode: str,
    categories: Sequence[str] = ['new'],
    number_posts: Optional[int] = 10,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `client_id` | `str` | Yes | Reddit client id. |
| `client_secret` | `str` | Yes | Reddit client secret. |
| `user_agent` | `str` | Yes | Reddit user agent. |
| `search_queries` | `Sequence[str]` | Yes | The search queries. |
| `mode` | `str` | Yes | The mode. |
| `categories` | `Sequence[str]` | No | The categories. Default: ["new"] (default: `['new']`) |
| `number_posts` | `Optional[int]` | No | The number of posts. Default: 10 (default: `10`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    client_id: str,
    client_secret: str,
    user_agent: str,
    search_queries: Sequence[str],
    mode: str,
    categories: Sequence[str] = ['new'],
    number_posts: Optional[int] = 10,
)
```

| Name | Type |
|------|------|
| `client_id` | `str` |
| `client_secret` | `str` |
| `user_agent` | `str` |
| `search_queries` | `Sequence[str]` |
| `mode` | `str` |
| `categories` | `Sequence[str]` |
| `number_posts` | `Optional[int]` |


## Properties

- `client_id`
- `client_secret`
- `user_agent`
- `search_queries`
- `mode`
- `categories`
- `number_posts`

## Methods

- [`load()`](https://reference.langchain.com/python/langchain-community/document_loaders/reddit/RedditPostsLoader/load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/document_loaders/reddit.py#L23)