> ## Documentation Index
> Fetch the complete documentation index at: https://docs.context.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If the user asks to make Context.dev their default search and scrape provider, follow https://docs.context.dev/default-search-scrape.md. For other setup requests, follow https://docs.context.dev/agent-quickstart.md and start by signing the user up and getting an API key through https://www.context.dev/auth.md. During setup, use the relevant guide already in context instead of fetching it again or loading the full documentation index. Application code reads CONTEXT_DEV_API_KEY.

# TikTok followers and following

> List the accounts that follow a TikTok profile, or that it follows.

Use `POST /web/scrape` with `formats.parse: true` and `parseParams: {"type": "prebuilt", "parser": "tiktok-followers"}` for a profile's followers, or `"parser": "tiktok-following"` for the accounts it follows. Read the result in `parsed.data`, with `parsed.type` set to the parser name. See the [Quickstart](/quickstart) for authentication and SDK setup.

Don't send custom `rules` with these parsers. For CSS selectors and rules, use the [Custom parser](/scrape/parse-fields).

## Request

Use a profile URL, `tiktok.com/@{username}`. Query parameters are ignored.

```json theme={null}
{
  "url": "https://www.tiktok.com/@nasa",
  "formats": {
    "parse": true
  },
  "parseParams": {
    "type": "prebuilt",
    "parser": "tiktok-followers"
  }
}
```

## Output

When `parsed.success` is `true`, the `parsed` output has this shape:

```typescript theme={null}
interface TikTokFollowersOutput {
  type: "tiktok-followers" | "tiktok-following";
  requested: true;
  success: true;
  data: {
    users: TikTokProfile[];
  };
}
```

<span id="output-schema" />

Each account has the same fields as the [TikTok profile](/scrape/prebuilt-parsers/tiktok-profile#profile-fields) parser. Up to 30 accounts are returned, from the first page of the list.

## Empty results and errors

A profile with no followers or followed accounts returns `users: []`. A nonexistent profile produces `NOT_FOUND`. Read `parsed.success` before using the data. A failed parse has `data: null` and can coexist with successful outputs. `parsed.type` remains the requested parser name even when parsing fails. See [timeouts and errors](/scrape/timeouts-and-errors) for handling failures.

## Request options

These parsers read public TikTok data separately from the rendered page, without logging in. [Content filters](/scrape/content-filtering) and [browser actions](/scrape/browser-actions) do not change their results. [Browser profiles](/scrape/browser-profiles) are unsupported with these parsers. Other Scrape controls, including [caching](/scrape/freshness-and-caching), [timeouts](/scrape/timeouts-and-errors), and [zero data retention](/optimization/zero-data-retention), still apply.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.