TikTok 트렌드 API
인기 TikTok 영상 한 페이지를 돌려줍니다. 캡션, 조회수와 좋아요 수, 작성자, 썸네일이 들어가고, 모든 항목에 영상이 등록된 국가인 post.ext.region이 붙습니다.
GET /v1/tiktok/trendingTikTok 트렌드 API는 언제 쓰나요
한 국가의 영상이 대부분인 목록이 필요하면 feed=local을 사용하세요(측정치 57%). 기본 피드는 region과 관계없이 대부분 전 세계 영상이므로 post.ext.region으로 거르세요.
API 레퍼런스 영문 원문 보기
Returns a page of popular TikTok videos for a country, with view, like, comment, share and save counts, caption, author and thumbnail. Two feeds, chosen with feed. The default (feed=global) is TikTok's web trending feed fetched through a connection in region: region sets where the request comes from, not where the videos come from, and for most countries the feed is one worldwide pool. Measured 13/09/2026 over 12 calls in six countries, 22% of its videos were registered in the requested country (US 65%, BR 43%, GB 9%, FR 8%, JP 6%, DE 0%). It returns about 13 videos in 3 to 12 seconds. feed=local is the For You feed TikTok's app serves to a phone set to region, so most, not all, of its videos are from that country: 57% of videos on 10 served pages the same day (DE 52%, US 66%, GB 41%, JP 81%), and 51% were captioned in the country's main language. It returns a median of 24 videos (13 to 33 on 9 pages in 10), and 9 calls in 10 answer within 22 seconds (364 served pages, 18-19/10/2026). When a local page holds fewer than 20 videos, the call reads the feed again, up to two more times while the request has time left, and adds each new video once after the ones already found, so such a call can take up to about 38 seconds at the same price. The page has no fixed size: it keeps every distinct video those reads return, including reads still arriving when it reaches 20, so it can hold more than 20; the largest of 351 local pages served from 30/11 to 01/12/2026 held 46 videos. At busy hours the supplier can refuse every pull of a local call: 64 of 335 local calls (19%) in the 12 hours to 02:00 UTC on 26/11/2026. The call then waits 15 seconds and tries once more inside the same request, so such a call can take up to about 38 seconds; in the same logs, requests made 15 to 30 seconds after a refused one were served 64% of the time. When no video comes back, after that second try or because the supplier timed out, the call returns 503 with credits refunded. A local request never falls back to the global feed. Both feeds cost the same, carry no cursor, and return each video once. Every row carries ext.region, the country the video is registered to. With feed=local, send country to keep only videos registered to the countries you list: the call keeps reading until it has 20 such videos or runs out of time, data.country counts what it kept and dropped, and when no video matches the answer is an empty page with empty_reason: row_filtered that costs nothing. Local rows also carry ext.content_language, TikTok's own caption-language tag. post.ext.matched_song_id is the catalogue song TikTok matched the row's sound to, present when it made a match: an official clip and the original sounds creators upload with it have different post.ext.music_id values and one matched_song_id, so group on it to count a song's uses (it is not a clipId for /v1/tiktok/song/videos).
95개 플랫폼을 하나의 API로 제공합니다
트렌드 API로 무엇을 할 수 있을까요
트렌드 엔드포인트가 통합 스키마와 계산 필드를 담은 TikTok 데이터를 한 번의 요청으로 보내드려요. 스크래핑 인프라를 직접 만들거나 유지할 필요가 없어요.
요청 예시
# GET /v1/tiktok/trending: Metered: holds 5 credits per call up front and refunds what the call does not use. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
# --max-time 58: this endpoint's measured p99 latency x 1.5.
# --retry 3: retries timeouts, 429 and 5xx, honoring Retry-After.
# -o response.json keeps only the final attempt's body.
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
IDEMPOTENCY_KEY=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')
curl -sS --max-time 58 --retry 3 -o response.json \
-H "x-api-key: YOUR_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
"https://www.socialcrawl.dev/v1/tiktok/trending?region=US&trim=true" && cat response.json# GET /v1/tiktok/trending: Metered: holds 5 credits per call up front and refunds what the call does not use. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
import os
import random
import time
import uuid
import requests
API_KEY = os.environ.get("SOCIALCRAWL_API_KEY", "YOUR_API_KEY")
TIMEOUT_S = 58 # this endpoint's measured p99 latency x 1.5.
MAX_RETRIES = 3
URL = "https://www.socialcrawl.dev/v1/tiktok/trending"
def backoff(attempt):
# Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
return 2 ** attempt * (0.5 + random.random() / 2)
def socialcrawl(params):
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
idempotency_key = str(uuid.uuid4())
for attempt in range(MAX_RETRIES + 1):
try:
res = requests.get(
URL,
params=params,
headers={"x-api-key": API_KEY, "Idempotency-Key": idempotency_key},
timeout=TIMEOUT_S,
)
body = res.json()
except (requests.RequestException, ValueError):
# A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
if attempt == MAX_RETRIES:
raise
time.sleep(backoff(attempt))
continue
if body["success"]:
return body
error = body["error"]
# Branch on error["type"], never on the message text.
if error["type"] == "RESOURCE_NOT_FOUND":
return None # refunded: nothing to read
retry_after = res.headers.get("Retry-After")
# SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
permanent = error["type"] == "SERVICE_UNAVAILABLE" and retry_after is None
if not error.get("retryable") or permanent or attempt == MAX_RETRIES:
raise RuntimeError(f"{error['type']}: {error['message']} (request_id {body['request_id']})")
# Retry-After (seconds) wins; otherwise back off.
time.sleep(float(retry_after) if retry_after else backoff(attempt))
params = {
"region": "US",
"trim": "true",
}
body = socialcrawl(params)
if body is not None:
print(body["data"])// GET /v1/tiktok/trending: Metered: holds 5 credits per call up front and refunds what the call does not use. Cache hits are free and failed calls are refunded.
// Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
const API_KEY = process.env.SOCIALCRAWL_API_KEY ?? "YOUR_API_KEY";
const TIMEOUT_MS = 58_000; // this endpoint's measured p99 latency x 1.5.
const MAX_RETRIES = 3;
type Page = { next_cursor: string | null; has_more: boolean };
type SocialCrawlResponse =
| { success: true; data: any; pagination?: Page; credits_used: number; request_id: string }
| { success: false; error: { type: string; message: string; retryable: boolean }; request_id: string };
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
// Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
const backoffMs = (attempt: number) => 2 ** attempt * 1000 * (0.5 + Math.random() / 2);
async function socialcrawl(url: URL) {
// One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
const idempotencyKey = crypto.randomUUID();
for (let attempt = 0; ; attempt++) {
let res: Response;
let body: SocialCrawlResponse;
try {
res = await fetch(url, {
headers: {
"x-api-key": API_KEY,
"Idempotency-Key": idempotencyKey,
},
signal: AbortSignal.timeout(TIMEOUT_MS),
});
body = (await res.json()) as SocialCrawlResponse;
} catch (error) {
// A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
if (attempt >= MAX_RETRIES) throw error;
await sleep(backoffMs(attempt));
continue;
}
if (body.success) return body;
// Branch on error.type, never on the message text.
if (body.error.type === "RESOURCE_NOT_FOUND") return null; // refunded: nothing to read
const retryAfter = res.headers.get("Retry-After");
// SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
const permanent = body.error.type === "SERVICE_UNAVAILABLE" && retryAfter === null;
if (!body.error.retryable || permanent || attempt >= MAX_RETRIES) {
throw new Error(`${body.error.type}: ${body.error.message} (request_id ${body.request_id})`);
}
// Retry-After (seconds) wins; otherwise back off.
await sleep(retryAfter ? Number(retryAfter) * 1000 : backoffMs(attempt));
}
}
const url = new URL("https://www.socialcrawl.dev/v1/tiktok/trending");
url.searchParams.set("region", "US");
url.searchParams.set("trim", "true");
const body = await socialcrawl(url);
if (body) console.log(body.data);Call GET https://www.socialcrawl.dev/v1/tiktok/trending from this project.
Request:
- Query parameters:
- region: US
- trim: true
- Header x-api-key: read the key from the SOCIALCRAWL_API_KEY environment variable. Never hard-code it, commit it or put it in a URL.
- Header Idempotency-Key: a fresh UUID per request, reused on every retry of that request, so a retried call is never charged twice.
- Client timeout: 58 seconds per attempt (this endpoint's measured p99 latency x 1.5).
Price: Metered: holds 5 credits per call up front and refunds what the call does not use. Cache hits are free and failed calls are refunded. Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
Response:
- Success: { success: true, data, credits_used, credits_remaining, request_id, cached }.
- Failure: { success: false, error: { type, message, retryable }, request_id }. Branch on error.type, never on the message text.
- RESOURCE_NOT_FOUND means the target does not exist. It is refunded, so treat it as an empty result.
- Retry only when error.retryable is true, at most 3 times: wait Retry-After seconds when the header is present, otherwise back off exponentially with jitter. A SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint, so do not retry it. Retry a timed-out attempt with the same Idempotency-Key.
Before writing code, read this endpoint's live contract (0 credits):
GET https://www.socialcrawl.dev/v1/utility/endpoint?id=tiktok/trending함께 보내면 좋은 파라미터
region=US지정한 시장의 결과만 반환합니다.trim=true가격은 같습니다. 용량이 큰 원본 필드를 빼서 응답이 가벼워집니다.
파라미터
| 파라미터 | 필수 | 설명 |
|---|---|---|
| region | 예 | ISO 3166-1 alpha-2 country code (e.g., US, GB, DE). On the default feed it sets the country the request is routed through and does not filter videos; with `feed=local` it sets the country the For You feed is built for. Either way, check `ext.region` on each row for the country a video is actually from. |
| trim | 아니오 | Accepted for compatibility; it has no effect with `feed=local`. |
| feed | 아니오 | `global` (default): the web trending feed routed through `region`, mostly worldwide content, about 13 videos in 3 to 12 seconds. `local`: the For You feed for a phone in `region`, most videos from that country, a median of 24 videos with 9 calls in 10 answering within 22 seconds, read again up to two more times when a page holds fewer than 20 videos and the request has time left, one more try 15 seconds later when the supplier refuses every pull, and a refunded 503 when none come back. (global | local) |
| country | 아니오 | Only with `feed=local`. Comma-separated two-letter ISO 3166-1 codes, for example `KE` or `KE,NG` (up to 30). Keeps only videos TikTok registers to one of these countries (`post.ext.region`); a video with no country is dropped. `region` still chooses which country's feed is read. The call keeps reading the feed until it has 20 matching videos or runs out of time (up to about 38 seconds), at the same price, and `data.country` reports `requested`, `kept`, `dropped_other` and `dropped_unknown`. When no video matches, the answer is an empty page with `empty_reason: row_filtered` and nothing is charged. |
| include | 아니오 | `exact_counts`: exact counts on the first 10 rows in one round, about 9 s however many, +1 a row made exact. A row whose counts already came back exact is marked `post.ext.counts_approximate: false` and costs nothing extra. |
| since | 아니오 | Only rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off the answer, which is one page with no next page. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`. |
| until | 아니오 | Only rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off the answer, which is one page with no next page. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`. |
TikTok 트렌드 API는 무엇을 돌려주나요
모든 응답은 하나의 통합 스키마를 따라요. 크레딧을 쓰기 전에 어떤 필드가 돌아오는지, 실제 응답 본문 그대로 확인해 보세요.
응답 예시 보기
{
"success": true,
"platform": "tiktok",
"endpoint": "/v1/tiktok/trending",
"data": {
"items": [
{
"post": {
"id": "7682049568975932702",
"url": "https://www.tiktok.com/@user_ef4bc4/video/7682049568975932702",
"content": {
"text": "Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted).",
"media_urls": [
"https://p16-common-sign.tiktokcdn-us.com/tos-useast8-i-photomode-tx2/b5d243cd1e17487e8aa85aedec348a33~tplv-photomode-sr-vqe2-new:1440:0:1080:0:q75.jpeg?dr=10952&refresh_token=2a8eb8de&x-expires=1792242000&x-signature=tn8wMg1ATV4g%2ByST%2BpI4o4L%2BzQw%3D&t=5897f7ec&ps=28cf8ac7&shp=d05b14bd&shcp=1a816805&idc=useast5&s=FEED&biz_tag=tt_photomode&sc=image"
],
"thumbnail_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-i-photomode-tx2/b5d243cd1e17487e8aa85aedec348a33~tplv-photomode-image-cover:640:0:q70.webp?dr=12229&refresh_token=a2b32c0d&x-expires=1792242000&x-signature=0bt9TVezhwQ2A3yzOq2dRxKPRMY%3D&t=5897f7ec&ps=d5b8ac02&shp=d05b14bd&shcp=1a816805&idc=useast5&s=FEED&biz_tag=tt_photomode&sc=cover",
"duration_seconds": 0
},
"author": {
"username": "user_ef4bc4",
"display_name": "user_4cf053",
"avatar_url": "https://example.com/avatars/user_783baf.png",
"verified": false
},
"engagement": {
"views": 3253405,
"likes": 70388,
"comments": 1892,
"shares": 23013,
"saves": 36428
},
"flags": {
"nsfw": null,
"spoiler": null,
"pinned": null,
"deleted": false
},
"published_at": "2026-09-05T13:56:12.000Z",
"ext": {
"music_id": "6814378834477975553",
"author_id": "user_29dfab",
"region": "US",
"published_at_epoch": 1788616572
}
},
"computed": {
"engagement_rate": 0.02929,
"language": "en",
"content_category": "other",
"estimated_reach": 3904086
}
},
{
"post": {
"id": "7677659988789103902",
"url": "https://www.tiktok.com/@user_8a8702/video/7677659988789103902",
"content": {
"text": "Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted). Sample comment text (redacted).",
"media_urls": "https://v16m.tiktokcdn-us.com/7200fde1f54a7b3ac3b3dcf15359dec3/6ac0015d/video/tos/useast8/tos-useast8-ve-0068c002-tx2/okqBUMjDiq5QE2iA1WXA7hkPuNyIAfCRMIijd8/?a=1233&bti=OHYpOTY0Zik3OjlmOm01MzE6ZDQ0MDo%3D&&bt=1216&ft=arR-Iqx4m3XPD12Pa4MI3wU3B4zKaeF~O5&mime_type=video_mp4&rc=aWU7NTs0M2U4NzczZjpoaUBpM3FpOmw5cnk7ZDMzaTczNEBfNTZgLy9gXzExNWJjMS4tYSNebGNrMmQ0YTNhLS1kMTJzcw%3D%3D&vvpl=1&l=20261002130753BA797C81DDCD61F02618&btag=e00090000",
"thumbnail_url": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/oMKB7A1AiCuAIviA1yaAEhkP4N0IBfCRMEiLpn~tplv-tiktokx-shrink_ep:640:640:q78.jpeg?dr=8592&refresh_token=aa8c83c9&x-expires=1791032400&x-signature=Brow6cNgUtLAHFGTBIaBI63oBb0%3D&t=bacd0480&ps=933b5bde&shp=d05b14bd&shcp=1a816805&idc=useast5&biz_tag=tt_video&s=FEED&sc=cover",
"duration_seconds": 81
},
"author": {
"username": "user_8a8702",
"display_name": "user_4c407b",
"avatar_url": "https://example.com/avatars/user_f9f9c2.png",
"verified": false
},
"engagement": {
"views": 20024442,
"likes": 234869,
"comments": 8723,
"shares": 23981,
"saves": 68392
},
"flags": {
"nsfw": null,
"spoiler": null,
"pinned": null,
"deleted": false
},
"published_at": "2026-08-24T18:02:23.000Z",
"ext": {
"music_id": "7677659961165499167",
"author_id": "user_491ac5",
"region": "US",
"published_at_epoch": 1787594543
}
},
"computed": {
"engagement_rate": 0.013362,
"language": "en",
"content_category": "entertainment",
"estimated_reach": 24029330
}
}
],
"total": null,
"dropped": 0
},
"credits_used": 5,
"request_id": "req_example000000",
"cached": false,
"pagination": {
"next_cursor": null,
"has_more": false,
"page_size": 11
},
"credits_remaining": 9999,
"source": "captured",
"captured_at": "2026-10-02T13:07:58.191Z",
"redacted": true
}통합 응답 구조를 보여 주는 실제 샘플이에요. 필드 값은 조회한 대상에 따라 달라져요.
TikTok 트렌드 API는 어떻게 동작하나요
API 키와 함께 GET 요청을 보내면, 통합 스키마와 계산 필드를 담은 깔끔한 JSON이 돌아와요.
메서드
GET
응답 형식
JSON
소셜 미디어 데이터를 몇 초 만에 수집하는 방법
개발자를 위한 가장 빠른 소셜 미디어 스크래핑 API. 월간 활성 사용자 100억 명 이상을 포괄하는 95개 플랫폼에서 프로필, 게시물, 댓글, 분석 데이터를 수집하세요.
모든 플랫폼을 하나의 스키마로
동일한 응답 구조로 95개 플랫폼을 조회하세요. 연동은 한 번이면 충분합니다.
단순 수집을 넘어 계산된 필드 제공
엔드포인트가 해당 지표를 지원하고 계산에 필요한 원본 값이 있을 때, 정규화된 레코드에 engagement_rate, estimated_reach, content_category, language를 함께 담아 바로 활용할 수 있습니다.
코드 한 줄 쓰기 전에, 데이터부터
Visual Data Explorer에 URL만 붙여넣으면 결과 카드와 정형화된 테이블, CSV 내보내기를 바로 사용할 수 있습니다.
import requests
response = requests.get(
'https://www.socialcrawl.dev/v1/tiktok/profile',
params={'handle': 'charlidamelio'},
headers={'x-api-key': 'sc_YOUR_API_KEY'}
)
data = response.json(){
"success": true,
"platform": "tiktok",
"data": {
"author": {
"username": "charlidamelio",
"followers": 152400000
},
"engagement": {
"likes": 12400000000,
"engagement_rate": 0.087
},
"metadata": {
"language": "en",
"content_category": "lifestyle"
}
}
}자주 묻는 질문
API, 요금제, 기능에 대한 질문과 답변입니다.
문의하기TikTok 트렌딩 피드는 어떻게 받나요?
트렌딩 응답에는 어떤 필드가 담기나요?
region을 넣으면 그 국가 영상만 나오나요?
트렌딩 데이터는 얼마나 최신인가요?
이 엔드포인트는 요금이 얼마인가요?
AI에게 SocialCrawl을 물어보세요
TikTok 트렌드 데이터, 가져올 준비 되셨어요?
API 키 받고 60초 안에 TikTok 데이터를 받아 가세요.
