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

# Discover TikTok profiles by search URL

> Discover TikTok profiles from a search results URL with the Bright Data Scraper API. Send POST /datasets/v3/scrape with dataset_id gd_l1villgoiiidt09ci.

## Query Parameters

<ParamField query="dataset_id" type="string" default="gd_l1villgoiiidt09ci" required>
  The dataset ID used for this request.

  <Warning>
    Must be set to `gd_l1villgoiiidt09ci` to collect **Discover by Search URL** data.
  </Warning>
</ParamField>

<ParamField query="type" type="string" default="discover_new">
  Must be set to `discover_new`.
</ParamField>

<ParamField query="discover_by" type="string" default="search_url">
  Must be set to `search_url`.
</ParamField>

<ParamField query="notify" type="boolean" default={false}>
  Whether to send notifications when the request is completed.
</ParamField>

<ParamField query="include_errors" type="boolean" default={true}>
  Whether to include errors in the response.
</ParamField>

## Request Body

<ParamField body="input" type="object[]" required>
  An array of input objects.

  <Expandable title="properties">
    <ParamField body="search_url" type="string" required>
      The TikTok search URL to discover profiles from.
    </ParamField>

    <ParamField body="country" type="string" required>
      The country from which to perform the search.
    </ParamField>
  </Expandable>

  #### Example

  ```json wrap theme={null}
  {
    "input": [
      {
        "search_url": "https://www.tiktok.com/search/user?q=cooking",
        "country": "us"
      }
    ]
  }
  ```
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"input":[{"search_url":"https://www.tiktok.com/search/user?q=cooking","country":"us"}],"limit_per_input":null}' \
    "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l1villgoiiidt09ci&notify=false&include_errors=true&type=discover_new&discover_by=search_url"
  ```

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

  response = requests.post(
      "https://api.brightdata.com/datasets/v3/scrape",
      params={
          "dataset_id": "gd_l1villgoiiidt09ci",
          "notify": "false",
          "include_errors": "true",
          "type": "discover_new",
          "discover_by": "search_url",
      },
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "input": [
              {
                  "search_url": "https://www.tiktok.com/search/user?q=cooking",
                  "country": "us",
              },
          ],
          "limit_per_input": None,
      },
  )

  print(response.text)
  ```

  ```javascript Node.js (fetch) theme={null}
  const params = new URLSearchParams({
    dataset_id: "gd_l1villgoiiidt09ci",
    notify: "false",
    include_errors: "true",
    type: "discover_new",
    discover_by: "search_url",
  });

  const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      input: [
        {
          search_url: "https://www.tiktok.com/search/user?q=cooking",
          country: "us",
        },
      ],
      limit_per_input: null,
    }),
  });

  console.log(await response.text());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "account_id": "987654321",
      "nickname": "Cooking Daily",
      "biography": "Easy recipes for busy people",
      "bio_link": "https://example.com/recipes",
      "is_verified": false,
      "followers": 2500000,
      "following": 150,
      "likes": 45000000,
      "videos_count": 320,
      "create_time": "2020-03-15T00:00:00.000Z",
      "url": "https://www.tiktok.com/@cookingdaily",
      "profile_pic_url": "https://p16-sign-sg.tiktokcdn.com/example-avatar~100x100.jpeg",
      "profile_pic_url_hd": "https://p16-sign-sg.tiktokcdn.com/example-avatar~720x720.jpeg",
      "awg_engagement_rate": 0.0521,
      "is_private": false,
      "region": "US"
    }
  ]
  ```
</ResponseExample>
