# X Community Tweets Scraper (`khadinakbar/x-community-tweets-scraper`) Actor

Collect a current public timeline snapshot from an X Community URL or numeric ID. Each row includes tweet text, author, engagement, media, timestamp, and source URL. No user cookies or X login are required.

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

## Pricing

from $5.00 / 1,000 community tweet scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Tweets Scraper

X Community Tweets Scraper collects a current public timeline snapshot from one or more X Community URLs or numeric Community IDs. Each input Community produces one normalized record per public tweet, with tweet text, author identity, engagement counts, media fields, timestamps, and source URLs. The output is a one-record-per-tweet dataset that is useful for reviewing a public Community snapshot, feeding analysis workflows, and preserving provenance from the provider route that supplied each row.

### Best fit and connected workflows

This Actor fits workflows that start with a public X Community and end with structured tweet-level data. It works well when you need:

- A fresh snapshot of posts from a specific Community URL or Community ID.
- Structured fields for author, engagement, media, hashtags, mentions, and outbound links.
- A dataset that can be reviewed directly in Apify, exported, or passed into downstream analysis.
- An Apify Actor usable through Apify MCP for agent-driven data collection.

This Actor is especially practical when the workflow begins with a Community link and the next step is analysis, categorization, enrichment, or reporting on the returned tweet records.

#### focused workflow

X Community Tweets Scraper is designed as a focused workflow.

### Practical scenario

Maya, a community manager, has the URL for a public X Community where members discuss product feedback. She runs the Actor with that Community URL and leaves the default settings in place. The dataset returns tweet text, author username, author name, created time, like count, reply count, repost count, view count, media presence, and the source Community URL. Maya uses the returned tweet URLs and engagement fields to review recent discussion themes, then exports the dataset for a weekly report.

### Input

The Actor accepts one or more public X Community URLs or numeric IDs. One run reads one current provider snapshot per Community, and each Community input produces tweet rows from that snapshot.

| Field | Type | Purpose |
| --- | --- | --- |
| `communities` | array of strings | Public X Community URLs or numeric IDs. Required. Accepts 1 to 10 Communities. |
| `maxTweetsPerCommunity` | integer | Maximum rows kept from each Community snapshot. Range 1 to 20. Default: 20. |
| `deduplicateTweets` | boolean | Removes repeated tweet IDs within the current run. Default: `true`. |
| `providerOrder` | string | Provider routing order for a controlled test or recovery attempt. Values: `auto`, `scrapecreators-first`, `sociavault-first`. Default: `auto`. |

#### Focused input example

```json
{
  "communities": [
    "https://x.com/i/communities/1699807431709041070"
  ],
  "maxTweetsPerCommunity": 10,
  "deduplicateTweets": true,
  "providerOrder": "auto"
}
```

### Output

Every dataset row is one public Community tweet. The dataset contains normalized tweet, author, engagement, media, freshness, and provenance fields.

| Field | Type | Meaning |
| --- | --- | --- |
| `recordType` | string | Dataset entity type. Always `tweet`. |
| `communityId` | string | Numeric Community ID that supplied the tweet. |
| `communityUrl` | string | Canonical Community URL. |
| `tweetId` | string | Stable X post ID. |
| `tweetUrl` | string | Canonical direct tweet URL. |
| `text` | string or null | Public tweet text when available. |
| `createdAt` | string or null | Tweet creation time in ISO 8601 format when parseable. |
| `language` | string or null | Language code when provided. |
| `sourceClient` | string or null | Human-readable source application. |
| `conversationId` | string or null | Conversation root ID when available. |
| `isReply` | boolean | Whether the tweet belongs to a reply conversation. |
| `isQuote` | boolean | Whether the tweet is marked as a quote post. |
| `authorUsername` | string or null | Public username without the @ symbol. |
| `authorName` | string or null | Public display name. |
| `authorUrl` | string or null | Canonical author profile URL. |
| `authorFollowersCount` | integer or null | Public follower count when available. |
| `authorFollowingCount` | integer or null | Public following count when available. |
| `authorVerified` | boolean or null | Blue verification state when available. |
| `viewCount` | integer or null | Views or impressions when returned. |
| `likeCount` | integer or null | Public like count. |
| `replyCount` | integer or null | Public reply count. |
| `repostCount` | integer or null | Public repost count. |
| `quoteCount` | integer or null | Public quote count. |
| `bookmarkCount` | integer or null | Public bookmark count when returned. |
| `hasMedia` | boolean | Whether attached media was returned. |
| `mediaUrls` | array of strings | Public media asset URLs attached to the tweet. |
| `mediaTypes` | array of strings | Media categories such as photo, video, or animated\_gif. |
| `hashtags` | array of strings | Hashtags without the # symbol. |
| `mentionedUsernames` | array of strings | Mentioned usernames without the @ symbol. |
| `outboundUrls` | array of strings | Expanded external links in the tweet when available. |
| `provider` | string | Provider route that supplied the row: `scrapecreators` or `sociavault`. |
| `scrapedAt` | string | ISO 8601 collection timestamp. |

#### Illustrative output record

```json
{
  "recordType": "tweet",
  "communityId": "1699807431709041070",
  "communityUrl": "https://x.com/i/communities/1699807431709041070",
  "tweetId": "2071625893093789997",
  "tweetUrl": "https://x.com/ash_twtz/status/2071625893093789997",
  "text": "Community discussion starts here.",
  "createdAt": "2026-07-14T12:30:00.000Z",
  "language": "en",
  "sourceClient": "Twitter for iPhone",
  "conversationId": "2071625893093789997",
  "isReply": false,
  "isQuote": false,
  "authorId": "123456789",
  "authorUsername": "ash_twtz",
  "authorName": "Ash",
  "authorUrl": "https://x.com/ash_twtz",
  "authorAvatarUrl": "https://pbs.twimg.com/profile_images/example_normal.jpg",
  "authorBio": "Builder and community member.",
  "authorFollowersCount": 1200,
  "authorFollowingCount": 350,
  "authorVerified": true,
  "viewCount": 8660,
  "likeCount": 173,
  "replyCount": 55,
  "repostCount": 3,
  "quoteCount": 2,
  "bookmarkCount": 10,
  "hasMedia": false,
  "mediaUrls": [],
  "mediaTypes": [],
  "hashtags": [
    "buildinpublic"
  ],
  "mentionedUsernames": [
    "apify"
  ],
  "outboundUrls": [
    "https://example.com"
  ],
  "provider": "scrapecreators",
  "scrapedAt": "2026-07-14T12:35:00.000Z"
}
```

### How it works

This Actor reads one current provider snapshot per supplied Community and normalizes the returned public tweet data into a dataset record per tweet. The live contract shows two provider routes: ScrapeCreators and SociaVault. The default provider order is `auto`, which tries ScrapeCreators first and then SociaVault when both owner-managed secrets are available. No X account cookie or user login is required.

The Actor also persists a compact `OUTPUT` record and a `RUN_SUMMARY` record in the key-value store, so you can inspect both the dataset and the run-level summary after execution.

### Pricing

X Community Tweets Scraper uses Pay per event plus Apify platform usage.

The charged events are:

- Actor start
- Community tweet scraped

The tweet event is the primary event. Lowering `maxTweetsPerCommunity` reduces how many tweet events can be charged because fewer records are kept from each Community snapshot. For example, a run that saves twenty tweets produces twenty tweet events plus one start event.

For the current pricing details, open the live Pricing tab in Apify Console. Platform compute and usage are billed separately under the Pay per event plus usage model.

### Use with AI agents (MCP)

This Actor is available as an Apify Actor usable through Apify MCP. The precise tool purpose is to collect a structured public snapshot of X Community tweets from one or more Community URLs or IDs and return normalized dataset rows with provenance.

Actor identity: `khadinakbar/x-community-tweets-scraper`

> Collect the current public snapshot for this X Community URL, return the latest tweet records, and summarize the author, engagement, media, and provenance fields for each row.

Output interpretation for agents:

- `tweetUrl` identifies each public post.
- `text`, `authorUsername`, `authorName`, and `createdAt` capture the tweet content and attribution.
- `likeCount`, `replyCount`, `repostCount`, `quoteCount`, and `viewCount` represent visible engagement when returned.
- `hasMedia`, `mediaUrls`, and `mediaTypes` describe attached media.
- `communityUrl`, `provider`, and `scrapedAt` show source Community, provider route, and collection time.

Provenance and scope:

- Each row is one public Community tweet from the current snapshot.
- `provider` records which provider route supplied the row.
- The Actor works from public Community inputs, and the dataset preserves source URLs for traceability.

Pagination and cost guidance:

- `maxTweetsPerCommunity` keeps at most 20 rows per Community snapshot.
- The setting controls how many tweet records are kept, which also affects event charges.
- It is a snapshot collector, so agent workflows should treat the dataset as the current public view for the supplied Communities.

### API example

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

const client = new ApifyClient({
    token: process.env.APIFY_TOKEN,
});

const run = await client.actor('khadinakbar/x-community-tweets-scraper').call({
    communities: ['https://x.com/i/communities/1699807431709041070'],
    maxTweetsPerCommunity: 10,
    deduplicateTweets: true,
    providerOrder: 'auto',
});

const datasetId = run.defaultDatasetId;
const { items } = await client.dataset(datasetId).listItems();

console.log(items);
```

### Best results and outcome guidance

Start with the canonical Community URL or numeric Community ID. Use `maxTweetsPerCommunity` to keep the snapshot focused, and leave `deduplicateTweets` enabled when overlapping Community inputs might surface the same post more than once. When you need a controlled provider routing test, set `providerOrder` explicitly. For analysis workflows, use the tweet URL, text, author fields, and engagement counts together so each row stays tied to one public post.

### Continue the workflow

- Then use [X Tweet Engagement Scraper - Replies, Quotes & Retweets](https://apify.com/khadinakbar/x-tweet-engagement-scraper) to add X Twitter engagement evidence to records selected with X Community Tweets Scraper.
- Then use [🐦 X (Twitter) Tweet Scraper | Search, Hashtags, Profiles & URLs](https://apify.com/khadinakbar/x-tweet-scraper) to extend X Community Tweets Scraper research with a complementary content contract.

### Design note

I found that every output row is defined as one public Community tweet, and the dataset schema marks `recordType` with the fixed value `tweet`. That makes the record shape easy to reason about when mapping rows into downstream analysis.

### FAQ

#### Can I pass a profile URL, handle, hashtag, or keyword query?

This Actor accepts Community URLs or numeric Community IDs. The input schema is built around public X Community sources.

#### How many Communities can I include in one run?

The input schema accepts 1 to 10 Communities.

#### How many tweets can the Actor keep per Community?

The configured range is 1 to 20, and the current contract sets the default to 20.

#### Which provider routes are available?

The dataset schema shows `scrapecreators` and `sociavault`. The live manifest also says `auto` tries ScrapeCreators first and then SociaVault when both owner-managed secrets are available.

#### What records are written besides the dataset?

The Actor also writes a compact `OUTPUT` record and a detailed `RUN_SUMMARY` record.

### Responsible use

Use this Actor only with public data you are authorized to collect and process. Respect applicable law, platform terms, and Community rules. Keep usage aligned with public snapshots and source URLs, and review the returned fields before using them in reporting, automation, or AI workflows.

# Actor input Schema

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

Use this when you need recent public posts from specific X/Twitter Communities. Accepts a community URL such as https://x.com/i/communities/1699807431709041070 or its numeric ID. Provide from 1 to 10 communities; the actor reads one current provider snapshot per community. This is not a profile URL, handle, hashtag, or keyword search field.

## `maxTweetsPerCommunity` (type: `integer`):

Use this to set the maximum number of tweet rows kept from each community snapshot, for example 10. The accepted range is 1 to 20 and the default is 20, matching the current observed public-provider response ceiling. Lowering this limit lowers event charges; it does not request historical pagination. This is not a guarantee that every community has this many public posts.

## `deduplicateTweets` (type: `boolean`):

Use this to avoid repeated tweet IDs when a provider response or overlapping community inputs contain the same post. Defaults to true and compares the stable X tweet ID across the current run. Set it to false only when you intentionally need every source occurrence. This does not deduplicate similar text with different tweet IDs.

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

Use this to choose the provider order for a controlled test or recovery attempt. Choose auto, scrapecreators-first, or sociavault-first; auto tries ScrapeCreators then SociaVault when both owner-managed secrets are available. The default is auto. This is not an X account setting and no user cookie is required.

## Actor input object example

```json
{
  "communities": [
    "https://x.com/i/communities/1699807431709041070"
  ],
  "maxTweetsPerCommunity": 20,
  "deduplicateTweets": true,
  "providerOrder": "auto"
}
```

# Actor output Schema

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

No description

## `output` (type: `string`):

No description

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

No description

# 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-tweets-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-tweets-scraper").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 '{
  "communities": [
    "https://x.com/i/communities/1699807431709041070"
  ]
}' |
apify call khadinakbar/x-community-tweets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/x-community-tweets-scraper"
        }
    }
}

```

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/H2OnGNSeEDnXpeBOZ/builds/2623Twny86VJQ4sDZ/openapi.json
