> ## 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.

# Community activity & growth, X (Twitter) API docs

> Get an X community's likes, new members, posts, replies & unique posters. Each covers its latest period & shows its change from 1 day earlier. Costs 1 credit.

> For the complete documentation index, see [llms.txt](https://docs.xquik.com/llms.txt).

`GET https://xquik.com/api/v1/x/communities/{id}/analytics`

Use the X community analytics API to see how active a community is. One call returns 5 activity counts for the latest period. Each has its change in percent from 1 day earlier.

## What each call returns

* `likes` counts likes on the community's posts.
* `newMembers` counts the accounts that joined.
* `posts` counts the posts in the community.
* `replies` counts the replies to those posts.
* `uniquePosters` counts the distinct accounts that posted.

Each metric has a `count` and a `changePercent`. A negative `changePercent` means the count fell. `periodEndsAt` gives the end of the period in UTC.

## Track community growth over time

Call the endpoint once a day for each community you follow. Store `periodEndsAt` with the 5 counts. A new `periodEndsAt` marks a new period. That lets you chart each metric over time.




Compare communities with the same 5 metrics. `uniquePosters` against `posts` shows whether a few accounts write most posts.

Each successful call costs 1 credit. A refused ID, a missing community or a failed read costs
nothing.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
curl "https://xquik.com/api/v1/x/communities/1493446837214187523/analytics" \
  -H "x-api-key: $XQUIK_API_KEY"
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
import os

import requests

response = requests.get(
    "https://xquik.com/api/v1/x/communities/1493446837214187523/analytics",
    headers={"x-api-key": os.environ["XQUIK_API_KEY"]},
    timeout=30,
)
response.raise_for_status()
analytics = response.json()
print(analytics["periodEndsAt"], analytics["metrics"]["posts"]["count"])
```

## Path parameters

| Path parameter | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | X Community ID, or the URL-encoded Community link, such as `x.com/i/communities/1493446837214187523`. Any other value gets a free 400. |

## Query parameters

| Query parameter | Type | Required | Description |
| - | - | - | - |
| `fields` | `string` | No | Fields to keep in each row, comma-separated, such as `id,text,author.username`. Use dots for nested fields. Case & underscores do not matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics always stay. An unknown name returns `400 unknown_field` with the valid names, before any read. The price stays the same. |
| `omit` | `string` | No | Fields to drop from each row, comma-separated, such as `entities,media`. It takes the same names as `fields`. With `fields`, it drops from the kept fields. |

## Headers

| Header | Type | Required | Description |
| - | - | - | - |
| `x-api-key` | `string` | No | Your API key. Send this header or `Authorization`. |
| `Authorization` | `string` | No | `Bearer` followed by your API key or OAuth token. |

## Response

### 200 OK

| Field | Type | Description |
| - | - | - |
| `id` | `string` | The community ID from your request. |
| `periodEndsAt` | `string` | ISO 8601 end of the latest period, in UTC. |
| `metrics` | `object` | The period's activity. Each metric holds `count` & `changePercent`. |
| `metrics.likes` | `object` | Likes on the community's posts. |
| `metrics.newMembers` | `object` | Accounts that joined the community. |
| `metrics.posts` | `object` | Posts in the community. |
| `metrics.replies` | `object` | Replies to the community's posts. |
| `metrics.uniquePosters` | `object` | Distinct accounts that posted. |

Each metric object has these fields.

| Field | Type | Description |
| - | - | - |
| `count` | `integer` | The total for the period. It is never negative. |
| `changePercent` | `number` | The change in percent from the same figure 1 day earlier, unrounded. A fall is negative. |

### 400 Invalid community ID

`{ "error": "invalid_community_id" }`




The ID is no Community ID or link. Send the community's link or the number in it. The call costs nothing.

### 401 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

No community has this ID. Check the ID. The call costs nothing.

### 429 Rate limit exceeded

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

### 503 Read unavailable

The read failed. Retry shortly. The call costs nothing.

> [!NOTE]
>
> **Next steps.** [Community Info](https://docs.xquik.com/api-reference/x/community-info.md) for the community's name & rules, or [Community Tweets](https://docs.xquik.com/api-reference/x/community-tweets.md) to read its posts.

> [accordion] Related follower, list & community APIs
>
> * Profiles
>   * [Search users](https://docs.xquik.com/api-reference/x/search-users.md)
>   * [Search autocomplete](https://docs.xquik.com/api-reference/x/search-autocomplete.md)
>   * [Get user](https://docs.xquik.com/api-reference/x/twitter-profile-lookup.md)
>   * [Batch users](https://docs.xquik.com/api-reference/x/batch-users.md)
> * Followers
>   * [Followers](https://docs.xquik.com/api-reference/x/followers.md)
>   * [Following](https://docs.xquik.com/api-reference/x/following.md)
>   * [Follower IDs](https://docs.xquik.com/api-reference/x/follower-ids.md)
>   * [Following IDs](https://docs.xquik.com/api-reference/x/following-ids.md)
>   * [Creator subscriptions](https://docs.xquik.com/api-reference/x/user-subscriptions.md)
>   * [Affiliates](https://docs.xquik.com/api-reference/x/user-affiliates.md)
>   * [Similar accounts](https://docs.xquik.com/api-reference/x/user-similar.md)
>   * [Translate bio](https://docs.xquik.com/api-reference/x/user-bio-translation.md)
>   * [User insights](https://docs.xquik.com/api-reference/x/user-engagement-insights.md)
>   * [Verified followers](https://docs.xquik.com/api-reference/x/verified-followers.md)
>   * [Followers you know](https://docs.xquik.com/api-reference/x/followers-you-know.md)
>   * [Check follower](https://docs.xquik.com/api-reference/x/check-follower.md)
> * Lists
>   * [Search lists](https://docs.xquik.com/api-reference/x/search-lists.md)
>   * [User lists](https://docs.xquik.com/api-reference/x/user-lists.md)
>   * [List memberships](https://docs.xquik.com/api-reference/x/user-list-memberships.md)
>   * [List details](https://docs.xquik.com/api-reference/x/list-details.md)
>   * [List members](https://docs.xquik.com/api-reference/x/list-members.md)
>   * [List followers](https://docs.xquik.com/api-reference/x/list-followers.md)
> * Communities
>   * [Find](https://docs.xquik.com/api-reference/x/community-find.md)
>   * [Popular](https://docs.xquik.com/api-reference/x/community-popular.md)
>   * [Topics](https://docs.xquik.com/api-reference/x/community-topics.md)
>   * [Suggested](https://docs.xquik.com/api-reference/x/community-suggested.md)
>   * [Details](https://docs.xquik.com/api-reference/x/community-info.md)
>   * [Members](https://docs.xquik.com/api-reference/x/community-members.md)
>   * [Member search](https://docs.xquik.com/api-reference/x/community-member-search.md)
>   * [Moderators](https://docs.xquik.com/api-reference/x/community-moderators.md)
>   * [Timeline](https://docs.xquik.com/api-reference/x/community-tweets.md)
>   * [Media](https://docs.xquik.com/api-reference/x/community-media.md)
>   * [Keyword search](https://docs.xquik.com/api-reference/x/community-search.md)
>   * [Tweets search](https://docs.xquik.com/api-reference/x/community-tweets-search.md)

## Response examples

### 200 example

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
{
  "id": "1493446837214187523",
  "periodEndsAt": "2026-10-16T23:59:59.999Z",
  "metrics": {
    "likes": {
      "count": 15298,
      "changePercent": -1.2076202776880853
    },
    "newMembers": {
      "count": 557,
      "changePercent": -1.5901060070671376
    },
    "posts": {
      "count": 5108,
      "changePercent": 0.5907837731390311
    },
    "replies": {
      "count": 6851,
      "changePercent": -0.8251302837290099
    },
    "uniquePosters": {
      "count": 1800,
      "changePercent": -0.33222591362126247
    }
  }
}
```

* **400** `{ "error": "invalid_input", "message": "Invalid input. Check the request body." }`
* **401** `{ "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }`
* **402** `{ "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." }`
* **403** `{ "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }`
* **404** `{ "error": "not_found", "message": "Resource not found." }`
* **424** `{ "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }`
* **429** `{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }`
* **502** `{ "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }`
* **503** `{ "error": "x_api_unavailable", "message": "Xquik is busy right now. Retry shortly." }`


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