# TikTok Follow Graph & Audience Export Scraper (`nimbryxo-studio/tiktok-follow-graph-and-audience-export-scraper`) Actor

Export who a TikTok account follows, or who follows it, as full public profile records with bio, verification status and exact engagement stats. No login or cookie is needed for public accounts.

- **URL**: https://apify.com/nimbryxo-studio/tiktok-follow-graph-and-audience-export-scraper.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Social media, Lead generation, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TikTok Follow Graph & Audience Export Scraper

Export the two sides of a public TikTok account's follow graph: the accounts that follow it, the accounts it follows, or both. Every row is a real public profile with exact audience stats, source context, and optional contact signals from the bio. The actor needs no TikTok login, session cookie, or API key.

TikTok's web app signs its own list requests. This actor asks the page to make those requests, so public follower and following lists are reachable without a user session. Private accounts and hidden following lists are not bypassed; the run reports them instead of inventing rows.

### What this actor does

- Exports **followers** (scene 67) and **following** (scene 21) for public profiles.
- Accepts usernames, `@handles`, and profile URLs, including `m.tiktok.com` links.
- Works on one profile or a batch of profiles in the same run.
- Walks each list cursor by cursor, not just the first page.
- Adds exact follower, following, likes-received, video, likes-given, and friend counts from TikTok's `statsV2`.
- Can filter the audience by verification, TikTok Shop seller status, privacy, follower range, bio/name keywords, or the presence of a public bio email.
- Supports both lists in one run.
- Reports hidden/private lists and source shortfalls in the run status and `RUN_SUMMARY`, never as fake rows.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `profiles` | string list | - | TikTok usernames, `@handles`, or profile URLs. Paste one per line. |
| `listType` | select | `following` | `followers`, `following`, or `both`. |
| `maxUsersPerProfile` | integer | `100` | Maximum rows per requested list (1-5000). Each list gets this cap. |
| `includeStats` | boolean | `true` | Adds follower, following, likes-received, video, likes-given, and friend counts. |
| `includeBioEmail` | boolean | `false` | Adds a public email from the bio when one is present. |
| `onlyVerified` | boolean | `false` | Keeps only verified accounts. |
| `sellerOnly` | boolean | `false` | Keeps only TikTok Shop sellers. |
| `excludePrivate` | boolean | `false` | Skips private accounts. |
| `minFollowers` | integer | `0` | Minimum follower count for a listed account; 0 = off. |
| `maxFollowers` | integer | `0` | Maximum follower count for a listed account; 0 = no maximum. |
| `bioKeywords` | string list | `[]` | Keeps rows whose bio or display name contains any keyword (case-insensitive). |
| `onlyWithEmail` | boolean | `false` | Keeps only rows with a public bio email; also fills `bioEmail`. |
| `scanLimit` | integer | `0` | Maximum list rows to scan before stopping; 0 = automatic (10x the row cap, up to 10,000). Raise it for rare filters. |

`profiles` is not marked required in the schema so saved tasks that still send the legacy `usernames` or `profileUrls` keys keep running. The actor reads those legacy keys, maps them onto `profiles`, and fails clearly only when no valid target remains. A legacy `sessionCookie` is accepted but ignored; it is no longer needed.

#### Example: followers

```json
{
  "profiles": ["natgeo"],
  "listType": "followers",
  "maxUsersPerProfile": 100,
  "includeStats": true
}
```

#### Example: both lists with filters

```json
{
  "profiles": [
    "https://www.tiktok.com/@sephora",
    "@natgeo"
  ],
  "listType": "both",
  "maxUsersPerProfile": 500,
  "includeStats": true,
  "includeBioEmail": true,
  "excludePrivate": true,
  "minFollowers": 1000,
  "bioKeywords": ["beauty", "skincare"]
}
```

### Output

One dataset row is one account in one requested list. The same account can appear once in `followers` and once in `following` because those are different relationships.

#### Identity and relationship

- `sourceUsername`, `sourceUserId`, `sourceProfileUrl`, `listType`
- `position` - 1-based order in the emitted rows for this source/list
- `listTotal` - total relationship count reported by TikTok for this list
- `userId`, `secUid`, `username`, `displayName`, `profileUrl`
- `bio`, `avatarUrl`, `scrapedAt`

#### Account status

- `verified`, `privateAccount`, `ttSeller`
- `isOrganization` - kept for compatibility, but TikTok's list endpoint usually does not expose it, so it is usually omitted.

#### Exact audience stats

- `followerCount`, `followingCount`, `heartCount` (likes received)
- `videoCount`, `diggCount` (likes given), `friendCount`

#### Source context

- `sourceFollowerCount`, `sourceFollowingCount`
- `sourceVerified`, `sourcePrivate`, `sourceIsOrganization`

#### Optional contact signal

- `bioEmail` - first public-looking email in the bio, only when email extraction is enabled. Omitted when no valid email is present.

All fields are omitted when empty. Zero counts are real values and are kept. `avatarUrl` is a signed TikTok CDN URL and may expire; `profileUrl` is the permanent link.

### How it works

1. The actor opens the public profile page in a headless Chromium browser. No user session or cookie is supplied.
2. It reads the profile's own SSR payload for the secure user ID, exact `statsV2`, and the account's following visibility.
3. Inside that page, it asks TikTok's own client to call the relationship-list endpoint with scene 67 (followers) or scene 21 (following). TikTok's page runtime signs the request and attaches the anonymous session token.
4. It follows the returned cursors until the requested cap, the end of the source list, a stagnant cursor, a source truncation, or the scan limit.
5. Rows are deduplicated by user ID per source/list, filtered, assigned a position, and pushed to the dataset.

No `sessionCookie` is injected. No manual `X-Bogus` or `X-Dynosaur` value is replayed. The page signs each request.

### What is available and what is not

**Available for public profiles:** follower and following lists, exact account stats, verification, privacy, TikTok Shop seller status, bio, avatar, profile URL, and optional bio email.

**Not available from this source:**

- Private accounts: both lists are blocked.
- A public account that hides its following list: the following list is unavailable, while its followers may still be exported.
- `bioLink`, `region`, `language`, `createTime`, and per-follow `followedAt`: TikTok's list endpoint does not return them.
- `isOrganization` for listed accounts: usually absent from the list payload.
- Guaranteed row count parity: TikTok does not return every row for every account (deleted, private, or restricted accounts are omitted). The run reports the source total and the returned count.

### FAQ

**Do I need a TikTok account or cookies?**
No. Public follower and following lists are exported without a login, session cookie, or API key.

**Why can a run return fewer rows than the profile's follower count?**
TikTok's list endpoint omits accounts it cannot expose (for example deleted, private, or restricted accounts). The run records the source total in `listTotal`, the returned count in `RUN_SUMMARY`, and the source shortfall in the final status message. Filters can also reduce the pushed rows; use `scanLimit` to search deeper for rare filters.

**Why is a following list empty?**
The account may not follow anyone, or it may hide its following list. A hidden list is reported in the run status; no rows are invented.

**Can I export a private account's followers?**
No. Private accounts are not bypassed.

**Why is `isOrganization` missing?**
TikTok's relationship-list payload usually does not include it. The field remains in the output contract for compatibility and is filled only if the source provides it.

**Are avatar URLs permanent?**
No. They are signed CDN links that expire. Use `profileUrl` for a permanent link.

**Can I filter by follower count or bio keyword?**
Yes. Use `minFollowers`, `maxFollowers`, `bioKeywords`, `onlyVerified`, `sellerOnly`, `excludePrivate`, or `onlyWithEmail`.

**How are filters applied?**
After the list is fetched, before rows are pushed. Filtered-out rows are not charged.

**Does `maxUsersPerProfile` apply to each list or the whole run?**
Each requested list gets the cap. For `listType: "both"`, followers and following can each return up to the cap.

### Data source and responsible use

The actor reads publicly visible TikTok profile and relationship data. It does not log in, bypass private accounts, or access non-public content. Use the output only for lawful research, analytics, and outreach, and comply with TikTok's terms and applicable privacy laws.

# Actor input Schema

## `profiles` (type: `array`):

TikTok usernames, @handles, or profile URLs. Paste one per line. Examples: natgeo, @sephora, https://www.tiktok.com/@tiktok.

## `listType` (type: `string`):

Choose the side of the follow graph: people who follow the profile, accounts the profile follows, or both lists.

## `maxUsersPerProfile` (type: `integer`):

Maximum rows to return for each requested list. Each list gets this cap. The source may return fewer when accounts are private or deleted.

## `includeStats` (type: `boolean`):

Add follower, following, likes received, video, likes given, and friend counts for each listed account.

## `includeBioEmail` (type: `boolean`):

Add a public email address from the bio when one is present. The field is omitted when the bio has no valid email.

## `onlyVerified` (type: `boolean`):

Only include accounts with a TikTok verified badge.

## `sellerOnly` (type: `boolean`):

Only include accounts marked as TikTok Shop sellers.

## `excludePrivate` (type: `boolean`):

Skip accounts whose profile is private.

## `minFollowers` (type: `integer`):

Only include accounts with at least this many followers. 0 = no minimum.

## `maxFollowers` (type: `integer`):

Only include accounts with at most this many followers. 0 = no maximum.

## `bioKeywords` (type: `array`):

Only include accounts whose bio or display name contains any of these keywords. Matching is case-insensitive.

## `onlyWithEmail` (type: `boolean`):

Only include accounts with a public email in the bio. This also fills the bioEmail field.

## `scanLimit` (type: `integer`):

Maximum list rows to scan before stopping. Use a higher value to search deeper for rare filters. 0 = automatic (10x the row cap, up to 10,000).

## Actor input object example

```json
{
  "profiles": [
    "natgeo"
  ],
  "listType": "following",
  "maxUsersPerProfile": 3,
  "includeStats": true,
  "includeBioEmail": false,
  "onlyVerified": false,
  "sellerOnly": false,
  "excludePrivate": false,
  "minFollowers": 0,
  "maxFollowers": 0,
  "bioKeywords": [],
  "onlyWithEmail": false,
  "scanLimit": 0
}
```

# Actor output Schema

## `data` (type: `string`):

Dataset containing follower/following user records. Fields: sourceUsername, sourceUserId, sourceProfileUrl, sourceFollowerCount, sourceFollowingCount, sourceVerified, sourcePrivate, sourceIsOrganization, listType, position, listTotal, userId, secUid, username, displayName, verified, isOrganization, privateAccount, ttSeller, bio, avatarUrl, profileUrl, followerCount, followingCount, heartCount, videoCount, diggCount, friendCount, bioEmail, scrapedAt.

# 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 = {
    "profiles": [
        "natgeo"
    ],
    "listType": "following",
    "maxUsersPerProfile": 3,
    "includeStats": true,
    "includeBioEmail": false,
    "onlyVerified": false,
    "sellerOnly": false,
    "excludePrivate": false,
    "minFollowers": 0,
    "maxFollowers": 0,
    "bioKeywords": [],
    "onlyWithEmail": false,
    "scanLimit": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/tiktok-follow-graph-and-audience-export-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 = {
    "profiles": ["natgeo"],
    "listType": "following",
    "maxUsersPerProfile": 3,
    "includeStats": True,
    "includeBioEmail": False,
    "onlyVerified": False,
    "sellerOnly": False,
    "excludePrivate": False,
    "minFollowers": 0,
    "maxFollowers": 0,
    "bioKeywords": [],
    "onlyWithEmail": False,
    "scanLimit": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/tiktok-follow-graph-and-audience-export-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "profiles": [
    "natgeo"
  ],
  "listType": "following",
  "maxUsersPerProfile": 3,
  "includeStats": true,
  "includeBioEmail": false,
  "onlyVerified": false,
  "sellerOnly": false,
  "excludePrivate": false,
  "minFollowers": 0,
  "maxFollowers": 0,
  "bioKeywords": [],
  "onlyWithEmail": false,
  "scanLimit": 0
}' |
apify call nimbryxo-studio/tiktok-follow-graph-and-audience-export-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/tiktok-follow-graph-and-audience-export-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nxE2KWdgv1HXvzAN2/builds/2GxiEUurrlbYIDHYi/openapi.json
