{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Followers & Following Scraper",
    "description": "Extract public Facebook followers and following from Pages and profiles: names, usernames, profile URLs, images, verification, source counts and honest list-coverage status. Counts-only mode with change tracking. No login or cookies.",
    "version": "1.0",
    "x-build-id": "L2466L30iRos1epBp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~facebook-followers-following-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-facebook-followers-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/coregent~facebook-followers-following-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-facebook-followers-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/coregent~facebook-followers-following-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-facebook-followers-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Facebook Pages / profiles",
            "type": "array",
            "description": "The Pages or public profiles to read. Accepts a Page or profile URL (https://www.facebook.com/NASA), a username (NASA), a numeric ID (100044561550831), a profile.php?id= URL, or a direct /followers or /following URL — a direct list URL reads only that list for that source. Up to 500 per run; inputs that are not a Page or profile (groups, events, other sites) get a free UNSUPPORTED_SOURCE status row instead of failing the run.",
            "default": [
              "https://www.facebook.com/NASA"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "RELATIONSHIPS",
              "COUNTS"
            ],
            "type": "string",
            "description": "RELATIONSHIPS: one row per follower / followed account. COUNTS: one row per source with its follower, following and \"talking about\" counts — no lists, much faster.",
            "default": "RELATIONSHIPS"
          },
          "lists": {
            "title": "Lists",
            "type": "array",
            "description": "Which lists to read in RELATIONSHIPS mode. FOLLOWERS: accounts that follow the source. FOLLOWING: accounts the source follows. The same account in both lists is two separate rows.",
            "items": {
              "type": "string",
              "enum": [
                "FOLLOWERS",
                "FOLLOWING"
              ],
              "enumTitles": [
                "Followers",
                "Following"
              ]
            },
            "default": [
              "FOLLOWERS",
              "FOLLOWING"
            ]
          },
          "maxFollowers": {
            "title": "Maximum followers per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most follower rows to save for EACH source. Facebook exposes only part of a large audience to logged-out visitors (measured: NASA exposes about 1,358 of its 28.7 million followers; the largest lists stop at 10,000), so a list often ends before this number — every list's STATUS row says how far it got. You are charged only for rows delivered.",
            "default": 100
          },
          "maxFollowing": {
            "title": "Maximum following per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most following rows to save for EACH source. Same rules as the followers limit.",
            "default": 100
          },
          "searchByName": {
            "title": "Search within list (by name)",
            "type": "string",
            "description": "Optional. Only return list entries whose name matches this text — e.g. \"john\". The search runs on Facebook's side, so it reaches matches deep in a large list without paging through it. RELATIONSHIPS mode only. Every row records the term in matchedSearchTerm."
          },
          "includeSourceCounts": {
            "title": "Source counts on every row",
            "type": "boolean",
            "description": "Add the source's follower and following counts (with the text Facebook showed and whether it is exact or abbreviated, e.g. \"28M\") to every relationship row.",
            "default": true
          },
          "includeProfileImage": {
            "title": "Profile image",
            "type": "boolean",
            "description": "Include each follower / followed account's profile picture URL (targetImageUrl). Facebook image links expire after a few days.",
            "default": true
          },
          "includeSubtitle": {
            "title": "Subtitle",
            "type": "boolean",
            "description": "Include the short line Facebook shows under each name in the list (targetSubtitle), e.g. \"Works at Samsung\" or a town.",
            "default": true
          },
          "parseSubtitle": {
            "title": "Parse subtitle into location / workplace / school",
            "type": "boolean",
            "description": "Fill targetLocation, targetWorkplace and targetSchool when the subtitle says what it is (\"Lives in …\", \"Works at …\", \"Studied at …\"). A bare place or name is left in the subtitle rather than guessed.",
            "default": true
          },
          "includeVerification": {
            "title": "Verification badge",
            "type": "boolean",
            "description": "Include whether each follower / followed account carries Facebook's verified badge (targetVerified).",
            "default": true
          },
          "deduplicate": {
            "title": "Deduplicate sources",
            "type": "boolean",
            "description": "When two inputs are the same account (e.g. NASA and its profile.php?id= URL), read and charge its lists once. Within one list a repeated row is always dropped.",
            "default": true
          },
          "monitorCounts": {
            "title": "Track count changes (COUNTS mode)",
            "type": "boolean",
            "description": "Remember each source's counts between runs and return the change since the last run (followersDelta, followingDelta). The first run creates the baseline (status BASELINE_CREATED, deltas empty). A change is only computed when both counts are exact — never from abbreviated values like \"28M\". Schedule it daily or weekly.",
            "default": false
          },
          "trackerKey": {
            "title": "Tracker name",
            "type": "string",
            "description": "Optional. A name for the count history, so separate watchlists keep separate baselines (e.g. \"competitor-pages\"). Lower-case letters, digits and dashes."
          },
          "maxConcurrency": {
            "title": "Sources in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many sources are read at the same time. Pages of one list are always read in order.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Residential proxy is the default and is required for full lists: Facebook refuses list pagination from datacenter addresses (measured), so with Apify Datacenter or no proxy each list stops at the first 8 rows (coverage PREVIEW_ONLY). Each followers or following list read through Apify Residential that delivers rows adds one residential-proxy-session event, shown in Pricing. Counts mode needs no pagination and always uses Apify Datacenter, with no session event. Custom proxy URLs are your own traffic and add no session event.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}