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

# Communities Lookup

> The Communities lookup endpoint lets you retrieve information about X Communities by their ID. Reference for the Enterprise X API tier covering lookup.

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>;
};

The Communities lookup endpoint lets you retrieve information about X Communities by their ID.

## Overview

Communities are public or private groups on X where members can share Posts, discuss topics, and connect around shared interests.

<CardGroup cols={2}>
  <Card title="By ID" icon="users-rectangle">
    Get details for a specific Community
  </Card>

  <Card title="Search" icon="magnifying-glass">
    Find Communities by keyword
  </Card>
</CardGroup>

***

## Endpoint

| Method | Endpoint                                                       | Description         |
| :----- | :------------------------------------------------------------- | :------------------ |
| GET    | [`/2/communities/:id`](/x-api/communities/get-community-by-id) | Get Community by ID |

***

## Response fields

| Field          | Description                  |
| :------------- | :--------------------------- |
| `id`           | Community ID                 |
| `name`         | Community name               |
| `description`  | Community description        |
| `created_at`   | Creation date                |
| `member_count` | Number of members            |
| `is_private`   | Whether Community is private |

***

## Example request

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

***

## Getting started

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/resources/fundamentals/developer-apps) in the Developer Console
  * Your App's [keys and tokens](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="Search Communities" icon="magnifying-glass" href="/x-api/communities/search/introduction">
    Find Communities by keyword
  </Card>

  <Card title="API Reference" icon="code" href="/x-api/communities/get-community-by-id">
    Full endpoint documentation
  </Card>
</CardGroup>
