---
title: "Get Twitter Community Details - API Reference"
description: "Retrieve details about any Twitter/X community. Flat-rate $0.0002 per request, flexible rate limits and no subscription plans."
source: "https://docs.socialdata.tools/reference/get-community-details/"
---

Returns information about a Twitter community.

GET https://api.socialdata.tools/twitter/community/{community\_id}

## Headers

**Authorization** `string` — required

Authorization Bearer header containing your SocialData API key

Example: Bearer YOUR\_API\_KEY

## Path Parameters

**community\_id** `integer` — required

Target community ID

Example: 1493446837214187523

## Code Examples

#### curl

```shellscript
curl "https://api.socialdata.tools/twitter/community/1493446837214187523" \
    -H 'Authorization: Bearer API_KEY' \
    -H 'Accept: application/json'
```

#### JavaScript

```js
const communityId = '1493446837214187523';
const API_KEY = 'YOUR_API_KEY_HERE';

fetch(`https://api.socialdata.tools/twitter/community/${communityId}`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
})
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
```

#### Python

```python
import requests

communityId = '1493446837214187523'
API_KEY = 'YOUR_API_KEY_HERE'

url = f'https://api.socialdata.tools/twitter/community/{communityId}'

headers = {
    'Authorization': f'Bearer {API_KEY}',
    'Accept': 'application/json'
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Error: {response.status_code}")
    print(response.text)
```

#### PHP

```php
$communityId = '1493446837214187523';
$API_KEY = 'YOUR_API_KEY_HERE';

$url = "https://api.socialdata.tools/twitter/community/{$communityId}";

$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $API_KEY",
        "Accept: application/json"
    ]
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
print_r($data);

curl_close($ch);
```

## Example Responses

#### 200

```json
{
  "id_str": "1493446837214187523",
  "created_at": "2022-02-15T04:47:27.551000Z",
  "name": "Build in Public",
  "description": "Share what you're working on. Get feedback. Help each other move forward. – Sponsors: @iamfra5er @freemius @RaulOnRails @indexsy @create_xyz",
  "creator_is_blue_verified": true,
  "creator_screen_name": "marckohlbrugge",
  "join_policy": "Open",
  "rules": [
    "Share what you're working on",
    "Screenshots, screencasts, drafts, etc",
    "No self-promotion",
    "Stay on-topic",
    "No engagement farming",
    "Use a personal account"
  ],
  "banner_url": "https:\/\/pbs.twimg.com\/community_banner_img\/1901004865490313216\/FVEYARpF?format=png&name=orig",
  "banner_width": 1200,
  "banner_height": 480,
  "member_count": 111247,
  "is_nsfw": false
}
```

#### 402

```json
{
    "status": "error",
    "message": "Insufficient balance"
}
```

#### 404

```json
{
    "status": "error",
    "message": "Not found"
}
```

#### 500

```json
{
    "status": "error",
    "message": "Failed to fetch data from Twitter"
}
```

## Response Codes

-   **200 OK** - request succeeded
-   **402 Payment Required** - not enough credits to perform this request
-   **404 Not Found** - requested community does not exist
-   **422 Unprocessable Content** - validation failed (e.g. one of the required parameters was not provided)
-   **500 Internal Error** - API internal error, typically means that SocialData API failed to obtain the requested information and you should try again later

## Related endpoints

-   [Get community tweets](https://docs.socialdata.tools/reference/get-community-tweets/)
-   [Get community members](https://docs.socialdata.tools/reference/get-community-members/)
-   [Get community search results](https://docs.socialdata.tools/reference/get-community-search-results/)

## Before you integrate

-   [Authentication](https://docs.socialdata.tools/getting-started/authentication/)
-   [Rate limits](https://docs.socialdata.tools/getting-started/rate-limits/)
-   [Errors](https://docs.socialdata.tools/getting-started/errors/)
-   [Pricing](https://docs.socialdata.tools/getting-started/pricing/)
