# MastodonTootsLoader

> **Class** in `langchain_community`

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

Load the `Mastodon` 'toots'.

## Signature

```python
MastodonTootsLoader(
    self,
    mastodon_accounts: Sequence[str],
    number_toots: Optional[int] = 100,
    exclude_replies: bool = False,
    access_token: Optional[str] = None,
    api_base_url: str = 'https://mastodon.social',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `mastodon_accounts` | `Sequence[str]` | Yes | The list of Mastodon accounts to query. |
| `number_toots` | `Optional[int]` | No | How many toots to pull for each account. Defaults to 100. (default: `100`) |
| `exclude_replies` | `bool` | No | Whether to exclude reply toots from the load. Defaults to False. (default: `False`) |
| `access_token` | `Optional[str]` | No | An access token if toots are loaded as a Mastodon app. Can also be specified via the environment variables "MASTODON_ACCESS_TOKEN". (default: `None`) |
| `api_base_url` | `str` | No | A Mastodon API base URL to talk to, if not using the default. Defaults to "https://mastodon.social". (default: `'https://mastodon.social'`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    mastodon_accounts: Sequence[str],
    number_toots: Optional[int] = 100,
    exclude_replies: bool = False,
    access_token: Optional[str] = None,
    api_base_url: str = 'https://mastodon.social',
)
```

| Name | Type |
|------|------|
| `mastodon_accounts` | `Sequence[str]` |
| `number_toots` | `Optional[int]` |
| `exclude_replies` | `bool` |
| `access_token` | `Optional[str]` |
| `api_base_url` | `str` |


## Properties

- `api`
- `mastodon_accounts`
- `number_toots`
- `exclude_replies`

## Methods

- [`lazy_load()`](https://reference.langchain.com/python/langchain-community/document_loaders/mastodon/MastodonTootsLoader/lazy_load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/d5ea8358933260ad48dd31f7f8076555c7b4885a/libs/community/langchain_community/document_loaders/mastodon.py#L34)