> ## Documentation Index
> Fetch the complete documentation index at: https://traceryn.online/llms.txt
> Use this file to discover all available pages before exploring further.

# IP throttling and proxies

> Avoid TikTok IP rate limits by routing TikTok SDK requests through rotating proxies.

TikTok rate-limits endpoints based on IP. If a request returns an empty response or gets throttled after heavy use, switch IP with a proxy.

## Configure proxies

Pass proxies when you create the client:

```ts theme={null}
const client = new TikTokClient({
  proxy: ['http://user:pass@host:port', 'http://proxy2:port'],
  proxyRotation: 'round-robin', // or 'random', 'lowest-failures'
});
```

Or add them at runtime and check their usage:

```js theme={null}
client.addProxies(['http://user:pass@host:port', 'http://proxy2:port']);
console.log(client.getProxyStats());
```

The SDK automatically rotates to the next healthy proxy when one fails.

The example scripts accept a `--proxy` flag:

```bash theme={null}
node docs/examples/searchUsers.cjs --session --proxy=http://user:pass@host:port
```

> [!TIP]
>
> Free public proxies are often blocked by TikTok. Residential or paid proxies are the most reliable for high-volume use.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.