| Header Name | Description |
|---|---|
X-RateLimit-Limit | The maximum number of requests that the consumer is permitted to make per hour. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The time at which the current rate limit window resets in UTC epoch seconds. |
Retry-After | The number of seconds to wait before retrying the request again. |
429 Too Many Requests response code if the rate limit is exceeded.
Rate limits by plan
Depending on your Dub plan, you can expect the following rate limits:| Plan | Rate limit |
|---|---|
| Free | 60 requests per minute |
| Pro | 600 requests per minute |
| Business | 1,200 requests per minute |
| Advanced | 3,000 requests per minute |
| Enterprise | Custom – reach out to sales for details |
Rate limits by endpoint
Dub’s Analytics endpoints have separate, per-second rate limits to ensure optimal performance:| Plan | Analytics API rate limit |
|---|---|
| Free | N/A |
| Pro | 2 requests per second |
| Business | 4 requests per second |
| Advanced | 8 requests per second |
| Enterprise | Custom – reach out to sales for details |
GET /analytics– retrieving aggregated analyticsGET /events– retrieving paginated lists of events
How to comply with rate limits
Here are some tips on how you can optimize your API setup to comply with our rate limits:1. Bulk link creation
If you need to create a lot of links within a short period of time, try our bulk link creation endpoint instead (create up to 100 links in one API call)2. Fetch workspace-level analytics
If you’re using our Analytics API, instead of retrieving the clicks count for every single link, try making a single API call to get workspace-level click analytics instead.3. Leverage webhooks
If you’re expecting high volume, fast-changing data (e.g. thousands of clicks on your links per day) and would prefer to store the data on your end, we recommend using our real-time webhooks feature instead.