Skip to content

Rate Limits

Understand the API rate limits and how to handle them.

The linked.is API implements rate limiting to ensure fair usage and maintain service stability for all users.

Default Limits

PlanRequests per MinuteRequests per Day
Free601,000
Pro30010,000
Business1,000100,000

Rate Limit Headers

Every API response includes headers that provide information about your current rate limit status:

<script setup lang="ts">
const rateLimitHeaders = {
  "X-RateLimit-Limit": 60,
  "X-RateLimit-Remaining": 55,
  "X-RateLimit-Reset": 1640995200
};
</script>

<template>
  <div>
    <h3>Rate Limit Headers:</h3>
    <pre>{{ JSON.stringify(rateLimitHeaders, null, 2) }}</pre>
  </div>
</template>
HeaderDescription
X-RateLimit-LimitMaximum number of requests allowed per minute
X-RateLimit-RemainingNumber of requests remaining in the current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Handling Rate Limits

When you exceed the rate limit, the API will return a 429 Too Many Requests response:

<script setup lang="ts">
const rateLimitErrorResponse = {
  success: false,
  error: {
    code: "RATE_LIMIT_EXCEEDED",
    message: "Too many requests. Please try again later.",
    retryAfter: 60
  }
};
</script>

<template>
  <pre>{{ JSON.stringify(rateLimitErrorResponse, null, 2) }}</pre>
</template>

Best Practices

  1. Cache responses - Store API responses locally to reduce the number of requests
  2. Implement exponential backoff - When rate limited, wait progressively longer between retries
  3. Use webhooks - For real-time updates, consider using webhooks instead of polling
  4. Batch requests - Combine multiple operations into fewer API calls when possible

Exponential Backoff Example

<script setup lang="ts">
const fetchWithRetry = async (url: string, options: RequestInit, maxRetries = 3) => {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, options)
    
    if (response.status === 429) {
      const retryAfter = response.headers.get('Retry-After') || Math.pow(2, i)
      await new Promise(resolve => setTimeout(resolve, retryAfter * 1000))
      continue
    }
    
    return response
  }
  
  throw new Error('Max retries exceeded')
};

const handleRetryRequest = async () => {
  try {
    const response = await fetchWithRetry(
      "https://api.linked.is/v1/links",
      {
        headers: {
          Authorization: "Bearer YOUR_API_TOKEN",
        },
      }
    );
    const data = await response.json();
    console.log(data);
  } catch (error) {
    console.error("Max retries exceeded:", error);
  }
};
</script>

<template>
  <div>
    <button @click="handleRetryRequest">Make Retry Request</button>
  </div>
</template>

Increasing Your Limits

If you need higher rate limits, consider upgrading your plan or contact us for custom enterprise limits.