# Twitter X Communities Search (`igview-owner/twitter-x-communities-search`) Actor

Search and discover Twitter/X communities by keyword. Get community name, member count, topic, NSFW status, banner images, and direct community URLs. Supports cursor-based pagination.

- **URL**: https://apify.com/igview-owner/twitter-x-communities-search.md
- **Developed by:** [Sachin Kumar Yadav](https://apify.com/igview-owner) (community)
- **Categories:** Social media, Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 🔍 Twitter/X Communities Search – Discover & Search X Communities by Keyword

**Search and discover Twitter/X communities by any keyword or topic. Find niche communities, analyze member counts, explore community topics, and build curated directories of communities with banner images, NSFW status, and direct community URLs. Perfect for community research, audience discovery, market analysis, and social media strategy!**

### 📋 Table of Contents

- [Features](#features)
- [Use Cases](#use-cases)
- [Quick Start](#quick-start)
- [Input Parameters](#input-parameters)
- [Output Format](#output-format)
- [Data Fields Explained](#data-fields-explained)
- [FAQ](#faq)

### 🚀 Features

#### **Powerful Community Discovery**
- **Keyword Search** - Search for Twitter/X communities using any keyword, topic, or phrase (e.g., "AI", "crypto", "startup", "gaming").
- **Community Details** - Retrieve community ID, name, member count, and primary topic for every matching community.
- **Banner Images** - Get both custom and default banner image URLs for community branding and visual identification.
- **NSFW Detection** - Instantly identify which communities are marked as NSFW (Not Safe For Work).
- **Direct Community URLs** - Auto-generated `https://x.com/i/communities/{id}` URLs for quick access to each community.

#### **Reliable Scraping Architecture**
- **Pagination Support** - Automated `maxPages` configuration controls pagination cursors under the hood to pull up to 50 pages of search results.
- **No Account Required** - Discover communities securely without logging into a personal Twitter/X account or using browser sessions.

### 🎯 Use Cases

| Use Case | Description | Benefits |
|----------|-------------|----------|
| **Community Research** | Search for communities around any topic or industry keyword | Discover active communities in your niche with member counts and topics |
| **Audience Discovery** | Find communities where your target audience hangs out | Identify high-engagement communities for marketing and outreach |
| **Market Analysis** | Analyze community landscape for specific industries or interests | Understand community sizes, topics, and trends across your market |
| **Content Strategy** | Discover trending community topics and popular niches | Inform your content calendar with real community interest data |
| **Competitive Intelligence** | Search for communities in competitor's space | Map the community ecosystem around competing brands and products |

### ⚡ Quick Start

#### Search for Communities by Keyword
To search for communities related to "AI" with 2 pages of results:

```json
{
  "query": "AI",
  "maxPages": 2
}
````

### 📊 Input Parameters

#### Configuration Options

| Parameter | Type | Required | Description | Default |
|-----------|------|----------|-------------|---------|
| `query` | String | Yes | The keyword or phrase to search for Twitter/X communities. Examples: "AI", "crypto", "startup", "gaming", "trending". | |
| `maxPages` | Integer | No | Max pages of community search results to retrieve. Each page contains ~6 communities. Range: 1 to 50. | `1` |

### 📤 Output Format

#### **Community Search Result Example**

```json
{
  "source": "twitter_x_communities_search",
  "search_query": "trending",
  "position": 1,
  "community_id": "1724036512277528783",
  "name": "Trending videos",
  "member_count": 4105,
  "primary_topic": "Entertainment",
  "is_nsfw": false,
  "custom_banner": "https://pbs.twimg.com/community_banner_img/1724038200153518080/Qr51tpca?format=jpg&name=orig",
  "default_banner": "https://pbs.twimg.com/media/FECRHJRVkAEB9n7.jpg",
  "user_id": "",
  "community_url": "https://x.com/i/communities/1724036512277528783",
  "scraped_at": "2026-07-12T10:37:00.000Z"
}
```

### 📈 Data Fields Explained

#### **Complete Field Reference**

| Field | Type | Description |
|-------|------|-------------|
| `source` | String | Static source identifier (`twitter_x_communities_search`). |
| `search_query` | String | The keyword/phrase used for the search. |
| `position` | Integer | The numerical index position of the community in the search results. |
| `community_id` | String | Unique ID of the Twitter/X community. |
| `name` | String | Display name of the community. |
| `member_count` | Integer | Total number of members in the community. |
| `primary_topic` | String | Primary topic/category of the community (e.g., "Entertainment", "Cryptocurrency", "Animation"). |
| `is_nsfw` | Boolean | True if the community is marked as NSFW (Not Safe For Work). |
| `custom_banner` | String | URL to the community's custom banner image (if set). |
| `default_banner` | String | URL to the community's default banner image. |
| `user_id` | String | User ID of the community creator (may be empty). |
| `community_url` | String | Direct link to the community on Twitter/X (`https://x.com/i/communities/{id}`). |
| `scraped_at` | String | ISO timestamp of the scraping run. |

### ❓ FAQ

#### **Q: What kind of keywords can I search for?**

**A:** You can search with any keyword or phrase — topics (e.g., "AI", "crypto"), interests (e.g., "gaming", "photography"), brands (e.g., "Tesla"), or general terms (e.g., "trending", "memes"). The API searches community names and topics.

#### **Q: Do I need to log into my own Twitter/X account?**

**A:** No. The scraper runs entirely autonomously without requiring you to share cookies or log in.

#### **Q: How many communities does each page return?**

**A:** Each page returns approximately 6 communities. Set `maxPages` higher to discover more communities matching your search query.

#### **Q: Can I find NSFW communities?**

**A:** Yes. The search results include all matching communities, and the `is_nsfw` field clearly indicates which ones are marked as NSFW.

#### **Q: What data do I get for each community?**

**A:** You get community ID, name, member count, primary topic, NSFW status, custom and default banner images, creator user ID, and a direct community URL. This data is perfect for building community directories and conducting audience research.

#### **Q: How do I find the members of a community after searching?**

**A:** Use the `community_id` from the search results with our **[Twitter X Community Members Scraper](https://apify.com/igview-owner/twitter-x-community-members)** to extract all members of any discovered community.

***

### Related Actors 🤝

- **[Twitter X Community Members Scraper](https://apify.com/igview-owner/twitter-x-community-members)**
- **[Twitter X Community Posts Scraper](https://apify.com/igview-owner/twitter-x-community-posts)**
- **[Twitter X List Members Scraper](https://apify.com/igview-owner/twitter-x-list-members)**
- **[Twitter X List Followers Scraper](https://apify.com/igview-owner/twitter-x-list-followers)**
- **[Twitter X Lists Timeline Scraper](https://apify.com/igview-owner/twitter-x-lists-timeline)**
- **[Twitter X Thread Reader Scraper](https://apify.com/igview-owner/twitter-x-thread-reader)**
- **[Twitter X Recent Replies Scraper](https://apify.com/igview-owner/twitter-x-recent-replies)**
- **[Twitter X Profile Scraper](https://apify.com/igview-owner/twitter-x-profile-scraper)**
- **[Twitter X Video Downloader](https://apify.com/igview-owner/twitter-x-video-downloader)**
- **[X Profile Viewer](https://apify.com/igview-owner/x-twitter-profile-viewer)**
- **[X Follower Scraper](https://apify.com/igview-owner/twitter-x-follower-scraper)**
- **[X Following Scraper](https://apify.com/igview-owner/twitter-x-following-scraper)**
- **[Twitter Affiliates X Scraper](https://apify.com/igview-owner/twitter-advanced-x-scraper)**

***

### 🏷️ **Keywords & Tags**

`twitter communities search`, `x communities search`, `search twitter communities`, `find twitter communities`, `discover x communities`, `twitter community finder`, `apify twitter communities`, `x.com communities search`, `twitter community scraper`, `x community discovery`

***

### 🚀 **Get Started Now**

1. Click ["Try for free"](https://apify.com?fpr=ykgg9c) to run this actor in the Apify Console.
2. Enter your search keyword (e.g., "AI", "crypto", "gaming").
3. Configure `maxPages` to control how many results you want.
4. Export your data as JSON, CSV, or Excel!

**⭐ If this actor is useful to your workflow, please leave a star!**

***

*Built by Sachin Kumar Yadav using Apify Platform*

# Actor input Schema

## `query` (type: `string`):

🔗 Enter a keyword or phrase to search for Twitter/X communities. For example: 'AI', 'crypto', 'startup', 'gaming', 'trending', etc.

## `maxPages` (type: `integer`):

📊 Number of result pages to scrape (1-50). Each page contains ~6 communities. More pages = more results but longer runtime and higher API usage.

## Actor input object example

```json
{
  "query": "trending",
  "maxPages": 1
}
```

# Actor output Schema

## `communities_overview` (type: `string`):

Open the dataset view with an overview of all found communities including name, member count, topic, and banner images.

# 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 = {
    "query": "trending",
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("igview-owner/twitter-x-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 = {
    "query": "trending",
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("igview-owner/twitter-x-communities-search").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 '{
  "query": "trending",
  "maxPages": 1
}' |
apify call igview-owner/twitter-x-communities-search --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter X Communities Search",
        "description": "Search and discover Twitter/X communities by keyword. Get community name, member count, topic, NSFW status, banner images, and direct community URLs. Supports cursor-based pagination.",
        "version": "1.0",
        "x-build-id": "re2Aawj8LQwtkKo45"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/igview-owner~twitter-x-communities-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-igview-owner-twitter-x-communities-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/igview-owner~twitter-x-communities-search/runs": {
            "post": {
                "operationId": "runs-sync-igview-owner-twitter-x-communities-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/igview-owner~twitter-x-communities-search/run-sync": {
            "post": {
                "operationId": "run-sync-igview-owner-twitter-x-communities-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "title": "🔍 Search Query",
                        "minLength": 1,
                        "maxLength": 200,
                        "type": "string",
                        "description": "🔗 Enter a keyword or phrase to search for Twitter/X communities. For example: 'AI', 'crypto', 'startup', 'gaming', 'trending', etc.",
                        "default": "trending"
                    },
                    "maxPages": {
                        "title": "📄 Maximum Pages",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "📊 Number of result pages to scrape (1-50). Each page contains ~6 communities. More pages = more results but longer runtime and higher API usage.",
                        "default": 1
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
