ScreenshotNeo

BlogGuides

How to Scrape TikTok Data with an API

Learn which official TikTok API fits your use case, how Research Tools access works, what quotas apply, and why unofficial scraping is restricted.

By the ScreenshotNeo team1 October 20268 min read

“Scrape TikTok data with an API” can mean several different tasks. If you need public-data research, TikTok’s Research API is the sanctioned route, subject to eligibility, application, approval, quotas, and an approved research topic. If you are building an app for an authorizing user, use the relevant TikTok developer product and scopes. If a person wants a copy of their own data, use the Data Portability API.

None of these products is an unrestricted endpoint for downloading arbitrary TikTok content. TikTok’s Research Tools terms prohibit accessing TikTok data outside those tools, including scraping or other technical or manual extraction methods. Do not treat browser automation, cookie extraction, unofficial endpoints, or proxy rotation as an approved API workflow.

1. Choose the official route for your use case

Goal Correct route Authorization and limits
Academic or public-interest analysis of public TikTok data Research Tools Eligible organization, region, expertise, proposal, funding disclosure, data protection, ethics review, and TikTok approval are required.
An app that works with a signed-in user’s data The relevant TikTok developer product and scopes The user authorizes your app. Available fields depend on approved scopes.
A person requesting their own TikTok archive Data Portability API Product setup, approvals, Login Kit, and user consent are required.
Creator, advertiser, or commercial analytics Check TikTok’s current commercial developer products Research Tools are not a general commercial scraping service. Eligibility and returned data vary by product.

TikTok’s scopes reference separates research scopes from user, profile, video, and portability scopes. Decide whose data you need and why before creating an app; the scope determines which product and review process apply.

2. Can I use TikTok’s Research API?

TikTok describes Research Tools eligibility as region- and organization-specific. The official product page currently discusses academic institutions in the United States, European Economic Area, United Kingdom, Canada, or Switzerland; certain EU not-for-profit or independent research organizations; and Brazil-based academic or not-for-profit organizations studying online youth safety. Additional beta or vetted-researcher cases may exist.

Applicants must generally:

  • be affiliated with an eligible organization in an eligible region;
  • show relevant research expertise;
  • pursue an independent, public-interest mission rather than a commercial objective;
  • disclose funding;
  • submit a specific, proportionate proposal;
  • protect TikTok data with suitable security controls; and
  • provide evidence of ethical review where required.

The application flow is to create a TikTok developer account, submit the Research Tools application, and wait for approval. TikTok says applicants can typically expect a response within four weeks, although additional review may take longer. A developer account alone does not grant Research Tools access; TikTok states this directly in its Research API FAQ.

3. Authentication and project setup

After approval, follow TikTok’s current Research API getting-started guide for application credentials, token creation, scopes, and endpoint details. Do not copy an endpoint, parameter, or field from an old blog post: TikTok’s codebook and approval requirements control what your project can request.

  1. Create or select the approved developer application.
  2. Request only the scopes needed by the approved proposal.
  3. Store access tokens in a secret manager or environment variable, never in source control.
  4. Implement token renewal according to TikTok’s current authentication documentation. TikTok says access tokens expire every two hours.
  5. Record request timestamps, response status, quota headers, and the project scope used for each job.
  6. Keep retention, deletion, access control, and downstream use within the approved research plan and the current Research Tools terms.

4. Safe, runnable client patterns

TikTok’s documentation and approval determine the exact endpoint and JSON body. The examples below deliberately take those values from environment variables rather than inventing an endpoint or payload. Set TIKTOK_API_URL to the approved endpoint and TIKTOK_REQUEST_JSON to a request body copied from your current TikTok documentation.

cURL

export TIKTOK_API_URL='https://your-approved-tiktok-endpoint'
export TIKTOK_ACCESS_TOKEN='replace-with-a-short-lived-token'
export TIKTOK_REQUEST_JSON='{}'

curl --fail-with-body -sS -X POST "$TIKTOK_API_URL" \\
  -H "Authorization: Bearer $TIKTOK_ACCESS_TOKEN" \\
  -H 'Content-Type: application/json' \\
  --data "$TIKTOK_REQUEST_JSON"

Python

import json
import os
import requests

url = os.environ["TIKTOK_API_URL"]
token = os.environ["TIKTOK_ACCESS_TOKEN"]
payload = json.loads(os.environ.get("TIKTOK_REQUEST_JSON", "{}"))

response = requests.post(
    url,
    headers={
        "Authorization": f"Bearer {token}",
        "Content-Type": "application/json",
    },
    json=payload,
    timeout=60,
)
print("status:", response.status_code)
print("body:", response.text)
response.raise_for_status()

Node.js

const url = process.env.TIKTOK_API_URL;
const token = process.env.TIKTOK_ACCESS_TOKEN;
const payload = JSON.parse(process.env.TIKTOK_REQUEST_JSON || '{}');

if (!url || !token) throw new Error('Set TIKTOK_API_URL and TIKTOK_ACCESS_TOKEN');

const response = await fetch(url, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
});

const body = await response.text();
console.log('status:', response.status);
console.log('body:', body);
if (!response.ok) throw new Error(`TikTok request failed: ${response.status}`);

These clients provide retries, logging, and error handling around an endpoint you are authorized to use. They are not a way to bypass TikTok approval or turn an ordinary developer account into Research Tools access.

5. Quotas, rate limits, and data freshness

Keep TikTok’s quota systems separate. The Research API FAQ and the general API rate-limit page describe different products and windows.

Context Documented figure Operational meaning
Research API daily quota 1,000 requests per day and up to 100,000 records per day across the APIs Daily quota resets at 00:00 UTC. Video and Comments API responses can contain up to 100 records per request.
Research follower/following lists Up to 20,000 calls and 2 million records per day Maximum 100 records per call. Users in the VCE Test Stage may have access to up to 5,000 records per day.
General API endpoint limits 600 requests per one-minute sliding window for each of /v2/user/info/, /v2/video/query/, and /v2/video/list/ Exceeding the threshold can produce HTTP 429 with rate_limit_exceeded. Higher limits require a support request and approval.

TikTok says Research API video search is archived rather than necessarily live. New videos may take up to 48 hours to enter search, while some view, follower, and related engagement statistics may take up to 10 days to update. Design pipelines around watermarks and repeated reconciliation instead of assuming an immediate, complete snapshot.

6. Reliability and cost controls

  • Use a queue and a persistent cursor so a process restart does not duplicate an entire collection job.
  • Throttle below the documented limit and use exponential backoff with jitter for transient failures and HTTP 429 responses.
  • Cache immutable identifiers and request only fields needed by the approved project.
  • Store the raw response, request time, token or scope identifier, and parser version so results can be audited.
  • Separate acquisition from analysis. This makes it easier to delete data or rerun transformations without collecting it again.
  • Budget for delayed visibility: a missing video may be outside the archive freshness window rather than deleted.
  • Do not assume quota increases, eligibility, or availability; TikTok can review and change access.

Research Tools access is governed by approval and terms rather than a public, unrestricted price-per-request scraping plan. Read the current terms before committing to storage, resale, or commercial use.

7. Troubleshooting

Symptom Likely cause Fix
Access denied even though the developer account works The account has not been approved for Research Tools, or the requested scope is not approved. Check the application status and use only scopes shown in the approved project.
HTTP 401 or an invalid-token response The access token is expired, malformed, or sent without the Bearer scheme. Issue a current token, send Authorization: Bearer …, and keep token renewal out of logs.
HTTP 403 The product, region, organization, or scope does not permit the request. Compare the request with the current product documentation and approval; do not retry indefinitely.
HTTP 429 or rate_limit_exceeded A documented per-minute limit or project quota was exceeded. Stop sending requests, back off with jitter, and schedule work across the quota window.
A new video is missing Research results are archived and may lag by up to 48 hours. Retry after the documented freshness window and record the observation time.
Counts do not match the creator’s page Some statistics can take up to 10 days to update. Store snapshots with timestamps and avoid treating one response as real-time truth.
A parser finds no expected field The field is not in the approved scope, has changed, or is not present for that object. Check the current codebook and scope reference; handle absent fields explicitly.
A compliance review blocks publication The project, retention, funding, or use falls outside the approved proposal or terms. Pause processing, consult the current Research Tools terms, and request a project change if needed.

8. Does TikTok have a public API for scraping videos?

TikTok has official APIs for defined purposes, but the Research API is not an unrestricted public scrape endpoint. Access is gated, returned data is scoped, quotas apply, and the Research Tools terms prohibit extraction outside the tools. Unofficial endpoints and browser scraping can also violate TikTok’s terms and create security, privacy, and maintenance risks.

9. Alternatives by purpose

Academic or public-interest research: apply for Research Tools and use only approved scopes.

User-authorized integration: select the developer product whose scopes match the signed-in user workflow. The user’s authorization is part of the data-access model.

Personal export: use the Data Portability API for an individual’s requested posts, profile, activity, direct messages, or other available export categories. It is not general access to other users’ public content.

Commercial or creator analytics: review TikTok’s current commercial and developer products. The Research API FAQ says creators, advertisers, and commercial users are not eligible for Research Tools.

10. Or skip the browser setup

If your immediate need is a visual record of a TikTok page, documentation page, or research result, ScreenshotNeo provides a website screenshot API rather than a TikTok data-collection API. One GET request returns PNG, JPEG, WebP, or PDF. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server lets Claude, Cursor, and other MCP clients call take_screenshot, get_page_info, and capture_pdf.

See the ScreenshotNeo API documentation for all options. This call captures a page; it does not grant access to TikTok’s private or Research API data.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://www.tiktok.com/@tiktok -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://www.tiktok.com/@tiktok"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://www.tiktok.com/@tiktok' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

There are 1,000 screenshots a month free with no card. Paid plans start at $5 for 3,000 shots, and every feature is included on every plan. Create a free ScreenshotNeo account.

11. FAQ

Can a normal TikTok developer account call the Research API?

No. TikTok says the developer account alone is not sufficient; Research Tools application and project approval are required.

Are Research API results live?

Not necessarily. TikTok documents up to 48 hours for videos to enter search and up to 10 days for some statistics to update.

Can I use Research Tools for a commercial dashboard?

Research Tools are intended for approved public-interest research. The FAQ says creators, advertisers, and commercial users are not eligible; check TikTok’s other products for a commercial use case.

What happens when I exceed a limit?

General API endpoint limits can return HTTP 429 and rate_limit_exceeded. Research quotas are daily and separate. Back off, inspect your project’s quota, and schedule requests rather than retrying continuously.

Can Data Portability export another person’s videos?

No. It is a user-authorized export flow for the requesting individual’s data, with product setup, approvals, Login Kit, and consent.