# X Community Members Scraper (`khadinakbar/x-community-members-scraper`) Actor

Scrape X (Twitter) Community members and community profiles: handles, bios, followers, rules, creator. No login or cookies. MCP-ready. $0.005 per member.

- **URL**: https://apify.com/khadinakbar/x-community-members-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Lead generation, MCP servers
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 community member founds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## X Community Members Scraper

Scrape **X (Twitter) Community members** and the full **community profile** from any community URL or ID — no login, no cookies, no X account required. Built for recruiters, growth marketers, community managers, and AI agents that need to map who is active inside a topic community.

### What it does

Give it one or more X Community URLs (e.g. `https://x.com/i/communities/1699807431709041070`) or numeric community IDs. For each community it returns:

1. **A community profile record** — name, description, total member count, creation date, join policy, primary topic, rules, and the creator's handle.
2. **Member records** — the community creator, the featured members shown on the community page, and the **active members** (accounts posting in the community right now), each enriched with handle, display name, bio, follower/following counts, blue-verified status, location, and avatar.

### When to use it

- Find and qualify the **active people** inside a niche X Community for outreach or recruiting.
- Pull a community's **profile and rules** for competitive or audience research.
- Feed an AI agent a community URL and get back a clean, structured roster of who to engage.

Do **not** use it for single-profile lookups (use the `x-twitter-profile-scraper`), tweet search (`x-tweet-scraper`), or follower lists (`twitter-profile-followers-scraper`).

### Output

One flat JSON record per community and per member. `recordType` tells them apart.

| recordType | Key fields |
|---|---|
| `community` | `name`, `description`, `memberCount`, `createdAt`, `joinPolicy`, `primaryTopic`, `rules[]`, `creatorUsername` |
| `member` | `role` (`creator` / `featured` / `active`), `username`, `name`, `bio`, `followersCount`, `followingCount`, `isBlueVerified`, `location`, `avatarUrl`, `profileUrl` |

Example member row:

```json
{
  "recordType": "member",
  "communityId": "1699807431709041070",
  "communityUrl": "https://x.com/i/communities/1699807431709041070",
  "role": "active",
  "userId": "1820544862602829824",
  "username": "croissantsam",
  "name": "Samuel",
  "bio": "Software engineer and open-source maintainer.",
  "profileUrl": "https://x.com/croissantsam",
  "followersCount": 292,
  "isBlueVerified": false,
  "location": "Paris, France",
  "provider": "scrapecreators",
  "scrapedAt": "2026-06-14T12:00:00.000Z"
}
```

### Pricing (Pay Per Event)

| Event | Price |
|---|---|
| Actor start | $0.00005 |
| Community profiled | $0.008 per community |
| Community member found | $0.005 per member |

A typical run on one community (profile + ~25 members) costs about **$0.13**. You control spend with `maxMembersPerCommunity` and the toggles below.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `communities` | string\[] | — (required) | Community URLs or numeric IDs (1–100). |
| `includeActiveMembers` | boolean | `true` | Return active members derived from recent community posts. |
| `maxMembersPerCommunity` | integer | `50` | Cap member rows per community (0–200). |
| `includeFeaturedMembers` | boolean | `true` | Include creator + featured facepile members. |
| `includeCommunityProfile` | boolean | `true` | Emit one community profile record per community. |
| `dedupeMembers` | boolean | `true` | Drop duplicate members within a community. |
| `providerOrder` | enum | `auto` | `auto`, `scrapecreators-first`, or `sociavault-first`. |
| `includeRaw` | boolean | `false` | Attach the raw provider payload to each row. |

#### Example input

```json
{
  "communities": ["https://x.com/i/communities/1699807431709041070"],
  "includeActiveMembers": true,
  "maxMembersPerCommunity": 50
}
```

### How it works & coverage

This actor is **cookieless and login-free**. It reads X Communities through resilient data providers (ScrapeCreators primary, SociaVault fallback) and normalizes everything into one stable schema.

**Important coverage note (read this):** X does not expose a community's complete private member roster to anyone who is not logged in. For a community with hundreds of thousands of members, no public, cookieless tool can dump all of them. This actor surfaces the members X actually exposes publicly:

- the **creator**,
- the **featured members** shown on the community page, and
- the **active members** — accounts visibly posting in the community's recent feed, fully enriched.

For most outreach, recruiting, and research use cases the active members are exactly who you want — they are the people currently participating. If you need a literal full roster of every member, that data only exists behind an authenticated X session and is out of scope for a cookieless actor.

### Use with AI agents (MCP)

This actor is MCP-ready. In an MCP client it appears as `apify--x-community-members-scraper`. Pass a community URL, get back structured community + member JSON. Errors return actionable messages (e.g. "No valid X/Twitter community found").

### FAQ

**Do I need an X account or cookies?** No. Nothing to configure beyond the input.

**Can it return all 200,000 members of a big community?** No — see the coverage note above. It returns the publicly visible creator, featured, and active members.

**Which communities work?** Any public X Community reachable at `x.com/i/communities/<id>`.

**Why are some featured members missing a handle?** The community page facepile sometimes exposes only an avatar and user ID; those rows include what is available.

**What happens on a bad input?** The run exits cleanly with a clear status message and charges nothing for members.

### Legal

This actor collects only publicly available data and does not bypass authentication or access private content. You are responsible for using the output in compliance with X's Terms of Service, applicable data-protection laws (including GDPR/CCPA where relevant), and any local regulations. Do not use scraped personal data for spam, harassment, or unlawful profiling. This tool is provided for legitimate research, recruiting, and analytics use cases.

# Actor input Schema

## `communities` (type: `array`):

Use this when you need members and profile details for one or more X/Twitter Communities. Accepts community URLs or numeric IDs, for example https://x.com/i/communities/1699807431709041070 or 1699807431709041070. Provide 1 to 100 communities. This is not a user handle or hashtag field.

## `includeActiveMembers` (type: `boolean`):

Use this to return active members derived from the community's recent public posts, each enriched with handle, name, bio, and follower count. Defaults to true. X does not expose the full private member roster without login, so this surfaces visible active members, not every member of large communities.

## `maxMembersPerCommunity` (type: `integer`):

Use this to cap member rows saved per community, for example 50. Accepted range is 0 to 200. Defaults to 50. Active-member yield is bounded by how many distinct authors appear in recent community posts, so very large caps may return fewer rows than requested.

## `includeFeaturedMembers` (type: `boolean`):

Use this to include the community creator and the featured member facepile shown on the community page. Defaults to true. Facepile members may have only an avatar and user ID when X does not expose their handle. This is not the full member list.

## `includeCommunityProfile` (type: `boolean`):

Use this to emit one community profile record per community with name, description, member count, creation date, rules, topic, and creator. Defaults to true. Set to false when you only want member rows. This does not change member extraction.

## `providerOrder` (type: `string`):

Use this to force the data-provider order during testing or fallback checks. Values are auto, scrapecreators-first, or sociavault-first. Defaults to auto, which tries ScrapeCreators before SociaVault when both secrets exist. This is not exposed to X users.

## `dedupeMembers` (type: `boolean`):

Use this to avoid duplicate member rows when the same account is featured and also posts in the community. Matching is by X user ID first, then normalized username. Defaults to true. This does not dedupe across different communities.

## `includeRaw` (type: `boolean`):

Use this only when debugging field drift or validating provider parity. It attaches the raw provider object to each dataset item. Defaults to false for small MCP-friendly output. This is not needed for normal member exports.

## Actor input object example

```json
{
  "communities": [
    "https://x.com/i/communities/1699807431709041070"
  ],
  "includeActiveMembers": true,
  "maxMembersPerCommunity": 50,
  "includeFeaturedMembers": true,
  "includeCommunityProfile": true,
  "providerOrder": "auto",
  "dedupeMembers": true,
  "includeRaw": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `runSummary` (type: `string`):

Detailed terminal status for automation, monitoring, and AI-agent workflows.

## `runOutput` (type: `string`):

Machine-readable terminal outcome, useful result count, failure details, and PPE charge counts.

# 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 = {
    "communities": [
        "https://x.com/i/communities/1699807431709041070"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/x-community-members-scraper").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 = { "communities": ["https://x.com/i/communities/1699807431709041070"] }

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/x-community-members-scraper").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 '{
  "communities": [
    "https://x.com/i/communities/1699807431709041070"
  ]
}' |
apify call khadinakbar/x-community-members-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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