Skip to content

Structured TikTok data: send usernames. Cursor-paginated, 3 credits per successful call.

GET · POST3 credits / successful callCursor-paginated
GEThttps://api.scrapier.io/api/v2/tiktok-users-audience-demographics/Open in Playground

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

Terminal window
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 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
usernamesstringyese.g. shakiraTikTok handle or profile URL: "shakira", "@shakira" or "https://www.tiktok.com/@shakira". One profile per call (single lookup, next_cursor is always null).
cursorstringno—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_sizeintegerno40Recent 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_hoursintegerno12Spread the sample over the last N hours of follows; 0 = most recent followers first.
videos_per_followerintegerno1Latest public videos checked per follower (1-5); >1 = majority vote. Multiplies runtime.
max_countriesintegerno—Cap the audience_locations rows (sorted by count desc). Empty = all.
Advanced
NameTypeDefaultDescription
use_proxybooleantrueRoute the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise.
raw_databooleanfalseWhen 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.
{
"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
}
}

Sample from the live catalog; arrays trimmed to 3 items. Results are in data.demographics.

FieldTypeExampleDescription
usernamesstringshakira—
demographicsobject{…}The results.
next_cursornullnullPass back as cursor for the next page. null on the last page.
demographics.input_usernamestringshakira—
demographics.usernamestringshakira—
demographics.profile_urlstringhttps://www.tiktok.com/@shakira—
demographics.statusstringok—
demographics.notenullnull—
demographics.warningnullnull—
demographics.errornullnull—
demographics.nicknamestringShakira—
demographics.user_idstring168541398546182144—
demographics.verifiedbooleantrue—
demographics.followersinteger56808125—
demographics.profileobject{…}—
demographics.sampleobject{…}—
demographics.countries_foundinteger18—
demographics.top_countryobject{…}—
demographics.audience_locationsarray[3 items]—
demographics.audience_continentsarray[2 items]—
demographics.elapsed_secondsnumber9.4—
demographics.requests_madeinteger92—
demographics.scraped_atstring2026-09-19T00:00:00.000Z—

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 };
}

Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.

StatusMeaningRetry?Charged?
400Bad or missing input.No — fix the paramsNo
401 / 403Missing, invalid or revoked API key.No — fix the keyNo
402Out of credits (body has balance).No — top upNo
404Unknown endpoint slug.No — check the slugNo
429 / 503Busy or throttled.Yes — after Retry-AfterNo
5xxTarget site or upstream failure, or timeout.Yes — with backoffNo
  • Nothing special: send the inputs, read the result.
  • 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.