# Facebook Followers and Following Scraper (`premiumscraper/facebook-followers-and-following-scraper`) Actor

Scrape followers and following lists from usernames, profile/page links, direct URLs. Output includes connection name, username, profile URL, image, verification flags, source context, data enrichment for bio, category, follower totals, and transparency data. ✨Facebook Followers Scraper 🔍

- **URL**: https://apify.com/premiumscraper/facebook-followers-and-following-scraper.md
- **Developed by:** [Premium Scraper](https://apify.com/premiumscraper) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 5 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 followers-followings

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

## Facebook Followers and Following Scraper ⚡

Facebook Followers and Following Scraper collects public Facebook followers, following, or both from usernames, profile URLs, page URLs, and direct tab URLs. Facebook Followers and Following Scraper returns flat connection fields, source-page context, sanitized raw payloads, and an optional `connection_profile_details` object for deeper public profile or page enrichment on each exported connection.

### Overview

Facebook Followers and Following Scraper is designed for teams that need a clean dataset instead of a raw browser dump. Facebook Followers and Following Scraper keeps list rows readable for analysis, exports the most useful public fields at the top level, and gives you the option to run a second public details pass only when you need more context.

### Why teams choose Facebook Followers and Following Scraper

- Facebook Followers and Following Scraper accepts separate `username` and `facebook_urls` inputs, which keeps bulk jobs cleaner and easier to audit.
- Facebook Followers and Following Scraper can scrape `followers`, `following`, or `both`, with separate limits for each tab type.
- Facebook Followers and Following Scraper promotes connection identity, type, verification, ordering, and source metadata into predictable top-level fields.
- Facebook Followers and Following Scraper keeps `rawConnectionData` and `rawEdgeData` sanitized so you still have supporting evidence without a noisy export.
- Facebook Followers and Following Scraper preserves source-page context inside `Input_source_detilas`, including source totals, source identity, and the input kind that produced the row.
- Facebook Followers and Following Scraper can optionally add `connection_profile_details`, which is useful when you need richer public page or profile data beyond the public list row.

### Comparison: Facebook Followers and Following Scraper vs. typical list actors

| Capability | Facebook Followers and Following Scraper | Typical basic actor |
|---|---|---|
| Input handling | Separate `username` and `facebook_urls` inputs, plus direct `/followers` and `/following` links | Often one mixed freeform input |
| Scrape scope | `followers`, `following`, or `both` in one run | Commonly limited to one list mode per workflow |
| Export format | Flat ready-to-use columns plus sanitized raw blocks | Usually raw JSON only or a very thin flat export |
| Source context | Includes `facebookId`, `navSections`, `pageAdLibrary`, `followersId`, `followingId`, and `Input_source_detilas` | Often missing source-level context |
| Optional enrichment | Supports `connection_profile_details` per connection when enabled | Commonly unavailable |
| Billing visibility | Count-based PAY_PER_EVENT logs show confirmed and unconfirmed billing outcomes | Often unclear or buried in verbose logs |
| Run reliability | Resume-safe checkpoint behavior and professional progress logs | Often restarts from scratch or logs too much |

Facebook Followers and Following Scraper is built for structured delivery, not just list collection.

### Supported inputs for Facebook Followers and Following Scraper

Facebook Followers and Following Scraper supports the following public input styles:

| Input type | Example |
|---|---|
| Username | `Cristiano` |
| Profile URL | `https://www.facebook.com/Cristiano` |
| Page URL | `https://www.facebook.com/Nike` |
| Direct followers URL | `https://www.facebook.com/Cristiano/followers` |
| Direct following URL | `https://www.facebook.com/Cristiano/following` |

Facebook Followers and Following Scraper normalizes supported inputs to the public `https://www.facebook.com/...` format, deduplicates repeated sources, and then expands them according to `scrape_mode`.

### Input schema in Facebook Followers and Following Scraper

Facebook Followers and Following Scraper exposes a focused input schema:

| Field | Type | Purpose |
|---|---|---|
| `username` | string[] | One or more Facebook usernames |
| `facebook_urls` | URL[] | Profile URLs, page URLs, direct followers URLs, or direct following URLs |
| `scrape_mode` | enum | `followers`, `following`, or `both` |
| `max_followers` | integer | Per-source export cap for followers tabs |
| `max_following` | integer | Per-source export cap for following tabs |
| `enable_connection_profile_details` | boolean | Turns on the second public detail scrape for each exported connection. This adds richer fields but makes the run slower, so turn it off if you want faster results. |
| `proxyCountry` | string | Apify Residential proxy country selection |

### What Facebook Followers and Following Scraper returns

Facebook Followers and Following Scraper exports one dataset row per public connection. Each row is organized into four output layers:

| Output layer | Main fields | Why it matters |
|---|---|---|
| Connection row | `input_url` / `input_username`, `followType`, `id`, `title`, `connectionName`, `url`, `image`, `is_verified`, `position` | Gives you the connection itself in an analysis-friendly format |
| Source context | `facebookId`, `navSections`, `pageAdLibrary`, `followersId`, `followingId`, `Input_source_detilas` | Preserves where the row came from and what source page exposed it |
| Sanitized raw payloads | `rawConnectionData`, `rawEdgeData` | Keeps supporting data without tokens, cursors, and duplicate identity clutter |
| Optional enrichment | `connection_profile_details` | Adds richer public profile or page details when enabled and publicly available |

#### Core connection fields from Facebook Followers and Following Scraper

Facebook Followers and Following Scraper promotes the most useful list-row fields to the top level:

| Field | Description |
|---|---|
| `input_url` / `input_username` | Original source input, named by input type |
| `followType` | Whether the row came from the followers tab or the following tab |
| `id` | Public Facebook ID of the connection |
| `itemId` | Public collection item ID |
| `title` | Public display name |
| `connectionName` | Promoted connection display name |
| `image` | Main public profile or page image |
| `url` | Public profile or page URL |
| `is_verified` | Public verification flag when available |
| `__typename` | Facebook node type such as `User` or `Page` |
| `__isEntity` | Facebook entity marker |
| `connectionUsername` | Username derived from the connection URL when available |
| `connectionTypeName` | Type label derived from the public row payload |
| `position` | Position within the current source tab |
| `number` | Final dataset row number |
| `sourceNumber` | Source order within the run |

#### Source context in Facebook Followers and Following Scraper

Facebook Followers and Following Scraper keeps source-page metadata available for traceability and joins:

| Field | Description |
|---|---|
| `facebookId` | Public Facebook ID of the source profile or page |
| `navSections` | Public navigation sections discovered on the source page |
| `pageAdLibrary` | Public ad-library metadata when Facebook exposes it |
| `followersId` | Source followers collection ID |
| `followingId` | Source following collection ID |
| `Input_source_detilas.sourceFollowersText` | Source followers total text |
| `Input_source_detilas.sourceFollowingText` | Source following total text |
| `Input_source_detilas.facebookTitle` | Source display name |
| `Input_source_detilas.facebookUsername` | Source username |
| `Input_source_detilas.facebookImage` | Source image URL |
| `Input_source_detilas.facebookTypename` | Source Facebook node type |
| `Input_source_detilas.facebookIsEntity` | Source entity marker |
| `Input_source_detilas.sourceInputKind` | Whether the source started from a username, profile URL, page URL, or direct tab URL |

#### Optional `connection_profile_details` in Facebook Followers and Following Scraper

Facebook Followers and Following Scraper can revisit each exported connection URL and append a richer nested object when `enable_connection_profile_details` is turned on. Depending on what Facebook publicly exposes for that connection, the enrichment block can include up to 72 top-level detail fields. Because every exported row triggers an extra public detail request, this option makes runs slower. If you want faster results, leave it turned off.

| Detail group | Example fields |
|---|---|
| Identity and type | `profile_type`, `name`, `username`, `id`, `url`, `is_verified`, `category`, `categories`, `gender` |
| Audience metrics | `followers`, `followers_text`, `followings`, `following_text`, `page_likes`, `fan_count`, `friend_count`, `talking_about_count`, `were_here_count` |
| Profile text | `bio`, `description`, `short_name`, `alternate_name`, `price_range` |
| Business and contact | `phone`, `contact_email`, `websites`, `single_line_address`, `hours`, `founded`, `has_whatsapp_number` |
| Personal and about data | `work`, `education`, `current_city`, `hometown`, `relationship_status`, `birthday`, `languages`, `religious_views`, `political_views`, `family_members` |
| Page and transparency data | `creation_date`, `page_creation_date`, `ad_status`, `confirmed_owner`, `delegate_page_id`, `is_business_page_active`, `is_currently_live` |
| Media and grouped blocks | `profile_picture_url`, `cover_photo_url`, `image_details`, `about_details`, `contact_details`, `location_details`, `work_and_education_details`, `personal_details`, `page_details`, `transparency_details`, `social_details`, `meta_tags` |
| Sanitized leftovers | `raw_api_data` |

### Billing in Facebook Followers and Following Scraper

Facebook Followers and Following Scraper uses a clear two-event PAY_PER_EVENT model:

| Event | When it is charged | Result |
|---|---|---|
| `profile_connection` | After a base row is accepted for export | The connection row is exported |
| `connection_profile_details` | Only when optional detail scraping succeeds and the extra charge is confirmed | The row receives the `connection_profile_details` block |

Facebook Followers and Following Scraper keeps billing logs count-based. Run logs show whether PAY_PER_EVENT is active, whether optional enrichment is enabled, how many rows were exported per source, how many detail blocks were attached, and which event counts were confirmed or not confirmed.

### Data quality and safe output in Facebook Followers and Following Scraper

Facebook Followers and Following Scraper removes sensitive tokens such as `fb_dtsg`, `lsd`, `jazoest`, `authorization`, `cookie`, `cookies`, `proxy_url`, and `xs` from logs and exported raw blocks. It also strips cursor values, GraphQL transport metadata, and duplicated identity keys from `rawConnectionData` and `rawEdgeData` so the dataset stays useful without exposing noisy request internals.

### Example JSON from Facebook Followers and Following Scraper

Facebook Followers and Following Scraper produces a structured row like this:

```json
{
    "input_username": "Cristiano",
    "followType": "followers",
    "id": "61589058460799",
    "image": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s160x160_tt6&_nc_cat=106&ccb=1-7&_nc_sid=167101&_nc_ohc=lKuV0Xy-1TcQ7kNvwFa9B2r&_nc_oc=AdrpOpMl004p6Zq3UyP-s3uHVxIeowu8XSRZ99lS1yU1Bvnt-AIKiesu7c1yOaKlSis&_nc_zt=24&_nc_ht=scontent-iad6-1.xx&_nc_gid=c5cxDImDxQSUm3T7APChrw&_nc_ss=7b289&oh=00_Af5kBfU8KdK7HHK1N3oBWOSr_zYquSwMHIidH9COZQ9Ahw&oe=6A006E00",
    "title": "Titan Esports   Moments",
    "connectionName": "Titan Esports   Moments",
    "url": "https://www.facebook.com/people/Titan-Esports-Moments/61589058460799",
    "__typename": "User",
    "__isEntity": "User",
    "facebookId": "100044296486382",
    "navSections": [
      {
        "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwNWt4UWk1ZDhKTlFUVVJoZkExc0tpNk1CUlRNQlYxNjhkbUdxS3h1QXc1SnMxbmU5cDVhWGR2Q0V2aDRXTXZaUFlzZG16U2UzWUxOZHFVVW1wS1NpWkdmOTY0RVJubA==",
        "name": "Followers",
        "url": "https://www.facebook.com/Cristiano/followers"
      },
      {
        "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwVWZDM21BaTNudmtNamNxSzU0QXZnaVVSazdDUjNRbVZOTkJFTjVBTWhDNHJhQ0FmeVpQR3U0cVhVV3laMVo1UENUVGhtR0o0ZTlUQjVmQjNwcWJmZVJlY2tqNWN0bA==",
        "name": "Following",
        "url": "https://www.facebook.com/Cristiano/following"
      }
    ],
    "pageAdLibrary": {
      "is_business_page_active": false,
      "id": "81221197163"
    },
    "followersId": "YXBwX2NvbGxlY3Rpb246cGZiaWQwNWt4UWk1ZDhKTlFUVVJoZkExc0tpNk1CUlRNQlYxNjhkbUdxS3h1QXc1SnMxbmU5cDVhWGR2Q0V2aDRXTXZaUFlzZG16U2UzWUxOZHFVVW1wS1NpWkdmOTY0RVJubA==",
    "followingId": "YXBwX2NvbGxlY3Rpb246cGZiaWQwVWZDM21BaTNudmtNamNxSzU0QXZnaVVSazdDUjNRbVZOTkJFTjVBTWhDNHJhQ0FmeVpQR3U0cVhVV3laMVo1UENUVGhtR0o0ZTlUQjVmQjNwcWJmZVJlY2tqNWN0bA==",
    "itemId": "YXBwX2l0ZW06MTAwMDQ0Mjk2NDg2MzgyOjIzNTYzMTgzNDk6MzI6OjYxNTg5MDU4NDYwNzk5",
    "is_verified": false,
    "connectionUsername": "Titan-Esports-Moments",
    "connectionTypeName": "User",
    "position": 1,
    "number": 1,
    "sourceNumber": 1,
    "rawConnectionData": {
      "is_verified": false,
      "actions_renderer": {
        "__typename": "TimelineAppCollectionItemFollowersListActionsRenderer",
        "is_menu_button": false,
        "__module_operation_ProfileCometAppCollectionListItem_timelineAppCollectionItem": {
          "__dr": "ProfileCometAppCollectionItemFollowersListActionsRenderer_actionsRenderer$normalization.graphql"
        },
        "__module_component_ProfileCometAppCollectionListItem_timelineAppCollectionItem": {
          "__dr": "ProfileCometAppCollectionItemFollowersListActionsRenderer.react"
        }
      },
      "node": {
        "is_verified": false
      }
    },
    "rawEdgeData": {
      "node": {
        "actions_renderer": {
          "__typename": "TimelineAppCollectionItemFollowersListActionsRenderer",
          "is_menu_button": false,
          "__module_operation_ProfileCometAppCollectionListItem_timelineAppCollectionItem": {
            "__dr": "ProfileCometAppCollectionItemFollowersListActionsRenderer_actionsRenderer$normalization.graphql"
          },
          "__module_component_ProfileCometAppCollectionListItem_timelineAppCollectionItem": {
            "__dr": "ProfileCometAppCollectionItemFollowersListActionsRenderer.react"
          }
        },
        "node": {
          "is_verified": false
        }
      }
    },
    "Input_source_detilas": {
      "sourceFollowersText": "171M followers",
      "sourceFollowingText": "47 following",
      "facebookTitle": "Cristiano Ronaldo",
      "facebookUsername": "Cristiano",
      "facebookImage": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.30808-1/448474001_1102716254548247_2613997786866384047_n.jpg?stp=cp0_dst-jpg_s80x80_tt6&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=fCnM_52PA78Q7kNvwF3f_9q&_nc_oc=AdriTMU6EBqRU8zy42zOeyVur9D6zSn-xavbEmyH9f3lrfKJWaCrLunS_JzWyM_T6cE&_nc_zt=24&_nc_ht=scontent-phl2-1.xx&_nc_gid=c5cxDImDxQSUm3T7APChrw&_nc_ss=7b289&oh=00_Af5-TiY-Mo6ZELR3q0lDJU5_o6oJmM_Txmv-Stct6-F-4A&oe=6A008CE1",
      "facebookTypename": "User",
      "facebookIsEntity": "User",
      "sourceInputKind": "username"
    },
    "connection_profile_details": {
      "profile_type": "Facebook Page",
      "name": "Titan Esports   Moments",
      "id": "61589058460799",
      "url": "https://www.facebook.com/people/Titan-Esports-Moments/61589058460799/",
      "is_verified": false,
      "category": "Gaming video creator",
      "categories": [
        "Gaming video creator"
      ],
      "gender": "UNKNOWN",
      "description": "Titan Esports   Moments. 2 talking about this. Gaming video creator",
      "followers_text": "0 followers",
      "followings": 2,
      "following_text": "2 following",
      "talking_about_count": "2",
      "rating": "Not yet rated (0 Reviews)",
      "creation_date": "Today",
      "ad_status": "This Page isn't currently running ads.",
      "profile_picture_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s480x480_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=cB1gZeUK1CHS72alRxZSxQ&_nc_ss=7b289&oh=00_Af70GGBe58U0UkvaSiLhtyuYum0BRx22jbyswPZq0LFRsA&oe=6A006E00",
      "cover_photo_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-6/688847975_122099117949301948_3705732730369152760_n.jpg?_nc_cat=106&ccb=1-7&_nc_sid=2a1932&_nc_ohc=IPjg_-d0B8cQ7kNvwG8unYf&_nc_oc=AdqTvtepLeRp5Dp6oapg7c_OggXUslpPfSMqUGlPVXHxavU-CAzKx6lN4z3NNhJTx0E&_nc_zt=23&_nc_ht=scontent-ord5-3.xx&_nc_gid=cB1gZeUK1CHS72alRxZSxQ&_nc_ss=7b289&oh=00_Af6DcGoYP4LEn2K_5DkcLSyNGkcbb8lttf2oxkRSTYdTAg&oe=6A007D6B",
      "delegate_page_id": "1073948905807319",
      "is_memorialized": false,
      "is_additional_profile_plus": true,
      "is_viewer_friend": false,
      "is_business_page_active": false,
      "subscribe_status": "CANNOT_SUBSCRIBE",
      "short_name": "Titan Esports   Moments",
      "is_currently_live": false,
      "image_details": {
        "profile_picture": {
          "url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s100x100_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=iUYUAHtu_tnFQsi88zaODg&_nc_ss=7b289&oh=00_Af5kMdzZXAoHUyntbLzdB4_7BO4A09kobcbLb7QcpAGPPg&oe=6A006E00"
        },
        "profile_picture_variants": {
          "large": {
            "url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s480x480_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=cB1gZeUK1CHS72alRxZSxQ&_nc_ss=7b289&oh=00_Af70GGBe58U0UkvaSiLhtyuYum0BRx22jbyswPZq0LFRsA&oe=6A006E00"
          },
          "medium": {
            "url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s320x320_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=cB1gZeUK1CHS72alRxZSxQ&_nc_ss=7b289&oh=00_Af6MsXUWPoRatc60oFOlsR4RfAqlvWA5K2bI-0hzziMdug&oe=6A006E00"
          },
          "small": {
            "url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s200x200_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=cB1gZeUK1CHS72alRxZSxQ&_nc_ss=7b289&oh=00_Af7g7eU9bdgttbJu7sNdEB2yKE0CX9p9gQcJrjvjukmgVg&oe=6A006E00"
          },
          "profile_160": {
            "url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s320x320_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=cB1gZeUK1CHS72alRxZSxQ&_nc_ss=7b289&oh=00_Af6MsXUWPoRatc60oFOlsR4RfAqlvWA5K2bI-0hzziMdug&oe=6A006E00"
          },
          "display_picture": {
            "url": "https://scontent-dfw6-1.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_cp0_dst-jpg_s80x80_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwG7iCoo&_nc_oc=AdodnzEbkIeVj_XfyW-aMwcT3bMicvLhHshijkamJfx8ODyM2DxNKN60fh5lt2SVmqI&_nc_zt=24&_nc_ht=scontent-dfw6-1.xx&_nc_gid=v0yBXq93Nrb_Ae9pEKOArQ&_nc_ss=7b289&oh=00_Af4wNKyfsP3B_iTV3Ac3XlKbVMpQHvjyu8_lzS2EU44Zrg&oe=6A006E00"
          },
          "profile_photo": {
            "url": "https://www.facebook.com/photo/?fbid=122099117265301948&set=a.122099110791301948"
          },
          "sticky_bar": {
            "url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_cp0_dst-jpg_s80x80_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=cB1gZeUK1CHS72alRxZSxQ&_nc_ss=7b289&oh=00_Af4Dfzwtyoe-xw42Vai2mZwz5ZisBXGeC9QNSf2X_1Nrcw&oe=6A006E00"
          },
          "direct_profile_picture": {
            "url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_dst-jpg_s200x200_tt6&_nc_cat=106&ccb=1-7&_nc_sid=f907e8&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=iUYUAHtu_tnFQsi88zaODg&_nc_ss=7b289&oh=00_Af4QkFbLQcP7tHnJRdJ-Xp5tJPddePyVIAto5_0CD0hHdQ&oe=6A006E00"
          }
        },
        "cover_photo": {
          "focus": {
            "x": 0.5,
            "y": 0.34164859002169
          }
        },
        "is_profile_picture_silhouette": false
      },
      "personal_details": {
        "gender": "UNKNOWN"
      },
      "page_details": {
        "delegate_page": {
          "is_business_page_active": false,
          "id": "1073948905807319"
        }
      },
      "transparency_details": {
        "creation_date_text": "Today",
        "ad_status": "This Page isn't currently running ads."
      },
      "social_details": {
        "profile_social_context": {
          "content": [
            {
              "text": "0 followers",
              "uri": "https://www.facebook.com/profile.php?id=61589058460799&sk=followers"
            },
            {
              "text": "2 following",
              "uri": "https://www.facebook.com/profile.php?id=61589058460799&sk=following"
            }
          ],
          "facepile_profile_count": 0,
          "facepile_uri": "https://www.facebook.com/profile.php?id=61589058460799&sk=followers"
        },
        "followers_text": "0 followers",
        "following_text": "2 following"
      },
      "meta_tags": {
        "bingbot": "noarchive",
        "viewport": "width=device-width,initial-scale=1,maximum-scale=2,shrink-to-fit=no",
        "al:android:app_name": "Facebook",
        "al:android:package": "com.facebook.katana",
        "al:android:url": "fb://profile/61589058460799",
        "al:ios:app_name": "Facebook",
        "al:ios:app_store_id": "284882215",
        "al:ios:url": "fb://profile/61589058460799",
        "apple-itunes-app": "app-id=284882215, app-argument=fb://profile/61589058460799",
        "og:type": "video.other",
        "og:title": "Titan Esports   Moments",
        "og:description": "Titan Esports   Moments. 2 talking about this. Gaming video creator",
        "og:url": "https://www.facebook.com/people/Titan-Esports-Moments/61589058460799/",
        "og:image:alt": "Titan Esports   Moments",
        "og:image": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=dst-jpg_tt6&cstp=mx800x772&ctp=s720x720&_nc_cat=106&ccb=1-7&_nc_sid=3ab345&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=KJDoswTcXfmL4uOCgRZgng&_nc_ss=7b289&oh=00_Af7PxMExM8FLLR1VUIXm8kda0jszN1s5IhiR1y0f-yxvQg&oe=6A006E00",
        "og:locale": "en_US",
        "referrer": "origin-when-crossorigin",
        "robots": "noodp,noydir",
        "description": "Titan Esports   Moments. 2 talking about this. Gaming video creator",
        "twitter:card": "summary",
        "twitter:title": "Titan Esports   Moments",
        "twitter:description": "Titan Esports   Moments. 2 talking about this. Gaming video creator",
        "twitter:image": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=dst-jpg_tt6&cstp=mx800x772&ctp=s720x720&_nc_cat=106&ccb=1-7&_nc_sid=3ab345&_nc_ohc=lKuV0Xy-1TcQ7kNvwGdxG_a&_nc_oc=AdqsCf7eFAaVIKFPaK5GrxH7YjwtEy9qRdNK9SKXnQhBLjOcrCh5M4xXs31BBzj3JvQ&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=KJDoswTcXfmL4uOCgRZgng&_nc_ss=7b289&oh=00_Af7PxMExM8FLLR1VUIXm8kda0jszN1s5IhiR1y0f-yxvQg&oe=6A006E00",
        "twitter:image:alt": "Titan Esports   Moments",
        "twitter:site": "@facebookapp",
        "application-title": "Facebook",
        "color-scheme": "light",
        "theme-color": "#FFFFFF"
      },
      "raw_api_data": {
        "avatar_cover_photo_takeover_type": "NONE",
        "story_bucket": {
          "nodes": [
            {
              "should_show_close_friend_badge": false,
              "id": "122099110935301948"
            }
          ]
        },
        "header_top_row": {
          "__typename": "XFBProfileNonDirectoryHeaderTopRowRenderer",
          "__module_operation_ProfileCometEntityConvergenceHeader_profileHeaderRenderer_topRow": {
            "__dr": "ProfileCometEntityConvergenceHeaderTopRow_renderer$normalization.graphql"
          },
          "__module_component_ProfileCometEntityConvergenceHeader_profileHeaderRenderer_topRow": {
            "__dr": "ProfileCometEntityConvergenceHeaderTopRow.react"
          }
        },
        "profile_tabs": {
          "__typename": "ProfileDefaultTabs",
          "profile_user": {
            "is_viewer_eligible_for_directory_on_comet": false,
            "should_show_mentions_tab_in_second_position": false,
            "can_have_scaled_mentions_features": false,
            "delegate_page": {
              "id": "1073948905807319"
            },
            "mentions_tab_tooltip_nux_text": "Write something or see what others are posting about them.",
            "is_memorialized": false,
            "timeline_nav_app_sections": {
              "edges": [
                {
                  "node": {
                    "has_new_content": false,
                    "name": "About",
                    "section_type": "ABOUT",
                    "tab_key": "about",
                    "url": "https://www.facebook.com/profile.php?id=61589058460799&sk=about",
                    "all_collections": {
                      "nodes": [
                        {
                          "tab_key": "about_contact_and_basic_info",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwTlZMWHhUTnhlZUJoTkdlNDczb3UxNEtKb1VVZ2FiNnpldHpkdVN4WkNlbldobms3Rkdnb1hlQTJXazRuOTFyTkFzZkNzN2NzRnhpNnVFazRCeHVpWkQ5VDF2eWt4bA=="
                        },
                        {
                          "tab_key": "about_privacy_and_legal_info",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwV2RmVVZWZEs0cWVZRGVBZlkyczZlU2dQZ0ZIZ1BKbVNteU1kS2ZNNnpqRWV3UGFNQUQ1ckFGenl4WDllZEJNZ1ZyMko2OEpaQkNzWkdQM3lObzYxaU50aktkanE5bA=="
                        },
                        {
                          "tab_key": "about_work_and_education",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwRHBkU1czQ1E1eWoxam9HUnZaeEpRZnpnRWN2YVp5Mzg2V212Zld5aXJoMkRUQVR2VFBZckRCeDdUek1xQlNlZkR2ZmhnVnhXY3N6QTlEaWhybjNockNEU1pWdENCbA=="
                        },
                        {
                          "tab_key": "about_places",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwR1d0dUFxYm55aEd5MUdRcHlpdnBDNXVVUEFWM29oWjUxU2k1ZFhQQkg2cTFYbjFFZkZlYk5kaU5TMUNqSkhHamNNVHFuUHZCakZwdlhkcEE3MUNBRFFaM0p1UGdhbA=="
                        },
                        {
                          "tab_key": "about_profile_transparency",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwWWRDblRMV25VQ1JEUDNQSkVNYWNHWHZacEt6WjU2Z2dGVW95SFlHUlB6NGRWVGQ5dXM1S3VGRUI2ZnNYaEJQUlpKcnNHUmZwcmp3SjFrZThXVEtOU2VNU0FZSkNXbA=="
                        },
                        {
                          "tab_key": "about_family_and_relationships",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwTlFnY3BuUnhTSHVtTG1pM3ZUMTdldnJTaGJCNVRXSk1aQXk2SmtBS0RFMVNwbzlyYW1vVVR1NXpBeXI1SDQzb2M4OUo1SmY5cFdrV0c1NkpTdnY0M0ViRVRnTHNSbA=="
                        },
                        {
                          "tab_key": "about_details",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwUnpwZDJ2bnBDOW05c0VxVDFZc2FRc0VtWGtDV0tMbkpjZDZHYWNmRTZiR2NiUmlHVTh2THJqRjZlcVpYWVZyU0ZKZ04zcnZCZkdjNnlxZUVqYzQzaEtVSEhiY21obA=="
                        },
                        {
                          "tab_key": "about_life_events",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwNENMdXZtbUxUcmJNdnk0RmcyWVl0UTFocnM3RWIzV3o0eWRBWG1FbWRMdVJIUzFMUVR6SDRLbmZIRDZ3dHJ5eWRLRGlONHZERkVxS3ZDUzdwZ213RFlaM2lqQTZabA=="
                        }
                      ]
                    },
                    "id": "YXBwX3NlY3Rpb246NjE1ODkwNTg0NjA3OTk6MjMyNzE1ODIyNw=="
                  }
                },
                {
                  "node": {
                    "has_new_content": false,
                    "name": "Reels",
                    "section_type": "REELS",
                    "tab_key": "reels_tab",
                    "url": "https://www.facebook.com/profile.php?id=61589058460799&sk=reels_tab",
                    "all_collections": {
                      "nodes": [
                        {
                          "tab_key": "owner_reels",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwOGJxODh6R3ZnMkt1QVBtdXZGUkZzTktKVFc4UlFlRWQ4TEJISG1aWThaNFA1ZHp1eUxweWdmMTJmNmg4bXpMYkFSanV1UHpDYVhjclJkQnFwMkZLZldlU240WXRjQWFRWmJjS2w="
                        }
                      ]
                    },
                    "id": "YXBwX3NlY3Rpb246NjE1ODkwNTg0NjA3OTk6MTY4Njg0ODQxNzY4Mzc1"
                  }
                },
                {
                  "node": {
                    "has_new_content": false,
                    "name": "Photos",
                    "section_type": "PHOTOS",
                    "tab_key": "photos",
                    "url": "https://www.facebook.com/profile.php?id=61589058460799&sk=photos",
                    "all_collections": {
                      "nodes": [
                        {
                          "tab_key": "photos_by",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwMkN2QUhoemdHalZqdUFtTFVxSGJtNW5xa0FrMkJUb0JpQ21XQm5GMThXUGRBUGRWQTM4bTFhR2d6UUN6WHkzS0Z6OEVONDlhMTNRQkFlYVZmZ3l6aTdYQjdVYWw="
                        },
                        {
                          "tab_key": "photos_of",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwQ1ozcExOSEtiVUxBaVN2dnlvN0xMTjVIQnRIVGNvZWVVZHFEbXNKaHg3UzFjSzY3akhSbkpUQzR4dGk5WVdETFBjV3BwNm9CVXRLUkZWMk5MSExHWHhLMkgybA=="
                        },
                        {
                          "tab_key": "photos_albums",
                          "id": "YXBwX2NvbGxlY3Rpb246cGZiaWQwOG43UXhxRG9Qa1hHWmdldGNHUE5USGd5Q3oyaExDTWExUnl5RzQ4YXpEZFVRQXdmZVdjQmI2ZGFwMnVaZnF3ZEtSa045WWJtZjRvWk05NXRnZm9jTDJuWkxwbA=="
                        }
                      ]
                    },
                    "id": "YXBwX3NlY3Rpb246NjE1ODkwNTg0NjA3OTk6MjMwNTI3MjczMg=="
                  }
                }
              ]
            },
            "is_viewer_friend": false,
            "is_currently_live": false,
            "viewer": {
              "show_ap_plus_profile_page_broadcast_channel_creation_nux": false
            },
            "id": "61589058460799"
          },
          "__module_operation_ProfileCometEntityConvergenceHeader_profileHeaderRenderer_profileTabs": {
            "__dr": "ProfileCometTabs_cometProfileTabs$normalization.graphql"
          },
          "__module_component_ProfileCometEntityConvergenceHeader_profileHeaderRenderer_profileTabs": {
            "__dr": "ProfileCometTabs.react"
          }
        },
        "show_promode_badge": false,
        "is_eligible_for_comet_floating_action_bar": false,
        "viewer": {
          "globe_focus": "WEST"
        },
        "__module_operation_ProfileCometAboutAppSectionContent_appSection": {
          "__dr": "ProfileCometAboutAppSectionContactAndBasicInfoRenderer_styleRenderer$normalization.graphql"
        },
        "__module_component_ProfileCometAboutAppSectionContent_appSection": {
          "__dr": "ProfileCometAboutAppSectionContactAndBasicInfoRenderer.react"
        },
        "enable_reels_tab_deeplink": true,
        "pipAvatar": {
          "uri": "https://scontent-dfw6-1.xx.fbcdn.net/v/t39.30808-1/690611939_122099117235301948_2003695542198201228_n.jpg?stp=c14.0.772.772a_cp0_dst-jpg_s56x56_tt6&_nc_cat=106&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=lKuV0Xy-1TcQ7kNvwG7iCoo&_nc_oc=AdodnzEbkIeVj_XfyW-aMwcT3bMicvLhHshijkamJfx8ODyM2DxNKN60fh5lt2SVmqI&_nc_zt=24&_nc_ht=scontent-dfw6-1.xx&_nc_gid=v0yBXq93Nrb_Ae9pEKOArQ&_nc_ss=7b289&oh=00_Af6AKzebVCcKw8bUnPOivF5sjs-kPW-xeYzmcSa8-NAMoQ&oe=6A006E00"
        }
      }
    }
}
````

### Coverage limits for Facebook Followers and Following Scraper

Facebook Followers and Following Scraper depends on what Facebook exposes in logged-out public responses. Public followers and following tabs can stop before the displayed total count, and richer profile fields such as hometown, relationship data, follower totals, or category details may appear only inside `connection_profile_details` when the optional detail scrape succeeds.

### Best use cases for Facebook Followers and Following Scraper

- Facebook Followers and Following Scraper is a strong fit for competitor research, community mapping, influencer discovery, audience sampling, and list-to-profile enrichment workflows.
- Facebook Followers and Following Scraper works well when you want a clean base export first and only add deeper public profile details for selected runs.
- Facebook Followers and Following Scraper is useful for ETL pipelines because the row shape is stable, top-level fields are predictable, and raw payload blocks are already sanitized.

### FAQ

| Question | Answer |
|---|---|
| When should I enable `connection_profile_details` in Facebook Followers and Following Scraper? | Enable it when you need more than the base followers or following row and want richer public profile or page data per connection. |
| What fields does Facebook Followers and Following Scraper expose even without enrichment? | The base export already includes connection identity fields, verification, URLs, images, source context, collection IDs, ordering metadata, and sanitized raw payload blocks. |
| Can Facebook Followers and Following Scraper export rows when enrichment fails? | Yes. The base row can still be exported without `connection_profile_details` if the second public scrape does not return a usable payload. |

# Actor input Schema

## `username` (type: `array`):

Enter one or more Facebook usernames such as Cristiano or natgeo.

## `facebook_urls` (type: `array`):

One or more public profile or page links, direct /followers links, and direct /following links.

## `scrape_mode` (type: `string`):

Choose whether Facebook Followers and Following Scraper should scrape followers only, following only, or both. Direct tab links that do not match the selected mode are skipped, and base usernames or profile links are expanded only into the tab URLs allowed by the selected mode.

## `max_followers` (type: `integer`):

How many public rows to export from each resolved followers tab before that tab stops paginating. This limit applies independently to followers tabs only.

## `max_following` (type: `integer`):

How many public rows to export from each resolved following tab before that tab stops paginating. This limit applies independently to following tabs only.

## `enable_connection_profile_details` (type: `boolean`):

When enabled, the actor revisits each exported connection URL and adds a nested `connection_profile_details` block. This takes more time because every exported row triggers an extra public detail request. If you want faster results, leave this option off. An extra PAY\_PER\_EVENT charge is recorded only for rows where that detail block is successfully attached.

## `proxyCountry` (type: `string`):

Choose the residential proxy exit country for Facebook requests. US is usually the best default for broad public connection coverage. If one country returns sparse public data, switch to US or another nearby market.

## Actor input object example

```json
{
  "username": [
    "Cristiano"
  ],
  "facebook_urls": [
    {
      "url": "https://www.facebook.com/leomessi"
    },
    {
      "url": "https://www.facebook.com/natgeo/followers"
    },
    {
      "url": "https://www.facebook.com/natgeo/following"
    }
  ],
  "scrape_mode": "both",
  "max_followers": 5,
  "max_following": 5,
  "enable_connection_profile_details": false,
  "proxyCountry": "US"
}
```

# 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 = {
    "username": [
        "Cristiano"
    ],
    "facebook_urls": [
        {
            "url": "https://www.facebook.com/leomessi"
        },
        {
            "url": "https://www.facebook.com/natgeo/followers"
        },
        {
            "url": "https://www.facebook.com/natgeo/following"
        }
    ],
    "scrape_mode": "both",
    "max_followers": 5,
    "max_following": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("premiumscraper/facebook-followers-and-following-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 = {
    "username": ["Cristiano"],
    "facebook_urls": [
        { "url": "https://www.facebook.com/leomessi" },
        { "url": "https://www.facebook.com/natgeo/followers" },
        { "url": "https://www.facebook.com/natgeo/following" },
    ],
    "scrape_mode": "both",
    "max_followers": 5,
    "max_following": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("premiumscraper/facebook-followers-and-following-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 '{
  "username": [
    "Cristiano"
  ],
  "facebook_urls": [
    {
      "url": "https://www.facebook.com/leomessi"
    },
    {
      "url": "https://www.facebook.com/natgeo/followers"
    },
    {
      "url": "https://www.facebook.com/natgeo/following"
    }
  ],
  "scrape_mode": "both",
  "max_followers": 5,
  "max_following": 5
}' |
apify call premiumscraper/facebook-followers-and-following-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=premiumscraper/facebook-followers-and-following-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Followers and Following Scraper",
        "description": "Scrape followers and following lists from usernames, profile/page links, direct URLs. Output includes connection name, username, profile URL, image, verification flags, source context, data enrichment for bio, category, follower totals, and transparency data. ✨Facebook Followers Scraper 🔍",
        "version": "1.0",
        "x-build-id": "VRSzTeeOnSeqRJNJu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/premiumscraper~facebook-followers-and-following-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-premiumscraper-facebook-followers-and-following-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/premiumscraper~facebook-followers-and-following-scraper/runs": {
            "post": {
                "operationId": "runs-sync-premiumscraper-facebook-followers-and-following-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/premiumscraper~facebook-followers-and-following-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-premiumscraper-facebook-followers-and-following-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",
                "properties": {
                    "username": {
                        "title": "👤 Facebook Username(s)",
                        "type": "array",
                        "description": "Enter one or more Facebook usernames such as Cristiano or natgeo.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "facebook_urls": {
                        "title": "🔗 Facebook Profile / Page / Followers-Following URLs",
                        "type": "array",
                        "description": "One or more public profile or page links, direct /followers links, and direct /following links.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "scrape_mode": {
                        "title": "🎛️ Scrape Mode",
                        "enum": [
                            "followers",
                            "following",
                            "both"
                        ],
                        "type": "string",
                        "description": "Choose whether Facebook Followers and Following Scraper should scrape followers only, following only, or both. Direct tab links that do not match the selected mode are skipped, and base usernames or profile links are expanded only into the tab URLs allowed by the selected mode.",
                        "default": "both"
                    },
                    "max_followers": {
                        "title": "📦 Maximum Followers Rows",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many public rows to export from each resolved followers tab before that tab stops paginating. This limit applies independently to followers tabs only.",
                        "default": 5
                    },
                    "max_following": {
                        "title": "📦 Maximum Following Rows",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many public rows to export from each resolved following tab before that tab stops paginating. This limit applies independently to following tabs only.",
                        "default": 5
                    },
                    "enable_connection_profile_details": {
                        "title": "🔎 Enable Connection Profile Details",
                        "type": "boolean",
                        "description": "When enabled, the actor revisits each exported connection URL and adds a nested `connection_profile_details` block. This takes more time because every exported row triggers an extra public detail request. If you want faster results, leave this option off. An extra PAY_PER_EVENT charge is recorded only for rows where that detail block is successfully attached.",
                        "default": false
                    },
                    "proxyCountry": {
                        "title": "🌍 Proxy Country",
                        "enum": [
                            "US",
                            "GB",
                            "AU",
                            "CA",
                            "DE",
                            "FR",
                            "NL",
                            "IT",
                            "ES",
                            "SE",
                            "NO",
                            "DK",
                            "FI",
                            "BE",
                            "AT",
                            "CH",
                            "IE",
                            "PL",
                            "PT",
                            "CZ",
                            "HU",
                            "RO",
                            "GR",
                            "BG",
                            "HR",
                            "SK",
                            "RS",
                            "JP",
                            "KR",
                            "SG",
                            "HK",
                            "TW",
                            "TH",
                            "MY",
                            "ID",
                            "PH",
                            "VN",
                            "IN",
                            "BR",
                            "MX",
                            "AR",
                            "CL",
                            "CO",
                            "PE",
                            "ZA",
                            "NG",
                            "KE",
                            "EG",
                            "SA",
                            "AE",
                            "TR",
                            "IL",
                            "UA",
                            "RU",
                            "BY"
                        ],
                        "type": "string",
                        "description": "Choose the residential proxy exit country for Facebook requests. US is usually the best default for broad public connection coverage. If one country returns sparse public data, switch to US or another nearby market.",
                        "default": "US"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
