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

# Communities ルックアップ

> ID を指定してコミュニティの詳細を取得する

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

Communities のルックアップエンドポイントを使用すると、id を指定して X のコミュニティに関する情報を取得できます。

<div id="overview">
  ## 概要
</div>

コミュニティは、メンバーが投稿を共有し、トピックについて議論し、共通の関心事に基づいて交流できる、X 上の公開または非公開のグループです。

<CardGroup cols={2}>
  <Card title="ID で取得" icon="users-rectangle">
    特定のコミュニティの詳細を取得します
  </Card>

  <Card title="検索" icon="magnifying-glass">
    キーワードでコミュニティを検索します
  </Card>
</CardGroup>

***

<div id="endpoint">
  ## エンドポイント
</div>

| メソッド | エンドポイント                                                           | 説明                |
| :--- | :---------------------------------------------------------------- | :---------------- |
| GET  | [`/2/communities/:id`](/ja/x-api/communities/get-community-by-id) | ID を指定してコミュニティを取得 |

***

<div id="response-fields">
  ## レスポンスフィールド
</div>

| フィールド          | 説明             |
| :------------- | :------------- |
| `id`           | コミュニティのID      |
| `name`         | コミュニティ名        |
| `description`  | コミュニティの説明      |
| `created_at`   | 作成日時           |
| `member_count` | メンバー数          |
| `is_private`   | コミュニティが非公開かどうか |

***

<div id="example-request">
  ## リクエスト例
</div>

```bash theme={null}
curl "https://api.x.com/2/communities/1234567890?\
community.fields=name,description,member_count,created_at" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

***

<div id="getting-started">
  ## はじめに
</div>

<Note>
  **前提条件**

  * 承認済みの[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 開発者コンソール内の [Project と App](/ja/resources/fundamentals/developer-apps)
  * App の[キーとトークン](/ja/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="コミュニティを検索" icon="magnifying-glass" href="/ja/x-api/communities/search/introduction">
    キーワードでコミュニティを検索します
  </Card>

  <Card title="APIリファレンス" icon="code" href="/ja/x-api/communities/community-lookup">
    エンドポイントに関する完全なドキュメント
  </Card>
</CardGroup>
