> ## 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

> X API SDK의 communities.client Python 모듈에 대한 참조입니다. X API v2의 communities 엔드포인트를 호출하기 위한 클라이언트 클래스와 메서드입니다.

## CommunitiesClient

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

<Badge color="gray">기반 클래스: object</Badge>

커뮤니티 작업을 위한 클라이언트

## 생성자

### `__init__`

#### 매개변수

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

### `get_by_id`

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

#### 매개변수

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

<ParamField path="path.community_fields" type="List or None" default="None">
  표시할 Community 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`GetByIdResponse` - 응답 데이터

### `search`

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

#### 매개변수

<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">
  표시할 Community 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`IteratorSearchResponse`
