Skip to main content
GET
/
2
/
communities
/
{id}
Get Community by ID
curl --request GET \
  --url https://api.x.com/2/communities/{id} \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": "1146654567674912769",
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  },
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the Community. The unique identifier of this Community.

Example:

"1146654567674912769"

Query Parameters

community.fields
enum<string>[]

A comma separated list of Community fields to display. The fields available for a Community object.

Minimum array length: 1
Available options:
access,
created_at,
description,
id,
join_policy,
member_count,
name
Example:
[
"access",
"created_at",
"description",
"id",
"join_policy",
"member_count",
"name"
]

Response

The request has succeeded.

data
object

A X Community is a curated group of Posts.

errors
object[]
Minimum array length: 1