MarvelRivalsAPI.com
Swagger DocsDiscord
  • Introduction
    • Documentation Overview
  • Errors
  • Rate Limits
  • Endpoints
    • Achievements
      • All Achievements
      • Achievement
    • Battlepass
    • Heroes
      • All Heroes
      • Hero
      • Hero Stats
      • Hero Leaderboard
      • Costumes
        • All Costumes
        • Costume
    • Items
      • All Items
      • Item
    • Maps
      • All Maps
    • Patch Notes
      • All Balances
        • Balance
      • All Dev Diaries
        • Dev Diray
      • All Patch Notes
        • Patch Note
      • Game Versions
      • Seasons
    • Player Stats
      • Find Player
      • Player
      • Update Player
    • Match Stats
      • Match History v1
      • Match
      • Match History v2
Powered by GitBook
On this page

Was this helpful?

Rate Limits

Rate limiting is an essential concept in APIs that restricts the number of requests a client can make in a specified amount of time. This helps prevent abuse, ensures fair usage of resources, and protects against DDoS attacks.

When you hit a rate limit, the API will return a 429 Too Many Requests status code, signaling that you need to wait before making more requests. Understanding how rate limits work will help you manage your requests effectively and prevent disruptions to your application.

How Rate Limits Work

Rate Limit Definition

  • Requests per minute: The number of requests you are allowed to make in a given minute (e.g., 100 requests per minute).

  • Requests per hour/day: Some APIs also have limits based on hourly or daily quotas (e.g., 1000 requests per hour).

  • Reset Time: Rate limits are usually reset after a certain time period, which is indicated in the API response headers.

The Marvel Rivals API uses a dynamic rate limit that adjusts to each user and their usage to help better their performance.

Rate Limit Headers

When you make an API request, you may receive rate limit information in the response headers. These headers provide insight into your current rate limit status.

Here are the most common headers:

  • X-RateLimit-Limit: The maximum number of requests allowed in the current time window.

  • X-RateLimit-Remaining: The number of requests remaining before hitting the rate limit.

  • X-RateLimit-Reset: The time when the rate limit will reset (usually as a Unix timestamp).

Example:

HTTP/1.1 200 OK
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 900
X-RateLimit-Reset: 1617981210

PreviousErrorsNextAchievements

Last updated 2 months ago

Was this helpful?