FetchFox
Get started

TikTok channel videos API with pagination

List recent public videos for a known TikTok channel. Unlike the Instagram list operations, this endpoint accepts a cursor from a previous response for pagination.

Make a request

GET /tiktok/channel-videos accepts query parameters. POST /tiktok/channel-videos accepts the same inputs as JSON. Send your project key in the x-access-key header; keep it on your server.

Credits: 1 credit per successful request. Each fetched page is a separate request.

curl request example
curl
curl --fail-with-body --get 'https://api.fetchfox.net/tiktok/channel-videos' \
  -H 'x-access-key: YOUR_KEY' \
  --data-urlencode 'url=https://www.tiktok.com/@example' \
  --data-urlencode 'limit=20'
JavaScript request example
JavaScript
// Run on your server with FETCHFOX_API_KEY set.
const url = new URL('https://api.fetchfox.net/tiktok/channel-videos');
url.searchParams.set('url', 'https://www.tiktok.com/@example');
url.searchParams.set('limit', '20');
const response = await fetch(url, {
  headers: { 'x-access-key': process.env.FETCHFOX_API_KEY },
  signal: AbortSignal.timeout(130000)
});
if (!response.ok) throw new Error('HTTP ' + response.status);
const result = await response.json();
if (!result.success) throw new Error('Request unsuccessful');
console.log(result.data);
Python request example
Python
import json, os
from urllib.parse import urlencode
from urllib.request import Request, urlopen

query = urlencode({"url":"https://www.tiktok.com/@example","limit":20})
request = Request('https://api.fetchfox.net/tiktok/channel-videos?' + query,
    headers={'x-access-key': os.environ['FETCHFOX_API_KEY']})
with urlopen(request, timeout=130) as response:
    result = json.load(response)
if not result.get('success'):
    raise RuntimeError('Request unsuccessful')
print(result['data'])

Replace placeholder source IDs with real public URLs. See limits and retries before automating calls.

Paginate with a stopping rule

Start with the channel URL and a small limit. Pass the response cursor as cursor for a subsequent request when more results are available. Stop if the cursor is absent or repeats, a page makes no progress, or your page/credit budget is reached. Deduplicate by the returned item identifier or URL.

Opt into response caching

cache=true opts into successful response caching. cache_ttl controls the maximum response age in seconds: 60 to 2,592,000, with a default of 86,400. Successful requests use the normal credit rate, including cache hits; there is no stale fallback. no_cache=true bypasses extraction and result caches.

Optional country accepts a two-letter residential exit country code. Availability can vary by region. Cache age and retrieval time describe different things; record both when freshness matters.

Give bounded recovery enough time

Paid requests allow up to 120 seconds of bounded recovery. Set a client timeout that accommodates your workflow without retrying indefinitely. Failed processing costs zero, but attempts count toward applicable limits.

Continue building