Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. API & Developers
  6. /
  7. Api Rate Limits
GUIDEAPI & Developers

API Rate Limits & Best Practices

4 min read

Rate limits protect the Data Mammoth API infrastructure and ensure fair access for all users. This guide explains how rate limits work, how to monitor your usage, and best practices for building efficient API integrations.

Rate Limit Overview

API requests are limited based on your account type and authentication method:

Account TypeRequests Per MinuteRequests Per Hour
Standard601,000
Reseller1203,000
EnterpriseCustomCustom
Limits apply per API key. If you have multiple API keys, each has its own rate limit.

Rate Limit Headers

Every API response includes headers that communicate your rate limit status:

text
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1710684000
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the rate limit window resets

What Happens When You Hit the Limit

If you exceed the rate limit, the API returns:

text
HTTP/1.1 429 Too Many Requests
json
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded. Please retry after 30 seconds.",
    "status": 429,
    "retry_after": 30
  }
}

The retry_after value indicates how many seconds to wait before making another request.

Best Practices

1. Implement Exponential Backoff

When you receive a 429 response, wait and retry with increasing delays:

python
import time
import requests

def api_request_with_retry(url, headers, max_retries=5): for attempt in range(max_retries): response = requests.get(url, headers=headers) if response.status_code == 429: wait_time = int(response.headers.get('Retry-After', 2 ** attempt)) time.sleep(wait_time) continue return response raise Exception("Max retries exceeded")

2. Cache API Responses

Avoid unnecessary API calls by caching data that does not change frequently:

  • Server list — Cache for 30 to 60 seconds.
  • Plan/region lists — Cache for hours or days (these rarely change).
  • Account details — Cache for minutes.
  • Metrics — Cache based on the polling interval you need.

3. Use Webhooks Instead of Polling

Instead of repeatedly calling the API to check for changes, set up webhooks to receive notifications when events occur. See Webhooks — Real-Time Event Notifications.

4. Use Pagination Efficiently

Request only the data you need:

bash
# Instead of fetching all records
GET /v1/servers?per_page=100

Fetch smaller pages

GET /v1/servers?per_page=25&page=1

See API Pagination & Filtering.

5. Batch Related Operations

Group related API calls together instead of making individual calls:

  • Fetch a server list once and filter locally, rather than making separate calls for each server.
  • Use query parameters to filter results server-side.

6. Monitor Your Rate Limit Usage

Check the rate limit headers in every response:

python
response = requests.get(url, headers=headers)
remaining = int(response.headers.get('X-RateLimit-Remaining', 0))
if remaining < 10:
    print(f"Warning: Only {remaining} requests remaining")

7. Spread Requests Over Time

If you need to make many requests, spread them evenly across the rate limit window rather than sending them all at once.

8. Use Conditional Requests

Where supported, use If-Modified-Since or ETag headers to avoid downloading unchanged data:

bash
curl -X GET "https://api.datamammoth.com/v1/servers" \
  -H "Authorization: Bearer dm_key_abc123def456" \
  -H "If-None-Match: \"etag_value\""

If the data has not changed, the API returns 304 Not Modified without consuming body bandwidth.

Requesting Higher Limits

If your use case requires higher rate limits:

  • Submit a support ticket explaining your requirements.
  • Describe your use case and expected request volume.
  • Our team will evaluate and potentially increase your limits.
  • Enterprise customers can negotiate custom rate limits as part of their service agreement.

    What to Do Next

    • API Error Codes & Handling — Handle all error types.
    • API Pagination & Filtering — Efficient data retrieval.
    • Webhooks — Replace polling with push notifications.
    • API Overview — Full API reference.

    Was this article helpful?

    ← Back to API & DevelopersBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket