# X (Twitter) Community Search & Details (`arjun_code/x-twitter-communities-search`) Actor

Find X (Twitter) Communities by keyword, link, or ID. Compare member counts, topics, and joining options; export descriptions, rules, and creator/admin profiles. Direct lookups also include available moderator profiles. No X login needed.

- **URL**: https://apify.com/arjun_code/x-twitter-communities-search.md
- **Developed by:** [Arjun Data](https://apify.com/arjun_code) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 93.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.28 / 1,000 community search 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Find relevant **X (Twitter) Communities** by topic, or inspect a specific Community from its link or numeric ID. Compare community size and joining options, export rules, and identify the available creator, administrator, and moderator profiles—without providing an X login, cookies, API key, or proxy.

### What does this X Community scraper do?

The Actor supports two focused workflows:

| Mode | Best for | Input | Data returned |
| --- | --- | --- | --- |
| **Search Communities** | Discovering Communities around a topic | Up to 10 keywords or phrases | Community details, member count, topic, joining options, rules, creator, and administrator |
| **Get Community details** | Researching Communities you already know | Up to 100 Community links or numeric IDs | Full available Community details plus creator, administrator, and moderator profiles |

Keyword search reports X's **member count**; it does not download individual members or Community posts. Individual moderator profiles are available only when you look up a Community by link or ID.

### X Community data you can collect

- Community ID, URL, name, description, creation time, banner, and search tags
- Member and moderator counts reported by X
- Primary Community topic, joining policy, invite policy, and sensitive-content flag
- Join question and Community rules when available
- Creator and administrator profiles, including usernames, bios, profile links, verification information, account statistics, location, and professional categories
- Moderator profiles for direct Community lookups
- Friendly status rows for invalid, unavailable, empty, or partially completed requests

### Popular use cases

- **Community discovery:** Find relevant Communities for AI, crypto, investing, gaming, marketing, or another topic.
- **Audience research:** Compare Community size, topic, and joining requirements before deciding where to participate.
- **Community directories:** Build a structured list of Communities and the people who operate them.
- **Creator and moderator research:** Identify the available creator, administrator, and moderator accounts for a known Community.
- **Recurring monitoring:** Schedule searches and send new Dataset results to another app through Apify integrations.

### How to search X Communities

1. Enter up to **10 keywords or phrases**, or paste up to **100 Community links or numeric IDs**, one per line.
2. For keyword search, optionally filter by minimum or maximum members and joining option.
3. Choose how many matching Communities to save for each keyword, from **1 to 1,000**. The default is 10.
4. Run the Actor, compare results in **Overview**, and inspect rules and profiles in **People & details**.

If you fill in both input sections, Community links and IDs take priority and the keyword input is skipped. Search filters apply only to keyword searches. Duplicate keywords and repeated links or IDs are processed once. Invalid direct inputs are reported separately while valid inputs continue.

#### Search input example

```json
{
  "searchQueries": ["AI"],
  "maxCommunitiesPerQuery": 10,
  "minMembers": 1000,
  "maxMembers": 0,
  "joiningOptions": "any"
}
```

#### Community lookup input example

```json
{
  "communityUrlsOrIds": [
    "https://x.com/i/communities/1838763245567369450"
  ]
}
```

You can also enter only the numeric ID, for example `1838763245567369450`.

### Input settings

| Setting | Meaning |
| --- | --- |
| **Keywords or phrases** | One topic or phrase per line. Each unique entry is searched separately; maximum 10. |
| **Communities to save per keyword** | Maximum matching results saved for each keyword, from 1 to 1,000. X may return fewer. |
| **Minimum members** | Save Communities with at least this many members. Keep 0 for no minimum. |
| **Maximum members** | Save Communities with no more than this many members. Keep 0 for no maximum. |
| **Joining options** | Include any Community, only Communities open to join, or only Communities requiring approval. |
| **Community links or IDs** | Directly inspect up to 100 known Communities. One full X link or numeric ID per line. |

### Example X Community result

This is a complete keyword-search Dataset item from a real search for `AI`. Counts and profile details can change over time.

```json
{
  "status": "success",
  "search_query": "AI",
  "community_id": "1838763245567369450",
  "community_url": "https://x.com/i/communities/1838763245567369450",
  "name": "RAG and AI Agent Developers",
  "description": "Share educational resources to accelerate knowledge of RAG and AI Agent development.",
  "created_at": "2024-09-25T02:11:34.97Z",
  "member_count": 23486,
  "moderator_count": 3,
  "primary_community_topic": {
    "topic_id": "302",
    "topic_name": "Artificial Intelligence"
  },
  "primary_topic_name": "Artificial Intelligence",
  "is_nsfw": false,
  "join_policy": "Open",
  "invites_policy": "MemberInvitesAllowed",
  "banner_url": "https://pbs.twimg.com/media/FECQY8MVEAEnZBg.jpg",
  "search_tags": ["ai", "rag", "agent"],
  "question": null,
  "rules": [
    {"rule_id": "1838763245626073431", "name": "Be kind and respectful."},
    {"rule_id": "1838763245626114283", "name": "Keep posts on topic."},
    {"rule_id": "1838763245626089508", "name": "Explore and share."}
  ],
  "creator_screen_name": "ProfTomYeh",
  "admin_screen_name": "ProfTomYeh",
  "creator": {
    "user_id": "78995338",
    "screen_name": "ProfTomYeh",
    "name": "Tom Yeh",
    "description": "CS Prof | AI by Hand ✍🏼 | @cuboulder",
    "profile_image_url": "https://pbs.twimg.com/profile_images/1787660049868800000/PfMkSQNQ_normal.jpg",
    "is_blue_verified": true,
    "verified": false,
    "followers_count": 65663,
    "following_count": 850,
    "location": "Denver, CO",
    "protected": false,
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/78995338/1714562365",
    "favourites_count": 2967,
    "pinned_tweet_ids": ["2007126167711826140"],
    "possibly_sensitive": false,
    "created_at": "2009-10-01T20:20:57Z",
    "website_url": "https://byhand.ai",
    "tweets_count": 1253,
    "media_count": 506,
    "professional_type": "Creator",
    "professional_categories": ["Professor"]
  },
  "admin": {
    "user_id": "78995338",
    "screen_name": "ProfTomYeh",
    "name": "Tom Yeh",
    "description": "CS Prof | AI by Hand ✍🏼 | @cuboulder",
    "profile_image_url": "https://pbs.twimg.com/profile_images/1787660049868800000/PfMkSQNQ_normal.jpg",
    "is_blue_verified": true,
    "verified": false,
    "followers_count": 65663,
    "following_count": 850,
    "location": "Denver, CO",
    "protected": false,
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/78995338/1714562365",
    "favourites_count": 2967,
    "pinned_tweet_ids": ["2007126167711826140"],
    "possibly_sensitive": false,
    "created_at": "2009-10-01T20:20:57Z",
    "website_url": "https://byhand.ai",
    "tweets_count": 1253,
    "media_count": 506,
    "professional_type": "Creator",
    "professional_categories": ["Professor"]
  }
}
```

A direct link or ID lookup returns the same Community fields and adds the input value and available moderator profiles:

```json
{
  "community_input": "https://x.com/i/communities/1838763245567369450",
  "moderators": [
    {
      "user_id": "78995338",
      "screen_name": "ProfTomYeh",
      "name": "Tom Yeh",
      "description": "CS Prof | AI by Hand ✍🏼 | @cuboulder",
      "profile_image_url": "https://pbs.twimg.com/profile_images/1787660049868800000/PfMkSQNQ_normal.jpg",
      "is_blue_verified": true,
      "verified": false,
      "followers_count": 65663,
      "following_count": 850,
      "location": "Denver, CO",
      "protected": false,
      "profile_banner_url": "https://pbs.twimg.com/profile_banners/78995338/1714562365",
      "favourites_count": 2967,
      "pinned_tweet_ids": ["2007126167711826140"],
      "possibly_sensitive": false,
      "created_at": "2009-10-01T20:20:57Z",
      "website_url": "https://byhand.ai",
      "tweets_count": 1253,
      "media_count": 506,
      "professional_type": "Creator",
      "professional_categories": ["Professor"]
    }
  ],
  "moderators_fetched_count": 1
}
```

`moderator_count` is the number reported by X. `moderators_fetched_count` is the number of moderator profiles available in the direct-lookup result, so the two values can differ. `community_url` is constructed from the Community ID; the other Community and profile values come from X responses.

### Pricing

This Actor uses **pay per event**, so charges follow successful work rather than the number of pages requested.

| Event | When it is charged |
| --- | --- |
| **Actor start** | When a run starts, according to the memory-based start pricing shown in the Store |
| **Community search result** | For each successful Community saved from keyword search |
| **Community detail result** | For each successful Community saved from a direct link or ID lookup |

Invalid inputs, unavailable Communities, empty searches, and other status rows do **not** trigger a search-result or detail-result event. The Actor start event and Apify platform usage may still apply. See the **Pricing** tab for the current event prices and subscription discounts.

For example, a run that saves 100 keyword-search results triggers 100 Community search result events. A direct lookup containing three successful Communities and one invalid link triggers three Community detail result events; the invalid status row is not charged as a result.

### Export and integrate the results

Open the run's Dataset to download results as **JSON, CSV, Excel, XML, or RSS**. You can also:

- Run the Actor through the Apify API or CLI
- Schedule recurring Community discovery runs
- Send results to webhooks or connected apps
- Integrate the Dataset with Make, Zapier, Google Sheets, or your own workflow

#### Run through the Apify API

```bash
curl -X POST "https://api.apify.com/v2/actors/arjun_code~x-twitter-communities-search/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries":["AI"],"maxCommunitiesPerQuery":10}'
```

### When a result is unavailable

The Actor uses readable status rows instead of failing an entire batch when an individual input cannot be processed:

| Status | Meaning |
| --- | --- |
| `no_results` | No Communities matched the keyword and selected filters. |
| `invalid_input` | A link or ID has an unsupported format. Other valid entries continue. |
| `not_found` | A correctly formatted Community ID is unavailable or was not found. |
| `partial` | Some results were saved before X stopped returning available data. |
| `request_failed` | The requested data could not be retrieved after the available attempts. |

Previously saved results remain available in the Dataset. X may return fewer Communities than the requested maximum, especially for narrow keywords or restrictive filters.

### Frequently asked questions

#### Do I need an X account, cookies, API key, or proxy?

No. The Actor handles access automatically; you only provide keywords, Community links, or Community IDs.

#### Does it download Community members or posts?

No. This Actor returns Community details and the available people who operate the Community. It reports the member count but does not export the individual member list or posts.

#### Why did I receive fewer results than requested?

The requested number is a maximum, not a guarantee. X may have fewer available matches, and member-count or joining-option filters can reduce the final result count.

#### What is the difference between keyword search and direct lookup?

Keyword search is designed for discovery and returns the available creator and administrator. Direct lookup is designed for deeper research and also fetches the available moderator profiles.

#### Are unavailable and invalid results charged?

They do not trigger Community search result or Community detail result events. The Actor start event and applicable Apify platform usage can still apply.

### Related X / Twitter Actors

| Actor | Use it for |
| --- | --- |
| [X (Twitter) List Search Scraper & Finder](https://apify.com/arjun_code/x-twitter-list-search-scraper) | Find public X Lists by keyword. |
| [X / Twitter Lists Scraper — Members & Subscribers](https://apify.com/arjun_code/x-twitter-lists-scraper) | Export Lists, List members, and subscribers. |
| [X (Twitter) People Search Scraper](https://apify.com/arjun_code/x-twitter-people-search-scraper) | Find X profiles by keyword and profile filters. |

### Support and responsible use

If a run produces an unexpected result, include the run ID and a redacted input example in the Actor's **Issues** tab so the problem can be reproduced.

Use the exported data in accordance with applicable laws, X's terms, and privacy requirements. This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by X Corp.

# Actor input Schema

## `searchQueries` (type: `array`):

Enter one keyword or phrase per line, such as AI or cryptocurrency. Each line is searched separately. Blank lines and duplicates are ignored. The example AI is not searched if you enter a Community link or ID below.

## `maxCommunitiesPerQuery` (type: `integer`):

For keyword search only. Save up to this many Communities that match your filters for each keyword or phrase, from 1 to 1,000. Default: 10. X may return fewer matches.

## `minMembers` (type: `integer`):

Only save Communities with at least this many members. Keep 0 for no minimum.

## `maxMembers` (type: `integer`):

Only save Communities with no more than this many members. Keep 0 for no maximum. If set, this cannot be lower than Minimum members.

## `joiningOptions` (type: `string`):

Choose whether to include all Communities, only those you can join directly, or only those that require approval to join.

## `communityUrlsOrIds` (type: `array`):

Enter up to 100 full X Community links or numeric IDs, one per line, for example https://x.com/i/communities/1913613303697613042. Repeated links and IDs for the same Community are fetched once. Invalid entries are reported separately; valid entries continue. Leave empty to search by keyword instead.

## Actor input object example

```json
{
  "searchQueries": [
    "AI"
  ],
  "maxCommunitiesPerQuery": 10,
  "minMembers": 0,
  "maxMembers": 0,
  "joiningOptions": "any"
}
```

# Actor output Schema

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

Community details, creators, administrators, available moderators for direct lookups, and status messages.

# 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 = {
    "searchQueries": [
        "AI"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("arjun_code/x-twitter-communities-search").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 = { "searchQueries": ["AI"] }

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

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

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

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "AI"
  ]
}' |
apify call arjun_code/x-twitter-communities-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,arjun_code/x-twitter-communities-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wynQXCl3tS9BRLV9K/builds/rkTzKwKwA2u6F2NDq/openapi.json
