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

# TikTok scraper quickstart

> Set up the Bright Data TikTok Scraper API and collect your first profile, post or shop as structured JSON in under 5 minutes with cURL, Python or Node.js.

This tutorial shows you how to scrape a TikTok profile and get structured JSON data using the Bright Data TikTok Scraper API.

## Prerequisites

* A [Bright Data account](https://brightdata.com/products/web-scraper/tiktok?hs_signup=1\&utm_source=docs)
* cURL, Python 3.9+, or Node.js 18+ installed

**1. Get your API key**

Go to the [user settings page](https://brightdata.com/cp/setting/users) in your Bright Data account and create an API key, or use one you already have.

If you don't have an account yet, [sign up at brightdata.com](https://brightdata.com/products/web-scraper/tiktok?hs_signup=1\&utm_source=docs). New accounts get 5,000 free credits every month, no credit card required. See the [free tier](https://docs.brightdata.com/general/account/billing-and-pricing/free-tier.md).

> [!WARNING]
>
> Your API key is shown only once when created. Copy and store it securely.

**2. Send a request**

We'll use the **Profiles endpoint**. The quickest route is the Bright Data Python SDK (`pip install brightdata-sdk`), which waits for the result for you. The other tabs call the API directly with a synchronous request. Replace `YOUR_API_KEY` with your API key:

```python Python SDK theme={null}
# pip install brightdata-sdk
from brightdata import SyncBrightDataClient

# The Scraper API uses no zones, so skip the SDK's zone setup
with SyncBrightDataClient(token="YOUR_API_KEY", auto_create_zones=False) as client:
    result = client.scrape.tiktok.profiles(url="https://www.tiktok.com/@tiktok")
    print(result.data)
```

```bash cURL theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l1villgoiiidt09ci&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.tiktok.com/@tiktok"}]'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.brightdata.com/datasets/v3/scrape",
    params={"dataset_id": "gd_l1villgoiiidt09ci", "format": "json"},
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json=[{"url": "https://www.tiktok.com/@tiktok"}],
)

data = response.json()
if response.status_code == 202:
    print(f"Job running. Snapshot ID: {data['snapshot_id']}")
else:
    print(data)
```

```javascript Node.js theme={null}
const response = await fetch(
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l1villgoiiidt09ci&format=json",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify([
      { url: "https://www.tiktok.com/@tiktok" }
    ]),
  }
);

const data = await response.json();
if (response.status === 202) {
  console.log(`Job running. Snapshot ID: ${data.snapshot_id}`);
} else {
  console.log(data);
}
```

The SDK prints the returned records from `result.data`. It waits up to 240 seconds for the result, so you don't handle a `202` yourself. With cURL, Python or Node.js you should see a `200` status code and a JSON array. A `202` means the scrape needs longer than 1 minute; see the note below. Processing time varies with target-site conditions and scraper workload.

> [!NOTE]
>
> A synchronous request waits up to 1 minute. If the Bright Data TikTok Scraper API needs longer, the response is HTTP `202` with a `snapshot_id` instead of profile data, and collection continues asynchronously. Fetch the result with the [async workflow](https://docs.brightdata.com/products/scrapers/scrapers-library/async-requests.md) or have it pushed to you with [webhook delivery](https://docs.brightdata.com/products/scrapers/scrapers-library/data-delivery.md).

**3. Review the response**

The Bright Data TikTok Scraper API returns a JSON array with structured profile data:

```json theme={null}
[
  {
    "nickname": "TikTok",
    "account_id": "tiktok",
    "biography": "One TikTok can make a big impact",
    "followers": 95600000,
    "following": 1,
    "likes": 463200000,
    "videos_count": 1502,
    "is_verified": true,
    "url": "https://www.tiktok.com/@tiktok",
    "awg_engagement_rate": 0.00017893763075313809
  }
]
```

Each profile object includes fields covering follower counts, bio, verification status, and more. See the [full response schema](https://docs.brightdata.com/api-reference/scrapers/social-media-apis/tiktok-profiles-collect-by-url.md).

You've successfully scraped your first TikTok profile using the Bright Data TikTok Scraper API.

## Common questions

### Can I scrape multiple profiles in one request?

Yes. Add more objects to the input array. Bright Data recommends the synchronous `/scrape` endpoint for a single input only, because more inputs are less likely to finish within its 1-minute window. For more than one input, use the [async `/trigger` endpoint](https://docs.brightdata.com/products/scrapers/scrapers-library/async-requests).

```json theme={null}
[
  {"url": "https://www.tiktok.com/@tiktok"},
  {"url": "https://www.tiktok.com/@charlidamelio"},
  {"url": "https://www.tiktok.com/@khaby.lame"}
]
```

### Getting a 401 or 403 error?

Verify your API key is correct and hasn't expired. Create a new API key in [Account settings](https://brightdata.com/cp/setting/users). See the [authentication guide](https://docs.brightdata.com/api-reference/authentication.md) for details.

### Request is timing out?

Synchronous requests have a 1-minute timeout. If the request exceeds this limit, the API returns HTTP `202` with a `snapshot_id` and finishes the job asynchronously. Use the [async workflow](https://docs.brightdata.com/products/scrapers/scrapers-library/async-requests.md) for large batches.

### Empty or partial response data?

Verify the TikTok profile URL is publicly accessible and correctly formatted. The URL should follow the pattern `https://www.tiktok.com/@username`.

## Do I have to call the API directly?

No. The Bright Data SDKs, the CLI and coding-agent tools call the same Scraper API, so you can start from whichever fits your stack.

| Client | Install | First call |
| :- | :- | :- |
| **Python and Node.js SDK** | `pip install brightdata-sdk` or `npm install @brightdata/sdk` | `client.scrape.tiktok.profiles(url="https://www.tiktok.com/@tiktok")`; see the [Python SDK](https://docs.brightdata.com/api-reference/SDK.md) and [JavaScript SDK](https://docs.brightdata.com/api-reference/SDK-JS.md) |
| **CLI** | `npm install -g @brightdata/cli`, then `bdata login` | `bdata pipelines run gd_l1villgoiiidt09ci collect_by_url "https://www.tiktok.com/@tiktok" --pretty`; see the [CLI commands](https://docs.brightdata.com/products/cli/commands.md) |
| **Coding agents** | `npx skills add brightdata/skills` installs the skills; the [Bright Data MCP](https://docs.brightdata.com/products/mcp-server/overview.md) server exposes the scrapers as tools | See the [coding agent quickstart](https://docs.brightdata.com/quickstart-coding-agent.md) |
| **Open-source scraper** | `pip install git+https://github.com/brightdata/tiktok-scraper` or `npm install -g github:brightdata/tiktok-scraper-node` | See [tiktok-scraper](https://github.com/brightdata/tiktok-scraper) (Python) and [tiktok-scraper-node](https://github.com/brightdata/tiktok-scraper-node) (Node.js) on GitHub |

## Next steps

> [card] [Endpoints](https://docs.brightdata.com/products/scrapers/tiktok/send-first-request.md)
>
> One request per endpoint, each with a captured response.

> [card] [Async batch requests](https://docs.brightdata.com/products/scrapers/scrapers-library/async-requests.md)
>
> Scrape hundreds of URLs in a single batch job.

> [card] [Set up webhooks](https://docs.brightdata.com/products/scrapers/scrapers-library/data-delivery.md)
>
> Receive results automatically when scraping completes.
