# Twitter Organization Affiliates Scraper (`maximedupre/twitter-organization-affiliates-scraper`) Actor

Export public X/Twitter organization affiliates from URLs, @handles, /affiliates paths, or numeric IDs. Get handles, names, bios, follower counts, verification flags, business labels, badge URLs, profile links, and scrape timestamps.

- **URL**: https://apify.com/maximedupre/twitter-organization-affiliates-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Lead generation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 affiliate accounts

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 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 organization affiliates scraper for X

Twitter Organization Affiliates Scraper exports the public affiliate accounts shown for a verified organization on [X/Twitter](https://x.com/). Add an organization URL, `@handle`, plain handle, `/affiliates` path, or numeric user ID, then get one clean dataset row per affiliated account.

Use it when you need to audit which accounts are tied to a parent brand, map regional or product accounts, review business labels, or build repeatable exports for social media, compliance, market research, lead enrichment, and API workflows. Instead of opening X manually and copying profiles one by one, you get structured rows with handles, names, bios, follower counts, verification flags, organization labels, badge URLs, profile links, and scrape timestamps.

For a small first run, keep the prefilled Xiaomi target and set **Affiliate limit** to `25`. Once the output shape looks right, replace it with the public organizations you want to check.

### ✅ What this Actor does

- Scrapes public X/Twitter organization affiliate lists.
- Accepts full `x.com` and `twitter.com` URLs, `@handles`, plain handles, `/affiliates` paths, and numeric user IDs.
- Resolves organization targets before collecting affiliates.
- Saves one dataset row per affiliated account.
- Extracts profile identity fields such as handle, display name, profile URL, avatar, banner, bio, location, account creation time, and pinned post IDs.
- Adds public counts such as followers, following, posts, media, listed count, and likes when X exposes them.
- Includes verification, blue verification, protected-account, DM, professional category, organization label, badge, and label URL fields when available.
- Skips invalid, unavailable, or empty targets without adding placeholder rows.
- Runs without a user-provided X API key, login, or cookies.

This Actor is focused on organization affiliate accounts. It does not scrape followers, following, verified followers, lists, communities, posts, replies, private accounts, protected content, deleted profiles, or login-only data.

### 📊 Data you can export

Each output row represents one public account affiliated with one requested organization.

Core fields include:

- `sourceTarget` and `inputPosition` - the submitted organization target and its position in your input.
- `organizationId`, `organizationHandle`, `organizationName`, and `organizationUrl` - the resolved organization context.
- `affiliatePosition` - the affiliate's position in the collected list.
- `affiliateId`, `affiliateRestId`, `affiliateHandle`, `affiliateName`, and `affiliateUrl` - account identity and source links.
- `bio`, `location`, `websiteUrl`, `profileImageUrl`, `profileBannerUrl`, and `accountCreatedAt` - public profile details.
- `followersCount`, `followingCount`, `postsCount`, `mediaCount`, `listedCount`, and `likesCount` - public profile counts when available.
- `isVerified`, `isBlueVerified`, `verifiedType`, `isProtected`, and `canDm` - profile status flags when available.
- `affiliateLabelDescription`, `affiliateLabelType`, `affiliateLabelDisplayType`, `affiliateBadgeUrl`, and `affiliateLabelUrl` - organization label and badge fields shown by X.
- `professionalType`, `professionalCategories`, `pinnedPostIds`, and `scrapedAt` - extra profile context and scrape metadata.

Some fields can be `null` or empty when X does not show them for a specific account.

### 🚀 How to run it

1. Open the **Input** tab.
2. Add one or more X/Twitter organizations in **Twitter organizations**.
3. Use any supported target form, such as `Xiaomi`, `@Xiaomi`, `https://x.com/Xiaomi/affiliates`, or `377228272`.
4. Set **Affiliate limit** to the maximum number of affiliate accounts to save for each organization.
5. Run the Actor and export the dataset as JSON, CSV, Excel, XML, RSS, HTML, or through the Apify API.

You can also schedule repeat checks, call the Actor from your own code, or connect the dataset to downstream Apify integrations and webhooks.

### 🧾 Input

| Field | Description |
| ----- | ----------- |
| `organizations` | Public X/Twitter organization URLs, handles, `/affiliates` paths, or numeric user IDs. |
| `maxResultsPerOrganization` | Maximum number of affiliated account rows to save for each organization. |

Good first-run input:

```json
{
  "organizations": ["https://x.com/Xiaomi/affiliates"],
  "maxResultsPerOrganization": 25
}
````

### 📦 Output example

```json
{
  "sourceTarget": "https://x.com/Xiaomi/affiliates",
  "inputPosition": 1,
  "organizationId": "377228272",
  "organizationHandle": "Xiaomi",
  "organizationName": "Xiaomi",
  "organizationUrl": "https://x.com/Xiaomi",
  "affiliatePosition": 1,
  "affiliateId": "30597970",
  "affiliateRestId": "30597970",
  "affiliateHandle": "atytse",
  "affiliateName": "Alvin T",
  "affiliateUrl": "https://x.com/atytse",
  "bio": "VP @Xiaomi International",
  "location": null,
  "websiteUrl": null,
  "profileImageUrl": "https://pbs.twimg.com/profile_images/...",
  "profileBannerUrl": "https://pbs.twimg.com/profile_banners/...",
  "accountCreatedAt": "2009-04-12T04:07:30.000Z",
  "followersCount": 54002,
  "followingCount": 1204,
  "postsCount": 10057,
  "mediaCount": 2364,
  "listedCount": 109,
  "likesCount": 1130,
  "isVerified": true,
  "isBlueVerified": true,
  "verifiedType": null,
  "isProtected": false,
  "canDm": null,
  "affiliateLabelDescription": "Xiaomi",
  "affiliateLabelType": "BusinessLabel",
  "affiliateLabelDisplayType": "Badge",
  "affiliateBadgeUrl": "https://pbs.twimg.com/profile_images/...",
  "affiliateLabelUrl": "https://twitter.com/Xiaomi",
  "professionalType": null,
  "professionalCategories": [],
  "pinnedPostIds": [],
  "scrapedAt": "2026-06-04T17:46:50.260Z"
}
```

### 💳 Pricing

This Actor uses pay-per-event pricing. You are charged for each affiliated account saved to the dataset. Invalid targets, empty affiliate lists, and skipped unavailable targets do not create output rows.

### ⚠️ Limits and caveats

- The organization must expose a public affiliate list on X/Twitter.
- Accounts without a public affiliate list can return zero rows.
- X may show different optional fields for different profiles.
- Protected, deleted, unavailable, or login-only content is not exported.
- The dataset contains successful affiliate rows only; skipped targets are reported in the run log.

### ❓ FAQ

#### 🔑 Do I need X cookies, a login, or an API key?

No. The Actor does not ask you to provide X cookies, a login, or an X API key.

#### 🧭 Can I use handles instead of numeric user IDs?

Yes. You can paste a full organization URL, `@handle`, plain handle, `/affiliates` path, or numeric user ID.

#### 🔎 Why did my organization return no affiliates?

The most common reason is that the account does not show a public organization affiliate list on X/Twitter. The run can still finish successfully with zero rows.

#### 👥 Does this scrape followers or following?

No. This Actor only exports organization affiliate accounts. Use a broader Twitter/X scraper if you need followers, following, posts, lists, or communities.

### 📝 Changelog

- 0.0: Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~twitter-organization-affiliates-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Other actors

- [Twitter Scraper ↗](https://apify.com/maximedupre/twitter-scraper) - Search public X/Twitter posts, profiles, and trending topics.
- [Twitter Media Scraper ↗](https://apify.com/maximedupre/twitter-media-scraper) - Extract images, videos, and GIFs from public X posts and search targets.
- [Twitter Retweet Checker ↗](https://apify.com/maximedupre/twitter-retweet-checker) - Check whether specific users retweeted public X posts.
- [Twitter Screenshot Generator ↗](https://apify.com/maximedupre/twitter-screenshot-generator) - Capture clean screenshots of public X posts.
- [LinkedIn Company Scraper ↗](https://apify.com/maximedupre/linkedin-company-scraper) - Export public company profile data for account mapping and market research.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `organizations` (type: `array`):

Add one public X/Twitter organization per line. You can mix full URLs, @handles, plain handles, /affiliates paths, and numeric user IDs in one run.

## `maxResultsPerOrganization` (type: `integer`):

Maximum number of affiliated account rows to save for each organization. Use a small number for a quick first run.

## Actor input object example

```json
{
  "organizations": [
    "Xiaomi",
    "https://x.com/Xiaomi/affiliates",
    "377228272"
  ],
  "maxResultsPerOrganization": 25
}
```

# Actor output Schema

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

Open the dataset with scraped X/Twitter organization affiliate accounts.

# 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 = {
    "organizations": [
        "Xiaomi",
        "https://x.com/Xiaomi/affiliates",
        "377228272"
    ],
    "maxResultsPerOrganization": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/twitter-organization-affiliates-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 = {
    "organizations": [
        "Xiaomi",
        "https://x.com/Xiaomi/affiliates",
        "377228272",
    ],
    "maxResultsPerOrganization": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/twitter-organization-affiliates-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 '{
  "organizations": [
    "Xiaomi",
    "https://x.com/Xiaomi/affiliates",
    "377228272"
  ],
  "maxResultsPerOrganization": 25
}' |
apify call maximedupre/twitter-organization-affiliates-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=maximedupre/twitter-organization-affiliates-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter Organization Affiliates Scraper",
        "description": "Export public X/Twitter organization affiliates from URLs, @handles, /affiliates paths, or numeric IDs. Get handles, names, bios, follower counts, verification flags, business labels, badge URLs, profile links, and scrape timestamps.",
        "version": "0.0",
        "x-build-id": "CICgnpa5EIKQpc0JW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~twitter-organization-affiliates-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-twitter-organization-affiliates-scraper",
                "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/maximedupre~twitter-organization-affiliates-scraper/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-twitter-organization-affiliates-scraper",
                "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/maximedupre~twitter-organization-affiliates-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-twitter-organization-affiliates-scraper",
                "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": [
                    "organizations"
                ],
                "properties": {
                    "organizations": {
                        "title": "Twitter organizations",
                        "minItems": 1,
                        "maxItems": 1000,
                        "type": "array",
                        "description": "Add one public X/Twitter organization per line. You can mix full URLs, @handles, plain handles, /affiliates paths, and numeric user IDs in one run.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "maxResultsPerOrganization": {
                        "title": "Affiliate limit",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of affiliated account rows to save for each organization. Use a small number for a quick first run.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
