TMDB API rate limit and amodb rate limits

The TMDB API rate limit is about 40 requests per second, counted per IP address, not per key, and TMDB says it could change. amodb limits each account, across all its keys, to 20, 40 or 120 requests per minute in a sliding 60 second window with no daily cap. Every reply shows what is left; a 429 adds Retry-After.

Updated View as Markdown

TMDB's developer docs put its upper limit at about 40 requests per second, TMDB counts it per IP address rather than per key, and TMDB says the number could change. amodb's limit is lower and fixed: 20, 40 or 120 requests per minute per account by plan, shared by all keys of the account, in a sliding 60 second window with no daily cap. In return you get predictability: the limit belongs to your account, not to an IP address, every reply says how many requests the account has left, and a 429 says when to try again.

What is the TMDB API rate limit?

About 40 requests per second, counted per IP address, not per API key. TMDB warns that the number could change, so do not build a schedule around it. Because the limit follows the IP address, the key you send does not change it.

TMDBamodb
LimitAbout 40 requests per second20, 40 or 120 requests per minute by plan
Average per secondAbout 400.33, 0.67 or 2
Counted perIP addressAccount, shared by all its keys
Can it change?TMDB says it could changeFixed by your plan and shown in X-RateLimit-Limit
WindowCheck TMDB's docsSliding 60 seconds
Daily capCheck TMDB's docsNone
Over the limitHTTP 429HTTP 429, status_code 25, Retry-After

On raw numbers TMDB is far ahead: 40 per second is 2,400 per minute, 20 times amodb's Pro+ plan. If you need many requests in a short time, TMDB's ceiling is higher.

What amodb sells is a limit you can plan around. A limit per IP depends on your network: apps that share one address share one budget. A limit per account does not: requests from one server or twenty, sent with one key or ten, count against the same window, and the numbers in the headers are the numbers that apply. Adding keys or recreating one does not change that budget, so the rate of your plan is the number to design for. The free versus paid side of the same comparison is on Is the TMDB API free?, and the full list of reasons teams switch is on TMDB API alternative.

Limits by plan

PlanPrice per monthRequests per minuteAverage per secondRequests per day at full rate
Lite$5.19200.3328,800
Pro$6.19400.6757,600
Pro+$7.191202172,800

Every plan has every TMDB v3 compatible endpoint, the OMDb compatible endpoint, images, 14 languages and the extensions. Pro+ also has the all in one endpoint, which returns everything about a title or person in one call and so saves requests; on Lite and Pro it answers HTTP 403 with status_code 3. Longer prepaid periods lower the monthly price, down to $3.11 a month. See TMDB API pricing for every period.

How the window works

amodb counts the requests of your account over the last 60 seconds, from all of its keys together. The window slides: a request made at 12:00:30 stops counting at 12:01:30. There is no reset at the top of the minute, and a revoked and recreated key does not reset it either, so a steady rate works better than bursts.

The key check and the rate limit run before the edge cache. A response served from cache still counts as one request.

What counts as a request?

CallRequests counted
A keyed call to /3/ or /omdb/1
The same call served from the edge cache1
Movie details with append_to_response=credits,images,ratings1
A poster or backdrop from img.amodb.dev0, no key needed
GET /plans0, public and needs no key

append_to_response is the cheapest way to save requests: one call returns details plus the blocks you name. The blocks are listed on the movie details API page.

Response headers

Every call made with a key returns these headers:

HeaderMeaning
X-RateLimit-LimitRequests allowed per 60 seconds for your account, across all its keys.
X-RateLimit-RemainingRequests left in the current window for the whole account.
X-RateLimit-ResetSeconds until the oldest counted request leaves the window.
Retry-AfterOn 429 only: seconds to wait before the next call.

Read them instead of guessing. This helper pauses when the window is full, so the next call does not hit a 429:

JavaScript
async function amodbPaced(path) {
  const res = await fetch(`https://api.amodb.dev${path}`, {
    headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` },
  });
  const left = Number(res.headers.get("X-RateLimit-Remaining") ?? 1);
  const reset = Number(res.headers.get("X-RateLimit-Reset") ?? 0);
  if (left === 0 && reset > 0) {
    await new Promise((r) => setTimeout(r, reset * 1000));
  }
  return res;
}

How do I fix API rate limit reached?

The response is HTTP 429 with the TMDB error body:

JSON
{
  "success": false,
  "status_code": 25,
  "status_message": "Your request count (41) is over the allowed limit of (40)."
}

Wait for Retry-After seconds, then retry. Do not retry in a tight loop.

A 429 is not the only status to plan for. A wrong key answers 401 with status_code 7, and an ended period answers 402 with status_code 36. Neither one gets better with a retry. The full list is on error codes.

jspy
async function amodb(path) {
  for (let attempt = 0; attempt < 3; attempt++) {
    const res = await fetch(`https://api.amodb.dev${path}`, {
      headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` },
    });
    if (res.status !== 429) return res.json();
    const wait = Number(res.headers.get("Retry-After") ?? 1);
    await new Promise((r) => setTimeout(r, wait * 1000));
  }
  throw new Error("amodb: still rate limited after 3 attempts");
}
import os
import time
import requests

def amodb(path):
    for _ in range(3):
        res = requests.get(
            f"https://api.amodb.dev{path}",
            headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
            timeout=10,
        )
        if res.status_code != 429:
            return res.json()
        time.sleep(int(res.headers.get("Retry-After", "1")))
    raise RuntimeError("amodb: still rate limited after 3 attempts")

Stay under the limit

  • Cache responses on your side. Details change rarely; 6 hours is a safe default, the same time the edge keeps them.
  • Use append_to_response to get details, credits and images in one request instead of three.
  • Spread batch jobs: send one request every 3 seconds on Lite, every 1.5 seconds on Pro and every 0.5 seconds on Pro+.
  • Read X-RateLimit-Remaining and slow down before it reaches 0.
  • Count all your apps together. Every key of the account draws from one window, so a second key adds no requests. Separate keys per app or environment still let you revoke one without touching the others. An account can hold up to 10 active keys and create up to 20 keys in any 24 hours, revoked ones included. Keys stay on your server, never in client side code. See authentication.
  • Load images from img.amodb.dev. They need no key and do not count.

Personal or commercial project?

Speed is only one side of the choice. TMDB is free only until the app earns money, then $149 a month for companies under $1M revenue. OMDb's terms say personal, non-commercial use. amodb charges nothing extra for commercial use on any plan, from $5.19 a month at 20 requests per minute to $7.19 at 120, and its terms do not prohibit it.

New to amodb? The quickstart makes a first call in a few minutes, and the TMDB API key page shows how to get a key.

Questions and answers

How do I fix API rate limit reached?

Wait the number of seconds in the Retry-After header, then send the request again, and never retry in a tight loop. On amodb the 429 body carries status_code 25. To keep it from coming back, cache replies, combine calls with append_to_response and spread batch jobs, for example one request every 1.5 seconds at 40 per minute.

What is the rate limit for the TMDB API?

About 40 requests per second, counted per IP address rather than per key, and TMDB says the number could change. amodb's limit is lower but fixed per account: 20, 40 or 120 requests per minute by plan, shared by every key of the account, in a sliding 60 second window, with the remaining count in every reply.

Do all my amodb keys share one limit?

Yes. The limit is per account: one sliding 60 second window at the rate of your plan, shared by every key of the account. More keys never add requests, and a revoked and recreated key does not reset the window. An account can hold up to 10 active keys and create up to 20 keys in any 24 hours, revoked ones included. Separate keys per app still let you revoke one without touching the others.

Is there a daily cap on amodb?

No. The only limit is the per minute rate. At full speed one account can make up to 28,800 requests a day on Lite, 57,600 on Pro and 172,800 on Pro+, every day of the period.

Do image requests count toward the amodb rate limit?

No. Images on img.amodb.dev need no key and do not count toward your rate. They come in 10 sizes from w92 to original and stay in the cache for 30 days, so posters can load straight from the image host.

Do cached responses count toward the limit?

Yes. The amodb key check and rate limit run before the edge cache, so a reply served from cache still counts as one request. Edge cache times are 24 hours for configuration, 6 hours for details and credits, 30 minutes for lists and 10 minutes for search.