# 𝕏 (twitter) Community API (`agentx/x-twitter-community-api`) Actor

X (Twitter) Community lookup — pass up to 1,000 community URLs or numeric IDs and pull the structured community record: name, description, member count, moderator list, creator profile, rules, theme color, and pinned content. Useful for niche-audience sizing and partnership scouting.

- **URL**: https://apify.com/agentx/x-twitter-community-api.md
- **Developed by:** [AgentX](https://apify.com/agentx) (community)
- **Categories:** Social media, Lead generation, Agents
- **Stats:** 3 total users, 0 monthly users, 96.7% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

*Affiliate disclosure: AgentX may earn a commission when you open an Apify account through links on this page, at no extra cost to you.*

X Twitter Community API converts X Community URLs or numeric IDs into structured community profiles for research, qualification, monitoring, and data enrichment. Submit one Community for a low-risk test or process as many as 1,000 identifiers in one run.

- **Verified input contract:** accepts X Community URLs and numeric IDs in a required list of 1–1,000 entries.
- **Sixteen documented fields:** returns identity, membership, creator, access, topic, hashtag, imagery, rules, and processing context.
- **Batch-ready delivery:** saves one successful profile per community in an Apify Dataset for export or automation.
- **Evidence-based examples:** the documented sample was checked against a successful cloud run and Dataset record.

[Run one Community on Apify](https://apify.com/agentx/x-twitter-community-api?fpr=aiagentapi) or [open the API documentation](https://apify.com/agentx/x-twitter-community-api/api?fpr=aiagentapi). X data changes over time, and unavailable or invalid Communities may produce no result, so test your actual identifiers before scaling.

### Why Choose This API

X Communities group conversations around shared interests, and their public profile data can provide useful context before a researcher reviews posts or contacts participants. X explains that Communities are started and managed by people, with admins and moderators responsible for settings, rules, membership, and healthy discussion. This Actor focuses on the Community profile itself: it turns a direct URL or ID into a stable JSON record that can be compared, stored, or joined with other datasets.

Each successful result includes the Community ID and display name, its current description, member count, creator username and verification flags, join policy, creation timestamp, banner, NSFW flag, primary topic, trending hashtags when available, featured member avatars, and Community rules. Processing fields show whether the record succeeded, which Actor produced it, and when it was collected.

That scope is intentionally precise. The Actor does not claim to return Community posts, a full member list, a moderator list, engagement analytics, theme colors, or pinned content. It provides a current profile snapshot from the requested Community. Keeping the output narrow makes it easier to reason about schema stability and per-result cost.

The main advantage over manual copying is repeatability. A researcher can use the same input format for one or hundreds of Communities, preserve the retrieval time, export JSON or CSV, and feed the records into a dashboard or qualification workflow. The result remains directional evidence rather than a guarantee that a Community is active, commercially relevant, safe, or suitable for outreach.

### Quick Start Guide

Open the Actor in Apify Console, keep one known Community in the input list, and click **Start**. The following scenario is the same one used for the latest successful regression check:

```json
{
  "community": [
    "https://x.com/i/communities/1992144505747931156"
  ]
}
```

When the run finishes, open the Dataset and verify that one item exists. Confirm that `id` is `1992144505747931156`, the `processor` points to this Actor, and `processed_at` reflects the current run. Review mutable fields such as `member_count`, `display_name`, `description`, topics, hashtags, avatars, and rules rather than expecting them to remain identical to an older example.

You can also submit a numeric ID such as `1992144505747931156`. For a Community URL, the Actor extracts the segment after `/communities/` and removes query or fragment suffixes. Invalid entries are ignored, but the run requires at least one valid numeric Community ID. A valid input may still yield no Dataset item if the Community is unavailable or a complete profile cannot be returned.

Before processing a large list, test a small representative sample. This confirms availability, output coverage, and current charges for the Communities that matter to your workflow.

### Input Parameters

The input schema exposes one required field:

| Field | Type | Required | Limits | Purpose |
| --- | --- | --- | --- | --- |
| `community` | array of strings | Yes | 1–1,000 entries | X Community URLs or numeric Community IDs |

Use canonical URLs in the form `https://x.com/i/communities/{id}` when possible. URLs on the legacy `twitter.com` domain are also recognized when they contain a `/communities/{id}` segment. Numeric IDs must contain digits only and stay within the accepted integer range. Values that are not strings, an empty list, a list above 1,000 items, or a list with no valid Community ID fail input validation.

The list size is an input ceiling, not a result guarantee. A result is written only when a complete profile is available for a valid Community. Do not assume the Dataset row count must equal the number of submitted strings; check the run status, logs, and Dataset after completion.

For comparisons, preserve the original input list outside the Dataset or in your task configuration. The returned record contains the resolved numeric ID, not the exact URL string that was submitted.

### Output Data Schema

Every successful Community lookup produces one Dataset item with sixteen top-level fields:

| Field | Meaning |
| --- | --- |
| `status` | Processing outcome for the record |
| `processor` | URL of the Actor that produced the item |
| `processed_at` | ISO 8601 retrieval timestamp |
| `id` | Numeric X Community identifier |
| `display_name` | Current public Community name |
| `description` | Current public Community description |
| `creator` | Creator `user_name`, `blue_verified`, and `verified` values |
| `join_policy` | Current access or joining policy label |
| `created_at` | Community creation timestamp when available |
| `banner_url` | Full-size Community banner URL |
| `member_count` | Current reported membership total |
| `is_nsfw` | Sensitive-content flag returned for the Community |
| `community_topic` | Primary topic label when available |
| `community_tags` | Current trending hashtags when available |
| `members_facepile` | Avatar URLs for featured members shown on the profile |
| `community_rules` | Rule names and descriptions |

An abbreviated live-shape example follows. Arrays can be empty, and mutable values may differ in later runs.

```json
{
  "status": "success",
  "processor": "https://apify.com/agentx/x-twitter-community-api?fpr=aiagentapi",
  "processed_at": "2026-07-23T09:15:47+00:00",
  "id": "1992144505747931156",
  "display_name": "Life AI Community",
  "description": "A community united to awaken human-powered health intelligence where every contribution helps transform sickcare into true care for life.",
  "creator": {
    "user_name": "LifeNetwork_AI",
    "blue_verified": false,
    "verified": false
  },
  "join_policy": "Open",
  "created_at": "2025-11-22T08:13:57+00:00",
  "banner_url": "https://pbs.twimg.com/community_banner_img/1992182162611970048/GB9wTW9Y?format=jpg&name=orig",
  "member_count": 26667,
  "is_nsfw": false,
  "community_topic": "Artificial Intelligence",
  "community_tags": [],
  "members_facepile": [
    "https://pbs.twimg.com/profile_images/example/avatar.jpg"
  ],
  "community_rules": [
    {"name": "Be kind and respectful.", "description": ""}
  ]
}
```

X states that Communities can define their own rules in addition to the X Rules. Its moderator guidance currently says a Community must have at least one rule and can have up to ten; the Dataset reflects what is returned at collection time. Featured avatars are a small profile presentation, not a full membership export.

### Integration Examples

Apify exposes Actor runs through REST, client libraries, tasks, schedules, webhooks, and integrations. Store your token in an environment variable and send the same schema used in Console:

```bash
curl -X POST "https://api.apify.com/v2/acts/agentx~x-twitter-community-api/runs?token=$APIFY_TOKEN&waitForFinish=120" \
  -H "Content-Type: application/json" \
  -d '{"community":["https://x.com/i/communities/1992144505747931156"]}'
```

The run response contains the default Dataset ID. Fetch items only after the run reaches `SUCCEEDED`, and paginate larger outputs. Production callers should handle successful runs with zero rows, terminal failures, timeouts, and partial availability instead of assuming every submitted ID returns a profile.

MCP-compatible clients can call the Actor after the Apify MCP server is connected. Inspect the discovered schema first, then pass:

```json
{
  "community": [
    "https://x.com/i/communities/1992144505747931156"
  ]
}
```

Tool discovery and execution depend on the connected account, plan, token permissions, Actor visibility, and client refresh state. If MCP cannot run the Actor, verify access and use the REST endpoint or Apify Console as a fallback. Never paste an Apify token into a public repository, Dataset, support ticket, or shared prompt.

### Pricing & Cost Calculator

This Actor uses pay-per-event pricing. The live Apify pricing panel is authoritative for your plan; rates can change, and resource usage varies by run.

| Charge event | Free-tier rate or example |
| --- | ---: |
| Actor usage | $0.00001 per usage event; count varies |
| Actor start | $0.01000 |
| Successful Community result | $0.00500 each |

For an illustrative smallest successful run with one result and 200 usage events, the estimate is **(200 × $0.00001) + $0.01000 + $0.00500 = $0.01700**. This is an example, not a quoted total. Your plan tier may reduce the result price, and actual usage-event count depends on execution.

Charges are event-based, so the number of submitted strings is not itself the final bill. Review the run charge details, use a small test, and configure a maximum total charge where the calling surface supports it. An unavailable Community that produces no result can still incur start and usage charges.

### Use Cases & Applications

**Audience discovery:** compare `community_topic`, descriptions, membership totals, and join policies to identify Communities that merit deeper manual review.

**Partnership research:** qualify a shortlist using Community identity, creator attribution, size, and public rules before deciding whether an introduction is appropriate.

**Market mapping:** build a point-in-time table of Communities associated with products, industries, hobbies, regions, or emerging themes. Repeat collection on a consistent schedule to observe directional changes in names, descriptions, topics, or member counts.

**Brand safety review:** use `is_nsfw`, descriptions, topics, and rules as preliminary signals. They are not a complete safety assessment; review Community content and current platform context before acting.

**Content research:** collect trending hashtag fields when present and compare them with other public topic sources. An empty `community_tags` array is a valid result and should not be interpreted as proof that nobody is discussing the topic.

**Data enrichment:** join Community profiles to creator, company, search-interest, or video-niche datasets using an explicit research methodology. Respect the meaning and collection time of each source rather than treating member counts as engagement or revenue.

### FAQ

**Does the Actor return posts?** No. It returns Community profile metadata only.

**Does it return every member or moderator?** No. `members_facepile` contains featured avatar URLs shown in the profile response; it is not a membership or moderator list.

**Can I submit a full URL and an ID together?** Yes. The required `community` array can contain either form, up to 1,000 strings.

**Why did a successful run return fewer rows than inputs?** Invalid values are filtered, and a valid ID may be unavailable or fail to return a complete profile. Inspect the Dataset and log rather than relying only on terminal status.

**Are member counts historical?** No. Each item is a current snapshot. Store repeated results with `processed_at` if you need a time series.

**What does `join_policy` mean?** It is the policy label returned for that Community. X documents open Communities and restricted request/invite variants; interpret the current value in the platform context.

**Can I use the output for automated outreach?** The profile can support research, but any outreach must comply with applicable law, X rules, and anti-spam requirements. Do not infer consent from Community membership.

### Trust & Certifications

Trust comes from verifiable behavior, not decorative badges. The public schema documents the exact input and sixteen top-level output fields. A successful cloud regression run on July 23, 2026 returned one complete item for the shared example, and the Dataset field set matched the local schema. Apify also records run status, timestamps, storage identifiers, and charge details for independent review.

The documentation avoids claims that the Actor returns posts, moderators, full member lists, platform analytics, or guaranteed coverage. X's official [Communities help page](https://help.x.com/en/using-x/communities) is the source for current role, visibility, joining, and search behavior. The [Communities moderator playbook](https://help.x.com/en/using-x/communities-moderator-playbook) explains administrator, moderator, membership, and rule responsibilities.

No external security certification, endorsement by X, guaranteed uptime, or guaranteed business outcome is claimed. Review Apify's live run evidence and your own sample before relying on the data.

### Legal & Compliance

Use the Actor only for legitimate purposes and handle the output according to X's current terms, the X Rules, Apify policies, privacy obligations, and laws applicable to you. Collecting public profile metadata does not remove obligations involving personal data, intellectual property, consumer protection, employment, advertising, or automated decision-making.

Do not use the data to harass people, discriminate, build sensitive profiles, evade access controls, manipulate engagement, or send spam. Community membership or a featured avatar does not imply consent to contact, endorsement, affiliation, or demographic identity. Keep data only as long as necessary and protect exported Datasets and API tokens.

X features and visibility rules can change without notice. The Actor is an independent tool and is not affiliated with, endorsed by, or operated by X Corp. Validate high-impact conclusions with current first-party evidence and human review.

### Related Tools

Continue public social research with [Twitter Info Scraper](https://apify.com/agentx/twitter-info-scraper?fpr=aiagentapi), [Instagram Creator Scraper](https://apify.com/agentx/instagram-creator-scraper?fpr=aiagentapi), or [TikTok Creator API](https://apify.com/agentx/tiktok-creator-api?fpr=aiagentapi).

Enrich a qualified record with [LinkedIn Company Lookup](https://apify.com/agentx/linkedin-company-lookup?fpr=aiagentapi), [YouTube Market Intelligence](https://apify.com/agentx/youtube-market-intelligence?fpr=aiagentapi), or [Google Keyword Trends](https://apify.com/agentx/google-keyword-trends?fpr=aiagentapi). Each Actor has a separate schema, price, coverage model, and legal context; test them independently before combining results.

### Support & Community

For help, use the Actor's Issues tab in Apify Console or contact [AgentX support](https://t.me/AiAgentApi). Include a sanitized input, run ID, expected behavior, actual behavior, and the smallest relevant log excerpt. Never share API tokens, private Dataset contents, or personal information in a public issue.

Last updated: July 23, 2026. The live input schema, pricing panel, run record, X documentation, and Dataset remain authoritative if this page becomes stale.

# Actor input Schema

## `community` (type: `array`):

Enter 1 to 1,000 X Community URLs or numeric IDs. Invalid entries are ignored, but at least one entry must resolve to a valid numeric community ID.

## Actor input object example

```json
{
  "community": [
    "https://x.com/i/communities/1992144505747931156"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Open the full list of X community results with creator info, member count, banner image, hashtags, and rules.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "community": [
        "https://x.com/i/communities/1992144505747931156"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("agentx/x-twitter-community-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "community": ["https://x.com/i/communities/1992144505747931156"] }

# Run the Actor and wait for it to finish
run = client.actor("agentx/x-twitter-community-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "community": [
    "https://x.com/i/communities/1992144505747931156"
  ]
}' |
apify call agentx/x-twitter-community-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=agentx/x-twitter-community-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Rh9WgmwbWqdEG2dUb/builds/YVmPBhRPqnvszW28q/openapi.json
