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

# X community details API for members & rules

> Retrieve an X community's name, description, member count, creator, moderators, rules, join policy, banner, and creation time. Costs 1 credit per call.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-x-community-info-200">
      ```json theme={null}
      {
        "community": {
          "id": "1500000000000000000",
          "name": "Tesla Fans",
          "description": "A community for Tesla enthusiasts",
          "banner_url": "https://xquik.com/example",
          "created_at": "2025-01-15T12:00:00Z"
        }
      }
      ```
    </Tab>

    <Tab title="400" id="response-x-community-info-400">
      ```json theme={null}
      {
        "error": "invalid_input",
        "message": "Invalid input. Check the request body."
      }
      ```
    </Tab>

    <Tab title="401" id="response-x-community-info-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required. Provide a valid API key or bearer token."
      }
      ```
    </Tab>

    <Tab title="402" id="response-x-community-info-402">
      ```json theme={null}
      {
        "error": "insufficient_credits",
        "message": "Insufficient credits. Top up or subscribe to continue."
      }
      ```
    </Tab>

    <Tab title="404" id="response-x-community-info-404">
      ```json theme={null}
      {
        "error": "not_found",
        "message": "Resource not found."
      }
      ```
    </Tab>

    <Tab title="424" id="response-x-community-info-424">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "X data source temporarily unavailable. Try again later."
      }
      ```
    </Tab>

    <Tab title="429" id="response-x-community-info-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>

    <Tab title="502" id="response-x-community-info-502">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "X data source temporarily unavailable. Try again later."
      }
      ```
    </Tab>

    <Tab title="503" id="response-x-community-info-503">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "Xquik is busy right now. Retry shortly."
      }
      ```
    </Tab>
  </Tabs>
</Panel>

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

Use the X communities API to resolve one community. Then read its members, moderators, rules, or tweets. Keep its numeric ID for later requests.

## Validate an X community before extraction

Check community details for every numeric community ID.
Confirm the community name, description, creator, join policy, rules, and
banner before requesting members or tweets. An export then cannot use
the wrong X community.

Keep the returned community ID as a string. Store the creator and moderator
details separately from the member count. Membership totals can change while
the community identity remains stable.

Use the rules and join policy to give analysts the correct context. They
describe how the Twitter community operates. They do not replace member rows,
moderator profiles, or community tweets.

After validation, choose the smallest matching route. Fetch member profiles
for audience review. Fetch moderators to review who runs the community. Fetch recent
tweets to review posts and engagement. Use saved extraction jobs to produce
CSV, JSON, or XLSX output.

## Choose the right Twitter community API

Start with community details when the numeric ID needs validation. Then choose the route that matches the records you need.

<CardGroup cols={2}>
  <Card title="Community details" icon="info">
    Get the name, description, creator, rules, policies, and banner. Keep member and moderator counts with the record.
  </Card>

  <Card title="Community members" icon="users" href="/api-reference/x/community-members">
    Retrieve member profiles with usernames, bios, verification, follower counts, and cursor pagination.
  </Card>

  <Card title="Community tweets" icon="message-square-text" href="/api-reference/x/community-tweets">
    Retrieve recent tweets, authors, replies, reposts, likes, quotes, media, and cursor pages.
  </Card>

  <Card title="Keyword search" icon="search" href="/api-reference/x/community-search">
    Search one community for matching tweets. Keep the query and cursor with each page.
  </Card>

  <Card title="Moderator profiles" icon="shield-check" href="/api-reference/x/community-moderators">
    Retrieve the moderator list, which is smaller than the member list.
  </Card>

  <Card title="Saved exports" icon="file-spreadsheet" href="/api-reference/extractions/create">
    Run a community extraction to save CSV, JSON, or XLSX output.
  </Card>
</CardGroup>

Use member routes for profile rows. Use tweet routes for posts and engagement counts. Use extraction jobs to save CSV, JSON, or XLSX output.

## When to read community metadata

Use this route for community metadata, rules, policies, and counts. It returns one community record, not member profiles or tweet rows. Use member and tweet routes for those collections.

<Callout icon="coins" color="#5c3327">
  **1 credit per call** · [All plans](https://xquik.com/#pricing) from \$0.00012/credit · Direct [MPP](/mpp/machine-payments-protocol): USD 0.00015 per call
</Callout>

<CodeGroup>
  ```bash cURL theme={null}
  curl https://xquik.com/api/v1/x/communities/1234567890/info \
    -H "x-api-key: xq_your_api_key_here" | jq
  ```

  ```javascript Node.js theme={null}
  const communityId = "1234567890";
  const response = await fetch(`https://xquik.com/api/v1/x/communities/${communityId}/info`, {
    headers: { "x-api-key": "xq_your_api_key_here" },
  });
  const data = await response.json();
  const community = data.community;
  const communityRecord = {
    community_id: community.id,
    community_name: community.name ?? null,
    description: community.description ?? null,
    member_count: community.member_count ?? null,
    moderator_count: community.moderator_count ?? null,
    join_policy: community.join_policy ?? null,
    invites_policy: community.invites_policy ?? null,
    is_nsfw: community.is_nsfw ?? null,
    creator_id: community.creator?.id ?? null,
    creator_username: community.creator?.username ?? null,
    banner_url: community.banner_url ?? null,
    created_at: community.created_at ?? null,
    primary_topic_name: community.primary_topic?.name ?? null,
    rule_count: community.rules?.length ?? 0,
  };

  process.stdout.write(JSON.stringify(communityRecord, null, 2));
  ```

  ```python Python theme={null}
  import json
  import requests

  response = requests.get(
      "https://xquik.com/api/v1/x/communities/1234567890/info",
      headers={"x-api-key": "xq_your_api_key_here"},
  )
  data = response.json()
  community = data["community"]
  community_record = {
      "community_id": community["id"],
      "community_name": community.get("name"),
      "description": community.get("description"),
      "member_count": community.get("member_count"),
      "moderator_count": community.get("moderator_count"),
      "join_policy": community.get("join_policy"),
      "invites_policy": community.get("invites_policy"),
      "is_nsfw": community.get("is_nsfw"),
      "creator_id": (community.get("creator") or {}).get("id"),
      "creator_username": (community.get("creator") or {}).get("username"),
      "banner_url": community.get("banner_url"),
      "created_at": community.get("created_at"),
      "primary_topic_name": (community.get("primary_topic") or {}).get("name"),
      "rule_count": len(community.get("rules") or []),
  }

  print(json.dumps(community_record, indent=2))
  ```
</CodeGroup>

Use `GET /x/communities/{id}/info` when a workflow needs one community
profile row before member exports, moderator review, content routing, or CRM
enrichment. Store `community_id`, `community_name`, `description`,
`member_count`, `moderator_count`, policy fields, creator,
`banner_url`, `created_at`, `primary_topic_name`, and `rule_count`.

## Qualify a community before collecting profiles or tweets

Read community metadata before starting a member or tweet export. A mistyped community ID
would otherwise send results into the wrong project.

Confirm `community.id` and `community.name` first. Save both values with the
planned member or tweet export. Names can change. The numeric ID stays the same across
later member and tweet pages.

Review `description` and `primary_topic` for research relevance. Keep this
classification separate from tweet text. Community metadata describes the
space, while tweet routes return individual posts.

Check `join_policy` and `invites_policy` before planning member collection.
Do not infer either policy from member counts. Store the returned values
exactly, including missing values.

Use `member_count` to estimate roster size. Use `moderator_count` only to
see how many people moderate. Neither count replaces the paginated member or moderator
routes.

Review `is_nsfw` before sharing banners, descriptions, or tweets. Follow the
receiving system's content rules. Keep API responses unchanged.

Capture every community rule with its ID, name, and description. Keep the
returned order. Do not merge several rules into one undocumented summary.

Finish the qualification record with these decisions:

* Continue to member profiles, moderator profiles, tweets, or keyword search.
* Stop because the community ID or subject is incorrect.
* Require a reviewer before handling sensitive community content.
* Refresh metadata later because a required field is unavailable.

This route qualifies the community. Collection routes return member profiles
and community tweets.

## Create a community qualification manifest

Create one manifest before starting member, moderator, or tweet collection.
Use the returned community ID as its stable key.

Record these community facts:

* Record the community name and description.
* Record member and moderator counts.
* Record join and invitation policies.
* Record primary topic and content-sensitivity state.
* Record the creator profile and banner URL when returned.
* Record every rule ID, name, and description.

Add a retrieval timestamp in UTC. Expect community names, counts, rules, and
policies to change. The timestamp explains which metadata guided later collection.

Keep planned collection work in a separate manifest section. Name the exact
routes for members, moderators, unfiltered tweets, or keyword matches. Include
the intended page size, search query, and output format when applicable.

Keep member profiles and tweets in their own exports. Link those exports by
community ID and manifest ID.

Stop when the returned community ID differs. Require a
review when the name or topic conflicts with the project brief. Record the
decision. Do not pick another community without a record.

## Use community metadata to choose the next route

The member route returns paginated profile rows. See
[Community Members](/api-reference/x/community-members). The member count only
estimates the expected roster size.

Use [Community Moderators](/api-reference/x/community-moderators) for moderator
profiles. The moderator count does not expose those usernames or user IDs.

Use [Community Tweets](/api-reference/x/community-tweets) for the unfiltered
community timeline. Keep community ID and cursor with every page.

Use [Community Search](/api-reference/x/community-search) for matching tweets.
Keep the exact keyword expression and sort mode with every result.

Keep the creator object to show who owns the community. Export that profile as a member or moderator
only when the member or moderator route returns it.

## Detect community metadata changes

Compare manifests by stable community ID. Never join them by community name.

Report name, description, topic, policy, rule, and sensitivity changes
separately. A member-count change does not prove a policy change. Track
community rules and tweets independently.

Store both retrieval times and both returned values. Keep absent fields.
Never invent policy or count defaults.

Refresh this endpoint before long-running exports. Attach the newest manifest
ID to every new collection job. Do not edit earlier manifests. Audits need them.

## Path parameters

<ParamField path="id" type="string" required>
  Community ID (numeric string).
</ParamField>

## Headers

<ParamField header="x-api-key" type="string">
  Full account key. Sessions and OAuth also work.
</ParamField>

<ParamField header="Authorization" type="string">
  `Bearer xq_your_guest_key_here` authenticates `paid_reads` guest keys. Direct MPP uses the `Payment ...` credential. Get it from the `WWW-Authenticate: Payment` challenge.
</ParamField>

## Response

### 200 OK

<ResponseField name="community" type="object">
  Community details.
  **Community object fields.**

  <ResponseField name="id" type="string">
    Community ID.
  </ResponseField>

  <ResponseField name="name" type="string">
    Community name. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="description" type="string">
    Community description. Omitted if empty.
  </ResponseField>

  <ResponseField name="member_count" type="number">
    Total member count. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="moderator_count" type="number">
    Total moderators. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="join_policy" type="string">
    Join policy (for example `Open`). Omitted if unavailable.
  </ResponseField>

  <ResponseField name="invites_policy" type="string">
    Invitation policy. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="is_nsfw" type="boolean">
    Whether X marks the community sensitive. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="creator" type="object">
    The creator's public profile. When X sends no profile, it holds the `id`, `username`, and
    `verified` badge alone. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="admin" type="object">
    The admin's public profile. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="question" type="string">
    What the community asks a user who joins. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="searchTags" type="string[]">
    Tags X finds the community by. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="membersFacepile" type="object[]">
    Public profiles of the members X previews beside the member count. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="banner_url" type="string">
    Banner image URL. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="banner" type="object">
    Banner `url`, `width`, `height`, main `colors`, and the `focus` area X keeps in view when it crops
    the banner. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="created_at" type="string">
    ISO 8601 creation timestamp. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="primary_topic" type="object">
    Primary topic with `id` and `name` fields. Omitted if unavailable.
  </ResponseField>

  <ResponseField name="rules" type="object[]">
    Community rules, each with `id`, `name`, and `description`. Omitted if unavailable.
  </ResponseField>
</ResponseField>

```json theme={null}
{
  "community": {
    "id": "1234567890",
    "name": "Web Developers",
    "description": "A community for web developers",
    "member_count": 15000,
    "moderator_count": 5,
    "join_policy": "Open",
    "created_at": "2024-01-15T00:00:00.000Z",
    "primary_topic": { "id": "1", "name": "Technology" },
    "rules": [
      { "id": "1", "name": "Be respectful", "description": "Treat all members with respect." }
    ]
  }
}
```

### 400 Invalid community ID

```json theme={null}
{ "error": "invalid_community_id" }
```

The community ID is empty or invalid.

### 401 Unauthenticated

```json theme={null}
{ "error": "unauthenticated" }
```

Missing or invalid API key.

### 402 Payment required

Account keys get account options. Guest keys get guest top-up only.
Anonymous calls get a direct MPP `WWW-Authenticate: Payment` challenge.
They also get a guest wallet creation action.
No checkout starts automatically. Confirm any payment action.

### 404 Community not found

```json theme={null}
{ "error": "not_found" }
```

Xquik could not resolve the community. Check the community ID.

### 502 X API unavailable

```json theme={null}
{ "error": "x_api_unavailable" }
```

The read service returned an error. Retry after a short delay.

### 429 Rate limit exceeded

```json theme={null}
{ "error": "rate_limit_exceeded", "retryAfter": 60 }
```

You exceeded your tier rate limit. Wait for the `Retry-After` header before retrying.

### 424 Dependency failed

```json theme={null}
{ "error": "x_api_unavailable" }
```

Opted-in normalized v1 calls return 424 when the read service fails.

<Note>
  **Next steps.** [Community Members](/api-reference/x/community-members) to list members, or [Community Tweets](/api-reference/x/community-tweets) to browse posts.
</Note>

<div className="related-api-links">
  <Accordion title="Related follower, list & community APIs" icon="link">
    * Profiles: [Search users](/api-reference/x/search-users) · [Search autocomplete](/api-reference/x/search-autocomplete) · [Get user](/api-reference/x/twitter-profile-lookup) · [Batch users](/api-reference/x/batch-users)
    * Followers: [Followers](/api-reference/x/followers) · [Following](/api-reference/x/following) · [Follower IDs](/api-reference/x/follower-ids) · [Following IDs](/api-reference/x/following-ids) · [Creator subscriptions](/api-reference/x/user-subscriptions) · [Affiliates](/api-reference/x/user-affiliates) · [Similar accounts](/api-reference/x/user-similar) · [Verified followers](/api-reference/x/verified-followers) · [Followers you know](/api-reference/x/followers-you-know) · [Check follower](/api-reference/x/check-follower)
    * Lists: [Search lists](/api-reference/x/search-lists) · [User lists](/api-reference/x/user-lists) · [List memberships](/api-reference/x/user-list-memberships) · [List members](/api-reference/x/list-members) · [List followers](/api-reference/x/list-followers)
    * Communities: [Find](/api-reference/x/community-find) · [Popular](/api-reference/x/community-popular) · [Topics](/api-reference/x/community-topics) · [Suggested](/api-reference/x/community-suggested) · [Details](/api-reference/x/community-info) · [Members](/api-reference/x/community-members) · [Moderators](/api-reference/x/community-moderators) · [Timeline](/api-reference/x/community-tweets) · [Media](/api-reference/x/community-media) · [Keyword search](/api-reference/x/community-search)
  </Accordion>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.