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

List affiliated X accounts tied to a verified organization—profiles, labels, and team-style metadata in structured rows.

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

## Pricing

from $4.99 / 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.

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 Organization Affiliates Scraper

Export **affiliated accounts** shown for a **verified organization** on X—the same kind of profiles people see in the organization’s team or affiliate list. Each dataset row is one account with nested profile fields, business-style labels when present, and counts.

### Who it’s for

- **Brand & social teams** auditing which accounts are linked to a parent organization.
- **Analysts** mapping corporate or regional sub-accounts.
- **Compliance & research** workflows that need structured user rows instead of manual browsing.

### What you can do with it

- **Pull many affiliated profiles** in one run until you reach the limit you set or the list ends.
- **Match every row** to the organization you asked for via **`requestedOrganizationUserId`**, plus **`scrapedAt`** on each row.

### How it works (in plain terms)

You enter the **numeric id** of the **organization account** (not the `@handle`). The tool loads profiles in successive batches until your **maximum** is reached or there are no more to load—you do not need to manage paging yourself.

### Input

| Field | Required | What it means |
|-------|----------|----------------|
| **Organization account ID** (`user`) | Yes | The organization’s numeric id. |
| **Maximum results** (`maxResults`) | No | Upper limit on how many affiliate rows to collect (default **50**). |

### Output

- **One row per affiliated account** (until your cap).
- **Identity**: **`__typename`** (`User`), internal **`id`**, numeric **`rest_id`**, **`profile_image_shape`**, and flags such as **`is_blue_verified`**, **`has_graduated_access`**.
- **Organization link badge**: **`affiliates_highlighted_label.label`** often includes **`description`** (parent brand name), **`userLabelType`**, **`userLabelDisplayType`**, a **`badge.url`** image when X shows a logo, and **`url`** / **`urlType`** when a deep link is provided.
- **Profile**: **`legacy`** typically includes **`screen_name`**, **`name`**, **`description`**, **`location`**, **`profile_image_url_https`**, **`profile_banner_url`**, **`created_at`**, **`entities`** (bio and profile link URLs), **`pinned_tweet_ids_str`**, engagement and graph hints (**`followers_count`**, **`friends_count`**, **`statuses_count`**, **`media_count`**, **`listed_count`**, **`favourites_count`**), relationship flags (**`blocked_by`**, **`blocking`**, **`following`**, **`followed_by`**, **`can_dm`**, **`can_media_tag`**, **`muting`**, **`follow_request_sent`**, **`notifications`**), **`verified`**, **`verified_type`**, **`protected`**, **`possibly_sensitive`**, **`withheld_in_countries`**, and similar fields when returned.
- **Professional**: **`professional`** may include **`professional_type`**, **`category`**, **`rest_id`**.
- **Other**: **`tipjar_settings`** (often an empty object), **`super_follow_eligible`**, **`super_followed_by`**, **`super_following`**, etc., when present.
- **Export metadata**: **`requestedOrganizationUserId`** repeats the organization id you entered; **`scrapedAt`** is when that row was saved.

Optional blocks and field names may vary by account or over time as X updates its product.

#### Sample output (one dataset row, from a real run; `legacy` shortened)

```json
{
  "__typename": "User",
  "affiliates_highlighted_label": {
    "label": {
      "badge": {
        "url": "https://pbs.twimg.com/profile_images/1384363472259928071/zXb55Bwo_bigger.jpg"
      },
      "description": "Xiaomi",
      "url": {
        "url": "https://twitter.com/Xiaomi",
        "urlType": "DeepLink"
      },
      "userLabelDisplayType": "Badge",
      "userLabelType": "BusinessLabel"
    }
  },
  "has_graduated_access": true,
  "id": "VXNlcjoyMTczODUzMzA=",
  "is_blue_verified": true,
  "legacy": {
    "blocked_by": false,
    "blocking": false,
    "can_dm": true,
    "can_media_tag": true,
    "created_at": "Fri Nov 19 11:32:08 +0000 2010",
    "description": "We help you get the best out of your phone. The official account of #XiaomiHyperOS and #MIUI for Xiaomi fans.",
    "entities": {
      "description": { "urls": [] },
      "url": {
        "urls": [
          {
            "display_url": "mi.com/global/hyperos",
            "expanded_url": "https://www.mi.com/global/hyperos",
            "indices": [0, 23],
            "url": "https://t.co/fMdOVsGMRm"
          }
        ]
      }
    },
    "followers_count": 750766,
    "friends_count": 423,
    "location": "",
    "name": "Xiaomi HyperOS",
    "pinned_tweet_ids_str": ["1970833116349821162"],
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/217385330/1702888187",
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/1740292824246206464/U6b6j0E9_normal.png",
    "screen_name": "XiaomiHyperOS_",
    "statuses_count": 16525,
    "verified": false,
    "verified_type": "Business"
  },
  "professional": {
    "category": [],
    "professional_type": "Business",
    "rest_id": "1648212910014083074"
  },
  "profile_image_shape": "Square",
  "rest_id": "217385330",
  "super_follow_eligible": false,
  "super_followed_by": false,
  "super_following": false,
  "tipjar_settings": {},
  "requestedOrganizationUserId": "377228272",
  "scrapedAt": "2026-03-26T00:48:51.251Z"
}
```

### Good to know

- The **organization id** must be correct; accounts without a public affiliate list may return few or no rows.
- Respect X’s rules and applicable laws when using exported data.

# Actor input Schema

## `user` (type: `string`):

The numeric id of the verified organization account whose affiliated profiles you want to export (not the @handle).

## `maxResults` (type: `integer`):

How many affiliate account rows to save in total.

## Actor input object example

```json
{
  "user": "377228272",
  "maxResults": 20
}
```

# 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 = {
    "user": "377228272",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerai/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 = {
    "user": "377228272",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("powerai/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 '{
  "user": "377228272",
  "maxResults": 20
}' |
apify call powerai/twitter-organization-affiliates-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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