Updated on Apr 8, 2022

4

min read

Request limits

The Movies API strictly enforces rate limits to ensure that the service remains reliable and accessible to all users. These rate limits are in place to prevent abuse, maintain system stability, and provide a seamless experience for everyone. In this section, we'll explore the rate limiting policies of the Movies API, helping you understand the limits and how to handle them.

Default Rate Limit

By default, the Movies API provides the following rate limit:

  • Requests Per Minute (RPM): 60 requests

This means that each API key is allowed to make up to 60 requests per minute. If you happen to exceed this limit, the API will respond with a 429 Too Many Requests status code. To prevent this from happening, it's essential to manage your requests effectively. This could involve implementing rate-limiting mechanisms in your application or considering an upgrade to one of our premium plans, which offer higher rate limits.

Premium Plans

If your application demands a higher rate limit due to increased usage, we offer premium plans with more generous rate limits. These plans cater to different needs and are as follows:

Basic Plan

  • RPM: 120 requests

  • Cost: $9.99/month

The Basic Plan is an excellent choice if you need a modest increase in your rate limit. With this plan, you can make up to 120 requests per minute.

Pro Plan

  • RPM: 300 requests

  • Cost: $19.99/month

For more extensive applications, the Pro Plan might be the right fit. It provides a substantial rate limit of 300 requests per minute, accommodating higher levels of usage.

Enterprise Plan

  • Custom RPM: Contact us for details

For enterprise-level applications with specific requirements, we offer custom rate limits and tailored solutions. To explore the possibilities of an Enterprise Plan, please reach out to our team.

To upgrade to one of these premium plans, please visit the Premium Features section of our documentation. There, you'll find more information and subscription details to get you started.

Rate Limit Headers

To help you keep track of your API usage and prevent rate limit exceedances, every API response includes specific headers. These headers provide valuable information about your current rate limit status. Here are the key rate limit headers:

  • X-RateLimit-Limit: This header indicates the total number of requests allowed per minute for your API key.

  • X-RateLimit-Remaining: This header shows the number of requests you still have available in the current minute.

  • X-RateLimit-Reset: The timestamp, expressed in seconds since the Unix epoch, indicates when your rate limit will reset.

For example, if you receive the following headers in an API response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1631658000

These headers reveal that your rate limit is set at 60 requests per minute, you have 42 requests remaining in the current minute, and the rate limit will reset at the Unix timestamp 1631658000. This timestamp can be converted into a human-readable date and time.

Exceeding Rate Limits

If, at any point, you surpass your rate limit, the API will respond with a 429 Too Many Requests status code. To avoid encountering rate limit issues, consider implementing rate limiting within your application. Additionally, caching frequently requested data can help reduce the number of API requests made, ensuring a smoother and more efficient experience for your users.