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.
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.
| TMDB | amodb | |
|---|---|---|
| Limit | About 40 requests per second | 20, 40 or 120 requests per minute by plan |
| Average per second | About 40 | 0.33, 0.67 or 2 |
| Counted per | IP address | Account, shared by all its keys |
| Can it change? | TMDB says it could change | Fixed by your plan and shown in X-RateLimit-Limit |
| Window | Check TMDB's docs | Sliding 60 seconds |
| Daily cap | Check TMDB's docs | None |
| Over the limit | HTTP 429 | HTTP 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
| Plan | Price per month | Requests per minute | Average per second | Requests per day at full rate |
|---|---|---|---|---|
| Lite | $5.19 | 20 | 0.33 | 28,800 |
| Pro | $6.19 | 40 | 0.67 | 57,600 |
| Pro+ | $7.19 | 120 | 2 | 172,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?
| Call | Requests counted |
|---|---|
A keyed call to /3/ or /omdb/ | 1 |
| The same call served from the edge cache | 1 |
Movie details with append_ | 1 |
A poster or backdrop from img.amodb.dev | 0, no key needed |
GET /plans | 0, 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:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per 60 seconds for your account, across all its keys. |
X-RateLimit-Remaining | Requests left in the current window for the whole account. |
X-RateLimit-Reset | Seconds until the oldest counted request leaves the window. |
Retry-After | On 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:
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:
{
"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.
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_responseto 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-Remainingand 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.