> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-143107c1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CommunitiesClient

> Referencia del módulo Python communities.client en el SDK de la X API. Clase de cliente y métodos para llamar a los endpoints communities de la X API v2.

## CommunitiesClient

<Badge color="blue">Class</Badge>

<Badge color="gray">Bases: object</Badge>

Cliente para operaciones de communities

## Constructores

### `__init__`

#### Parámetros

<ParamField path="path.client" type="Client" />

### `get_by_id`

Get Community by ID
Retrieves details of a specific Community by its ID.

#### Parámetros

<ParamField path="path.id" type="Any">
  The ID of the Community.
</ParamField>

<ParamField path="path.community_fields" type="List or None" default="None">
  Una lista separada por comas de campos de Community a mostrar.
</ParamField>

#### Devuelve

`GetByIdResponse` - Response data

### `search`

Search Communities
Retrieves a list of Communities matching the specified search query.

#### Parámetros

<ParamField path="path.query" type="str">
  Query to search communities.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  The maximum number of search results to be returned by a request.
</ParamField>

<ParamField path="path.next_token" type="Any or None" default="None">
  This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
</ParamField>

<ParamField path="path.pagination_token" type="Any or None" default="None">
  This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
</ParamField>

<ParamField path="path.community_fields" type="List or None" default="None">
  Una lista separada por comas de campos de Community a mostrar.
</ParamField>

#### Devuelve

`IteratorSearchResponse`
