TikTok Users Audience Demographics
Structured TikTok data: send usernames. Cursor-paginated, 3 credits per successful call.
Overview
Section titled “Overview”Call GET /api/v2/tiktok-users-audience-demographics/ with usernames. The results are in data.demographics; send data.next_cursor back as cursor to get the next page. 5 optional parameters refine the call (see Parameters).
Request
Section titled “Request”curl -G "https://api.scrapier.io/api/v2/tiktok-users-audience-demographics/" \ -H "X-API-Key: YOUR_API_KEY" \ --data-urlencode "usernames=shakira" \ --max-time 210const params = new URLSearchParams({ usernames: "shakira" });
const res = await fetch(`https://api.scrapier.io/api/v2/tiktok-users-audience-demographics/?${params}`, { headers: { "X-API-Key": "YOUR_API_KEY" }, signal: AbortSignal.timeout(210_000),});const body = await res.json();if (!res.ok) throw new Error(body.error ?? body.detail ?? `HTTP ${res.status}`);
console.log(body.data.demographics);import requests
resp = requests.get( "https://api.scrapier.io/api/v2/tiktok-users-audience-demographics/", 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"]["demographics"])curl -X POST "https://api.scrapier.io/api/v2/tiktok-users-audience-demographics/" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"usernames":"shakira"}' \ --max-time 210Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
X-API-Key header | string | yes | — | Your API key from the dashboard. |
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. |
sample_size | integer | no | 40 | Recent followers to sample (default 40). v2 runs synchronously, so it is CAPPED at 40 here and the whole lookup has a 40s deadline: if it runs out, the followers located so far are returned with status "partial" + a warning. Use v1 (async) for up to 500 (richer sample). |
sample_spread_hours | integer | no | 12 | Spread the sample over the last N hours of follows; 0 = most recent followers first. |
videos_per_follower | integer | no | 1 | Latest public videos checked per follower (1-5); >1 = majority vote. Multiplies runtime. |
max_countries | integer | no | — | Cap the audience_locations rows (sorted by count desc). Empty = all. |
Advanced
| Name | Type | Default | Description |
|---|---|---|---|
use_proxy | boolean | true | Route the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise. |
raw_data | boolean | 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
Section titled “Response”{ "success": true, "data": { "usernames": "shakira", "demographics": { "input_username": "shakira", "username": "shakira", "profile_url": "https://www.tiktok.com/@shakira", "status": "ok", "note": null, "warning": null, "error": null, "nickname": "Shakira", "user_id": "168541398546182144", "verified": true, "followers": 56808125, "profile": { "user_id": "168541398546182144", "unique_id": "shakira", "nickname": "Shakira", "verified": true, "private_account": false, "language": "en", "followers": 56808125, "following": 75, "likes": 525536532, "videos": 436, "bio_link": "https://linktr.ee/shakira" }, "sample": { "followers_total": 56808125, "followers_requested": 40, "followers_sampled": 60, "followers_checked": 60, "followers_located": 35, "followers_private": 12, "followers_no_videos": 13, "followers_failed": 0, "followers_unchecked": 0, "coverage": "58.33%", "videos_per_follower": 1, "sample_spread_hours": 12, "follower_pages": 2, "time_windows_used": 2, "order": "spread evenly over the last 12h of follows", "method": "country where each sampled follower's latest public video(s) were created (TikTok locationCreated); private accounts and accounts without public videos cannot be located as a guest" }, "countries_found": 18, "top_country": { "country": "Bangladesh", "country_code": "BD", "count": 6, "percentage": "17.14%", "continent": "Asia" }, "audience_locations": [ { "country": "Bangladesh", "country_code": "BD", "count": 6, "percentage": "17.14%", "continent": "Asia" }, { "country": "Pakistan", "country_code": "PK", "count": 4, "percentage": "11.43%", "continent": "Asia" }, { "country": "Mexico", "country_code": "MX", "count": 3, "percentage": "8.57%", "continent": "North America" } ], "audience_continents": [ { "continent": "Asia", "count": 15, "percentage": "42.86%" }, { "continent": "Africa", "count": 11, "percentage": "31.43%" } ], "elapsed_seconds": 9.4, "requests_made": 92, "scraped_at": "2026-09-19T00:00:00.000Z" }, "next_cursor": null }}Bad input. The exact message varies by endpoint.
{ "success": false, "error": "…"}Balance below the endpoint’s price.
{ "error": "Insufficient credits. Buy more to scrape more.", "balance": 1, "required": 2}Invalid or unknown API key.
{ "detail": "Authentication service unavailable or invalid API key."}Throttled — wait for Retry-After.
{ "detail": "Request was throttled. Expected available in N seconds."}Sample from the live catalog; arrays trimmed to 3 items. Results are in data.demographics.
Response fields
Section titled “Response fields”| Field | Type | Example | Description |
|---|---|---|---|
usernames | string | shakira | — |
demographics | object | {…} | The results. |
next_cursor | null | null | Pass back as cursor for the next page. null on the last page. |
demographics.input_username | string | shakira | — |
demographics.username | string | shakira | — |
demographics.profile_url | string | https://www.tiktok.com/@shakira | — |
demographics.status | string | ok | — |
demographics.note | null | null | — |
demographics.warning | null | null | — |
demographics.error | null | null | — |
demographics.nickname | string | Shakira | — |
demographics.user_id | string | 168541398546182144 | — |
demographics.verified | boolean | true | — |
demographics.followers | integer | 56808125 | — |
demographics.profile | object | {…} | — |
demographics.sample | object | {…} | — |
demographics.countries_found | integer | 18 | — |
demographics.top_country | object | {…} | — |
demographics.audience_locations | array | [3 items] | — |
demographics.audience_continents | array | [2 items] | — |
demographics.elapsed_seconds | number | 9.4 | — |
demographics.requests_made | integer | 92 | — |
demographics.scraped_at | string | 2026-09-19T00:00:00.000Z | — |
Pagination
Section titled “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. More in Pagination.
const url = "https://api.scrapier.io/api/v2/tiktok-users-audience-demographics/";let params = { usernames: "shakira" };const items = [];
for (let page = 0; page < 10; page++) { // each page is one billed call const res = await fetch(`${url}?${new URLSearchParams(params)}`, { headers: { "X-API-Key": "YOUR_API_KEY" }, signal: AbortSignal.timeout(210_000), }); const body = await res.json(); if (!res.ok) throw new Error(body.error ?? body.detail ?? `HTTP ${res.status}`); const data = body.data; items.push(data.demographics); if (!data.next_cursor) break; // null = last page params = { cursor: data.next_cursor };}import requests
URL = "https://api.scrapier.io/api/v2/tiktok-users-audience-demographics/"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("demographics")) if not data.get("next_cursor"): # None = last page break params = {"cursor": data["next_cursor"]}Errors
Section titled “Errors”Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.
| Status | Meaning | Retry? | Charged? |
|---|---|---|---|
400 | Bad or missing input. | No — fix the params | No |
401 / 403 | Missing, invalid or revoked API key. | No — fix the key | No |
402 | Out of credits (body has balance). | No — top up | No |
404 | Unknown endpoint slug. | No — check the slug | No |
429 / 503 | Busy or throttled. | Yes — after Retry-After | No |
5xx | Target site or upstream failure, or timeout. | Yes — with backoff | No |
- Nothing special: send the inputs, read the result.
Related
Section titled “Related”- TikTok Ad Library Leads — Structured TikTok data: every input is optional. Single lookup, 3 credits per successful call.
- TikTok Ad Library — Structured TikTok data: send
urls. Cursor-paginated, 1 credit per successful call. - TikTok Ads Top — Structured TikTok data: every input is optional. Cursor-paginated, 1 credit per successful call.
- TikTok Collection Videos — Structured TikTok data: send
urls. Cursor-paginated, 1 credit per successful call.