# Community

> A community or group on a platform, such as a subreddit or an X community.

Canonical page: https://okdata.online/docs/objects/community/

The same shape on every platform. A field a platform does not have is null, and meta.unavailable says why. Use fields= to keep only what you need.

| Field | Type | Description |
|---|---|---|
| `id` | string | ID; pass it as is to the endpoints that take one. |
| `name` | string | Nome da comunidade. |
| `url` | string \| null | Link da comunidade. |
| `description` | string \| null | Do que a comunidade diz tratar. |
| `avatar_url` | string \| null | Ícone da comunidade. |
| `nsfw` | boolean \| null | Se está marcado como conteúdo adulto. |
| `created_at` | string \| null | Quando a comunidade foi criada. |
| `metrics` | CommunityMetrics | Contagens no momento da coleta. |
| `ext` | object | Extras específicos da plataforma. Retornados apenas com view=full. |

### CommunityMetrics

| Field | Type | Description |
|---|---|---|
| `members` | integer \| null | Membros. |

## Endpoints that return a Community

- [Perfil de comunidades do X](https://okdata.online/apis/x/communities/get/) (`x.communities.get`): $0.0004 per call

## Fields by view

Each view includes the fields of the views above it. `view=compact` is the smallest; `full` adds platform extras under `ext`.

- compact: `id`, `name`, `url`, `description`, `metrics`
- standard: `avatar_url`, `nsfw`, `created_at`
- full: `ext`
