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

Canonical: https://fetchfox.net/docs/tiktok-channel-videos-api

## Request

GET /tiktok/channel-videos (query parameters) or POST /tiktok/channel-videos (JSON). Authenticate with x-access-key. Keep keys server-side.

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

### 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

```
// 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

```
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'])
```

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

## Related pages

- https://fetchfox.net/docs/tiktok-video-stats-api

- https://fetchfox.net/docs/tiktok-search-api

- https://fetchfox.net/guides/tiktok-keyword-monitoring

