logo

Steam inventory rate limits and HTTP 429 errors

If you load Steam inventories from steamcommunity.com/inventory and start getting HTTP 429 Too Many Requests, you have hit Steam's rate limit for that endpoint. Valve does not publish how high that limit is or how long a block lasts, and in our experience it is counted per IP address. The fix is to send fewer requests per IP: bigger pages, caching, backing off on 429, or spreading requests over several IPs. This post explains each option and how the limits of the Steam API Hub inventory endpoint work instead.

Which limit you are hitting

These are two different things, and they are often mixed up.

The Steam Web API lives on api.steampowered.com and needs a Steam Web API key. Its terms of use set one published limit: 100,000 calls per day.

Inventories are not loaded from that host. The URL most tools use is on the community site and takes no Web API key:

1https://steamcommunity.com/inventory/STEAM_ID/730/2?l=english&count=2000

Here 730 is the app id of CS2 and 2 is the inventory context. Valve documents no limit for this URL, so the 100,000 per day of the Web API tells you nothing about it. And since the URL takes no Web API key, a key cannot raise its limit either.

Why you get 429 even at low volume

The inventory endpoint answers 429 when too many requests come from one IP address. Because it is the IP that counts, everything that shares it counts together: several workers of your own app, other customers on the same cloud egress IP, or other users behind the same carrier NAT. A script that sends a few requests a minute from a busy shared IP can be blocked while the same script runs fine at home.

We run Steam inventory requests all day for our API, and on 429 we take the IP out of rotation for a few minutes before using it again. We do not quote a requests-per-minute number here, because Valve has not published one.

What you can do yourself

  • Ask for big pages. The count parameter decides how many items one request returns. Our API asks Steam for up to 2000 per page, so a large inventory takes a few requests instead of dozens.
  • Cache. Keep the last response per SteamID for a short time and reuse it when the same inventory is requested again.
  • Back off on 429. Stop sending from that IP, wait, and retry with a growing delay instead of retrying immediately.
  • Spread the load. Use several outgoing IPs, each with its own pause after a 429. This is what we do for our API.

Using the inventory endpoint instead

The Steam API Hub inventory endpoint runs the Steam requests through our own pool of IPs, handles Steam's 429s there and returns parsed items with market prices attached:

1curl "https://api.steamapihub.com/inventory?appId=730&steamId=76561198000000000&count=2000&apiKey=YOUR_API_KEY"

Your application then only has to respect the limits of your plan. They are per account and per endpoint, with one limit per minute and one per day. For the inventory endpoint:

  • Default: 40 per minute, 5,000 per day
  • Starter: 80 per minute, 12,500 per day
  • Amateur: 100 per minute, 27,500 per day
  • Pro: 120 per minute, 60,000 per day
  • Enterprise: 300 per minute, 200,000 per day
  • Maximalist: 700 per minute, 400,000 per day

The day limit is not the minute limit times 1440. The minute limit caps bursts; the day limit is the volume of the plan. Prices for each plan are on the pricing page.

Requests that fail do not count against either limit: a 403 for a private inventory, a 404 or a 429 is not counted.

What a 429 from our API looks like

When you go over a limit, the API answers with HTTP 429 and this body:

1{
2 "status": "TOO_MANY_REQUESTS",
3 "error": "You have exceeded the minute limit for this endpoint"
4}

The error says day instead of minute when the day limit is reached. The response also carries these headers:

  • RateLimit-Limit: the limit that was hit.
  • RateLimit-Remaining: requests left in the current window, 0 here.
  • RateLimit-Reset: seconds until that window starts over.
  • Retry-After: the full window length in seconds, 60 for the minute limit and 86400 for the day limit.

The windows are fixed, not sliding, so RateLimit-Reset is the shortest safe wait. Retry-After is always safe but can be longer than needed.

Handling 429 in JavaScript (Node 18 or newer)

1async function fetchWithRetry(url, maxRetries = 3) {
2 for (let attempt = 0; ; attempt++) {
3 const res = await fetch(url);
4 if (res.status !== 429) return res;
5 const body = await res.json();
6 if (body.error.includes("day limit") || attempt >= maxRetries) {
7 throw new Error(`429: ${body.error}`);
8 }
9 const waitSeconds = Number(
10 res.headers.get("ratelimit-reset") ?? res.headers.get("retry-after") ?? 60,
11 );
12 await new Promise((resolve) => setTimeout(resolve, (waitSeconds + 1) * 1000));
13 }
14}
15const params = new URLSearchParams({
16 appId: "730",
17 steamId: "76561198000000000",
18 count: "2000",
19 apiKey: process.env.STEAMAPIHUB_API_KEY,
20});
21const res = await fetchWithRetry(`https://api.steamapihub.com/inventory?${params}`);
22console.log(res.status, (await res.json()).totalInventoryCount);

Save it as an .mjs file so top-level await works. The extra second avoids retrying a moment before the window resets. A day limit is not retried: the wait can be hours.

Handling 429 in Python

1import os
2import time
3import requests
4def get_with_retry(url, params, max_retries=3):
5 for attempt in range(max_retries + 1):
6 res = requests.get(url, params=params, timeout=60)
7 if res.status_code != 429:
8 return res
9 error = res.json()["error"]
10 if "day limit" in error or attempt == max_retries:
11 raise RuntimeError(f"429: {error}")
12 wait = res.headers.get("RateLimit-Reset") or res.headers.get("Retry-After") or 60
13 time.sleep(int(wait) + 1)
14res = get_with_retry(
15 "https://api.steamapihub.com/inventory",
16 {
17 "appId": "730",
18 "steamId": "76561198000000000",
19 "count": 2000,
20 "apiKey": os.environ["STEAMAPIHUB_API_KEY"],
21 },
22)
23print(res.status_code, res.json().get("totalInventoryCount"))

Better than retrying is not hitting the limit at all: if your plan allows 100 requests per minute, space your requests at least 0.6 seconds apart.

FAQ

How many requests per minute does Steam allow for inventories?

Valve does not publish a number. Treat any figure you read on forums as an observation at one point in time, and build your code to handle 429 whatever the real limit is.

How long does a Steam inventory 429 last?

That is not published either. Wait before retrying, and make the wait longer after each further 429.

Does a Steam Web API key raise the limit?

No. The key is for api.steampowered.com. The inventory URL on steamcommunity.com does not use it.

Does a 429 from your API cost anything?

It does not count against your limits. Plans are billed per started hour while the endpoint is active, not per request.

Further reading