> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# TikTok Profile Region

Structured TikTok data: send `usernames`. Cursor-paginated, 1 credit per successful call.

`GET|POST https://api.scrapier.io/api/v2/tiktok-profile-region/` · 1 credit per successful call · Cursor-paginated

## Overview

Call `GET /api/v2/tiktok-profile-region/` with `usernames`. The results are in `data.profile`; send `data.next_cursor` back as `cursor` to get the next page. 3 optional parameters refine the call (see Parameters).

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/tiktok-profile-region/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "usernames=shakira" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/tiktok-profile-region/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"usernames": "shakira"},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["profile"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `usernames` | string | yes | e.g. `shakira` | TikTok handle or profile URL: "shakira", "@shakira" or "https://www.tiktok.com/@shakira". One profile per call (single lookup, next_cursor is always null). |
| `cursor` | string | no | — | Pagination cursor returned in the previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When `next_cursor` is null, you have reached the last page. |
| `videos_to_check` | integer | no | `5` | Newest public videos whose locationCreated vote for the region (0-13, default 5). 0 = author card only, region null. |
| `include_videos` | boolean | no | `true` | Attach recent_videos (the per-video evidence behind the region vote). |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under `raw_responses`, in place of the formatted items. When false (default) you get the formatted output. Pagination (`cursor` / `next_cursor`) works the same in both modes. |

## Response

HTTP 200. Results are in `data.profile`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "usernames": "stoolpresidente",
    "profile": {
      "input_username": "stoolpresidente",
      "username": "stoolpresidente",
      "profile_url": "https://www.tiktok.com/@stoolpresidente",
      "status": "ok",
      "region": "US",
      "country_name": "United States",
      "region_source": "video_location_created",
      "region_confidence": 1,
      "region_votes": {
        "US": 5
      },
      "region_evidence": {
        "videos_checked": 5,
        "videos_with_region": 5,
        "latest_video_region": "US",
        "unanimous": true
      },
      "author": {
        "id": "stoolpresidente",
        "user_id": "6659752019493208069",
        "sec_uid": "MS4wLjABAAAAINC_ElRR-l1RCcnEjOZhNO-9wOzAMf-YHXqRY8vvG9bEhMRa6iu23TaE3JPZYXBD",
        "short_id": null,
        "username": "stoolpresidente",
        "display_name": "Dave Portnoy",
        "avatar_url": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/7310178711609032710~tplv-tiktokx-cropcenter:1080:1080.jpeg",
        "avatar_medium_url": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/7310178711609032710~tplv-tiktokx-cropcenter:720:720.jpeg",
        "avatar_thumb_url": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/7310178711609032710~tplv-tiktokx-cropcenter:100:100.jpeg",
        "bio": "El Presidente/Barstool Sports Founder.",
        "bio_link": "https://www.barstoolsports.com/bios/el-presidente",
        "bio_link_risk": 0,
        "verified": true,
        "private": false,
        "secret": false,
        "is_organization": false,
        "is_commerce_user": false,
        "is_tt_seller": false,
        "is_ad_virtual": false,
        "is_embed_banned": false,
        "followers": 4781641,
        "following": 97,
        "friends_count": 64,
        "posts_count": 2534,
        "likes_count": 230647760,
        "digg_count": 0,
        "url": "https://www.tiktok.com/@stoolpresidente",
        "location": "US",
        "language": "en",
        "created_at": "2019-02-19T16:42:27Z",
        "username_modified_at": null,
        "display_name_modified_at": null,
        "live_room_id": null,
        "settings": {
          "comment": 0,
          "duet": 0,
          "stitch": 0,
          "download": 0,
          "following_visibility": 1,
          "profile_embed_permission": 1,
          "open_favorite": false
        },
        "profile_tabs": {
          "music": false,
          "questions": false,
          "playlists": true
        },
        "share_meta": {
          "title": "Dave Portnoy on TikTok",
          "desc": "@stoolpresidente 4.8m Followers, 97 Following, 230.6m Likes - Watch awesome short videos created by Dave Portnoy"
        }
      },
      "computed": {
        "engagement_rate": 0.3993,
        "language": "en",
        "content_category": "Pizza Reviews",
        "estimated_reach": 188960,
        "avg_plays": 188960,
        "avg_likes": 16755,
        "avg_comments": 238,
        "avg_shares": 2100,
        "posting_frequency_days": 1.09,
        "top_hashtags": []
      },
      "recent_videos": [
        {
          "id": "7687061086398418190",
          "url": "https://www.tiktok.com/@stoolpresidente/video/7687061086398418190",
          "description": "I can declare this $36 slice gimmick pizza ",
          "created_at": "2026-09-19T02:03:20Z",
          "location_created": "US",
          "duration": 59,
          "cover_url": "https://p19-common-sign.tiktokcdn.com/tos-useast5-p-0068-tx/ocABAWttcB1IfBLA9CBvoEzCJV7IiaiwAQBC54~tplv-tiktokx-origin.image",
          "hashtags": [],
          "playlist": {
            "id": "7090570072548461358",
            "name": "Pizza Reviews",
            "video_count": 651
          },
          "music": {
            "id": "7687061166736100109",
            "title": "original sound",
            "author": "Dave Portnoy",
            "duration": 59
          },
          "stats": {
            "plays": 21100,
            "likes": 2035,
            "comments": 39,
            "shares": 8,
            "saves": 17
          },
          "search_indexable": true,
          "aigc_label_type": null
        }
      ],
      "warnings": [],
      "duration_ms": 2270,
      "scraped_at": "2026-09-19T00:00:00.000Z"
    },
    "next_cursor": null
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `usernames` | string | `stoolpresidente` |  |
| `profile` | object | `{…}` | The results. |
| `next_cursor` | null | `null` | Pass back as `cursor` for the next page. `null` on the last page. |
| `profile.input_username` | string | `stoolpresidente` |  |
| `profile.username` | string | `stoolpresidente` |  |
| `profile.profile_url` | string | `https://www.tiktok.com/@stoolpresidente` |  |
| `profile.status` | string | `ok` |  |
| `profile.region` | string | `US` |  |
| `profile.country_name` | string | `United States` |  |
| `profile.region_source` | string | `video_location_created` |  |
| `profile.region_confidence` | integer | `1` |  |
| `profile.region_votes` | object | `{…}` |  |
| `profile.region_evidence` | object | `{…}` |  |
| `profile.author` | object | `{…}` |  |
| `profile.computed` | object | `{…}` |  |
| `profile.recent_videos` | array | `[1 item]` |  |
| `profile.warnings` | array | `[]` |  |
| `profile.duration_ms` | integer | `2270` |  |
| `profile.scraped_at` | string | `2026-09-19T00:00:00.000Z` |  |

## Pagination

Pass `data.next_cursor` back as `cursor` until it is `null`. Required inputs are ignored once a cursor is sent. Each page is one billed call.

```python
import requests

URL = "https://api.scrapier.io/api/v2/tiktok-profile-region/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {"usernames": "shakira"}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.append(data.get("profile"))
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Nothing special: send the inputs, read the result.

## Related

- [TikTok Ad Library Leads](https://docs.scrapier.io/api-reference/tiktok/tiktok-ad-library-leads.md): Structured TikTok data: every input is optional. Single lookup, 3 credits per successful call.
- [TikTok Ad Library](https://docs.scrapier.io/api-reference/tiktok/tiktok-ads.md): Structured TikTok data: send `urls`. Cursor-paginated, 1 credit per successful call.
- [TikTok Ads Top](https://docs.scrapier.io/api-reference/tiktok/tiktok-ads-top.md): Structured TikTok data: every input is optional. Cursor-paginated, 1 credit per successful call.
- [TikTok Collection Videos](https://docs.scrapier.io/api-reference/tiktok/tiktok-collection-videos.md): Structured TikTok data: send `urls`. Cursor-paginated, 1 credit per successful call.
