# Rate Limiting

Use this guide to stay within your subscription’s request-rate limit and handle throttled requests.

Geoscape applies request-rate limits to protect service availability. The limit is measured in requests per second (RPS) and depends on your Hub subscription plan.

These are request-rate limits, not a guarantee that every API or product has the same credit cost. For credit usage, see [Credit usage](/guides/api-conventions#credit-usage).

## Build for the limit

- Throttle requests in your client rather than sending a burst and waiting for failures.
- Debounce address-autocomplete requests so you do not send one request for every keystroke. Predictive address suggestions require at least three characters. Locality suggestions require at least one. See [Autocomplete](/guides/predictive/autocomplete).
- Cache repeat lookups where your licence and data freshness requirements allow it.
- Use the Batches API for suitable bulk workloads instead of issuing thousands of independent requests.
- Keep a bounded queue and maximum concurrency in workers and background jobs.

## Handle `429 Too Many Requests`

When the API returns `429`, pause before retrying. Use exponential backoff with jitter, cap the number of retries, and avoid retrying all failed requests at the same instant.

```javascript
async function fetchWithBackoff(url, options, maxRetries = 4) {
  for (let attempt = 0; attempt <= maxRetries; attempt += 1) {
    const response = await fetch(url, options);
    if (response.status !== 429) return response;

    if (attempt === maxRetries) return response;
    const delay = Math.min(30_000, 500 * 2 ** attempt) + Math.random() * 250;
    await new Promise((resolve) => setTimeout(resolve, delay));
  }
}
```

Do not retry invalid requests (`400`), unauthorised requests (`401`), or missing resources (`404`) without changing the request. See [Error Handling](/guides/errors) for the broader recovery rules.

## Next steps

- [Handle errors and retries](/guides/errors)
- [Use the Batches API for bulk workloads](/guides/batches/quickstart)
- [Browse the API Reference](/reference)
