TikTok Trending Hashtag
Structured TikTok data: every input is optional. Cursor-paginated, 2 credits per successful call.
Overview
Section titled “Overview”Call GET /api/v2/tiktok-trending-hashtag/. The results are in data.data; send data.next_cursor back as cursor to get the next page. 9 optional parameters refine the call (see Parameters).
Request
Section titled “Request”curl -G "https://api.scrapier.io/api/v2/tiktok-trending-hashtag/" \ -H "X-API-Key: YOUR_API_KEY" \ --max-time 210const params = new URLSearchParams({});
const res = await fetch(`https://api.scrapier.io/api/v2/tiktok-trending-hashtag/?${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.data);import requests
resp = requests.get( "https://api.scrapier.io/api/v2/tiktok-trending-hashtag/", headers={"X-API-Key": "YOUR_API_KEY"}, params={}, timeout=210,)body = resp.json()if not resp.ok: raise RuntimeError(body.get("error") or body.get("detail"))
print(body["data"]["data"])curl -X POST "https://api.scrapier.io/api/v2/tiktok-trending-hashtag/" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{}' \ --max-time 210Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
X-API-Key header | string | yes | — | Your API key from the dashboard. |
country | string | no | US | TikTok ranking country. One country per request; defaults to US. USFRDEITESGBARAUBRCACOEGIDILJPKRMYMXPHSASGZATWTHTRAEVN |
period | integer | no | 30 | Ranking window in days. Legacy 120 maps to 90. 73090120 |
result_type | string | no | top100 | top100 is ranking-only. Analytics modes add trend and optional challenge metrics; anonymous source does not guarantee 100 results. top100top100_with_analyticshashtag_analytics |
industry_id | string | no | — | Optional top-level TikTok industry ID. Restricts the feed to that industry. |
include_industries | boolean | no | false | Expand overall ranking with industry rankings. Rank remains relative to each industry; more requests. |
related_videos_source | string | no | none | Optional TikWM third-party related videos in analytics modes. Adds requests; no cookies. nonetikwm |
related_items_limit | integer | no | 3 | Related videos per hashtag when TikWM is enabled. Deadline may return fewer with a warning. |
related_items_cursor | integer | no | 0 | Optional TikWM starting cursor for related videos. |
cursor | string | no | — | Opaque continuation token. Cursor-only calls preserve country, window, industry, and analytics options. |
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": { "success": true, "data": { "country": "US", "period": 30, "result_type": "top100", "page": 1, "page_size": 3, "hashtags": [ { "hashtag_id": "7696402918877954061", "hashtag_name": "musteatinmycity", "industry_info": { "id": 27000000000, "value": "Food & Beverage", "label": "label_27000000000" }, "video_views": 2345135987, "publish_cnt": 2563515, "rank": 1, "rank_diff_type": null, "record_id": "US:30:7696402918877954061", "country": "US", "period": 30, "result_type": "top100", "ranking_scope": "overall", "ranking_industry_id": null, "related_videos_source": "none", "warning": "Anonymous rankings are source-limited. Industry ranks belong to their industry.", "scraped_at": "2026-11-16T09:00:00.000Z" } ], "next_cursor": null, "warning": "Anonymous rankings are source-limited. Industry ranks belong to their industry." } }}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.data.
Response fields
Section titled “Response fields”| Field | Type | Example | Description |
|---|---|---|---|
success | boolean | true | — |
data | object | {…} | The results. |
data.country | string | US | — |
data.period | integer | 30 | — |
data.result_type | string | top100 | — |
data.page | integer | 1 | — |
data.page_size | integer | 3 | — |
data.hashtags | array | [1 item] | — |
data.next_cursor | null | null | — |
data.warning | string | Anonymous rankings are source-limited. Indust… | — |
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-trending-hashtag/";let params = {};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.data); if (!data.next_cursor) break; // null = last page params = { cursor: data.next_cursor };}import requests
URL = "https://api.scrapier.io/api/v2/tiktok-trending-hashtag/"HEADERS = {"X-API-Key": "YOUR_API_KEY"}params = {}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("data")) 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 |
- The response data carries its own
successfield from the scraper. The outersuccessis what counts: an HTTP 200 with outersuccess: trueis billed, even if the inner field says otherwise.
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.