Overview

The Jmpy.me API implements rate limiting to ensure fair usage and maintain service stability. Rate limits vary based on your subscription plan and the type of endpoint.

Rate Limit Headers

Every API response includes rate limit information in the headers:
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRemaining requests in the current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Example Response Headers

HTTP/1.1 200 OK
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1705329600

Rate Limits by Plan

Endpoint TypeLimit
URL Creation50/day
URL Reads500/day
QR Generation25/day
QR Reads250/day
Analytics100/day

Handling Rate Limit Errors

When you exceed rate limits, the API returns a 429 Too Many Requests response:
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "You have exceeded your rate limit for this endpoint",
    "details": {
      "limit": 100,
      "remaining": 0,
      "reset_at": "2024-01-15T12:00:00Z"
    }
  }
}

Best Practices

When you receive a 429 error, wait before retrying:
async function makeRequestWithRetry(url, options, 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(r => setTimeout(r, retryAfter * 1000));
      continue;
    }
    
    return response;
  }
  throw new Error('Max retries exceeded');
}
Cache read responses to reduce API calls:
const cache = new Map();
const CACHE_TTL = 60 * 1000; // 1 minute

async function getCachedData(url, options) {
  const cacheKey = url;
  const cached = cache.get(cacheKey);
  
  if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
    return cached.data;
  }
  
  const response = await fetch(url, options);
  const data = await response.json();
  
  cache.set(cacheKey, { data, timestamp: Date.now() });
  return data;
}
Use batch endpoints when available to reduce the number of API calls.Instead of creating URLs one by one:
// ❌ 100 API calls
for (const url of urls) {
  await createShortUrl(url);
}
Use bulk import:
// ✅ 1 API call
await bulkCreateUrls(urls);
Track your API usage in the dashboard and set up alerts before hitting limits.

Need Higher Limits?