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

# 按 ID 获取社区信息

> 按数字社区 ID 获取某个 X Community 的元数据——名称、简介、成员数和访问规则。

按数字社区 ID 获取某个 X Community 的元数据——名称、简介、成员数和访问规则。适合在拉取其成员或帖子之前先做筛选判断。

在 `community_info` 下返回该对象。如需按话题发现社区，请用 [`get_twitter_community_tweets_all`](/docs/zh/api-reference/twitter/get_twitter-community-get-tweets-from-all-community) 搜索其帖子。

<Note>
  **第一次用？** 把任意 MCP 客户端指向 `https://mcp.aisa.one/mcp` —— Claude Code、
  Codex、Cursor、VS Code 都可以。鉴权走 OAuth：客户端打开浏览器，你点一次
  Allow，不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见
  [aisa.one/zh-cn/mcp](https://aisa.one/zh-cn/mcp#connect)。
</Note>

[在你的 agent 里把这个端点跑起来 →](https://aisa.one/mcp?from=/zh/api-reference/twitter/get_twitter-community-info)


## OpenAPI

````yaml openapi/zh/twitter-communities.json GET /twitter/community/info
openapi: 3.0.3
info:
  title: Twitter API - Community Endpoints
  version: 1.0.0
  description: Twitter 社区相关端点的整合 API 文档。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - bearerAuth: []
paths:
  /twitter/community/info:
    get:
      tags:
        - https://docs.twitterapi.io/api-reference/endpoint/get_community_by_id
      summary: 按 ID 获取社区信息
      description: >-
        按数字社区 ID 获取某个 X Community 的元数据——名称、简介、成员数和访问规则。适合在拉取其成员或帖子之前先做筛选判断。在
        `community_info` 下返回该对象。如需按话题发现社区，请用 `get_twitter_community_tweets_all`
        搜索其帖子。
      operationId: get_twitter_community_info
      parameters:
        - name: community_id
          in: query
          required: true
          schema:
            type: string
          description: 社区 ID
      responses:
        '200':
          description: 社区信息响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunityInfoResponse'
components:
  schemas:
    CommunityInfoResponse:
      type: object
      properties:
        community_info:
          $ref: '#/components/schemas/CommunityInfo'
        status:
          type: string
          enum:
            - success
            - error
        msg:
          type: string
    CommunityInfo:
      type: object
      properties:
        id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        question:
          type: string
          nullable: true
        member_count:
          type: integer
        moderator_count:
          type: integer
        created_at:
          type: string
          nullable: true
        join_policy:
          type: string
          nullable: true
        invites_policy:
          type: string
          nullable: true
        is_nsfw:
          type: boolean
        is_pinned:
          type: boolean
        role:
          type: string
          nullable: true
        primary_topic:
          type: object
          properties:
            id:
              type: string
              nullable: true
            name:
              type: string
              nullable: true
        banner_url:
          type: string
          nullable: true
        search_tags:
          type: array
          items:
            type: string
        rules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              description:
                type: string
        creator:
          $ref: '#/components/schemas/User'
        admin:
          $ref: '#/components/schemas/User'
        members_preview:
          type: array
          items:
            type: object
    User:
      type: object
      properties:
        type:
          type: string
        userName:
          type: string
        url:
          type: string
        id:
          type: string
        name:
          type: string
        isBlueVerified:
          type: boolean
        verifiedType:
          type: string
        profilePicture:
          type: string
        coverPicture:
          type: string
        description:
          type: string
        location:
          type: string
        followers:
          type: integer
        following:
          type: integer
        canDm:
          type: boolean
        createdAt:
          type: string
        favouritesCount:
          type: integer
        hasCustomTimelines:
          type: boolean
        isTranslator:
          type: boolean
        mediaCount:
          type: integer
        statusesCount:
          type: integer
        withheldInCountries:
          type: array
          items:
            type: string
        possiblySensitive:
          type: boolean
        pinnedTweetIds:
          type: array
          items:
            type: string
        isAutomated:
          type: boolean
        automatedBy:
          type: string
        unavailable:
          type: boolean
        message:
          type: string
        unavailableReason:
          type: string
        profile_bio:
          type: object
          properties:
            description:
              type: string
            entities:
              type: object
              properties:
                description:
                  type: object
                  properties:
                    urls:
                      type: array
                      items:
                        type: object
                        properties:
                          display_url:
                            type: string
                          expanded_url:
                            type: string
                          indices:
                            type: array
                            items:
                              type: integer
                          url:
                            type: string
                url:
                  type: object
                  properties:
                    urls:
                      type: array
                      items:
                        type: object
                        properties:
                          display_url:
                            type: string
                          expanded_url:
                            type: string
                          indices:
                            type: array
                            items:
                              type: integer
                          url:
                            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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