Skip to main content
All CollectionsSteam API footprint
This is how we reduce our Steam API footprint
This is how we reduce our Steam API footprint

Many companies abuse the Steam API. We do not - and this is how we do it.

Ludvig Bartholdsson avatar
Written by Ludvig Bartholdsson
Updated over a week ago

TL:DR; caching

Why this is so important

In recent months (as of writing in May 2023), Steam has been struggling to handle the high traffic on Inventories, Profiles, and Tradeoffers. If you've tried to create a trade offer in recent months, you've likely noticed that they are often interrupted or that it "lags."

This is due to high pressure mainly from actors using the Steam API without any type of caching.

What others do

When logging into an online platform, they retrieve your Steam profile and inventory using the Steam API. Many do this every time you log in, or visit the inventory page. This results in a myriad of calls to Steam, which in turn slows everything down.

Fortunately, Steam has something called Ratelimiting. In short, it means that a certain IP address/account can only make X calls per Y minute/hour/day. But many of these actors use so-called proxies to circumvent this, resulting in them sending more calls than Steam can ultimately handle.

This is unsustainable in the long run, and it would be better for everyone if these actors changed their approach and started using alternative solutions.

Example:

A user logs in 3 times in a day.

Login 1:

  1. A request is made to the Steam API to fetch the profile.

  2. A request is made to the Steam API to fetch the inventory.

  3. A request is made to Steam GC to fetch inventory details.

Login 2:

The same three requests is made here. New data is fetched each time.

  1. A request is made to the Steam API to fetch the profile.

  2. A request is made to the Steam API to fetch the inventory.

  3. A request is made to Steam GC to fetch inventory details.

Login 3:

The same three requests is made here. New data is fetched each time.

  1. A request is made to the Steam API to fetch the profile.

  2. A request is made to the Steam API to fetch the inventory.

  3. A request is made to Steam GC to fetch inventory details.

What we do at CSMiddler

We also retrieve your Steam profile and inventory when you log in. It's necessary for the service to continue to function, but we don't do it as frequently as many others.

We store all non-sensitive public information that is not time-bound, and the next time we need the data, we retrieve it from our own storage instead of directly from the Steam API.

For example, Steam inventories; they don't update very frequently, but it's still important to keep this updated, otherwise, you might not find a skin that you recently bought and want to sell. Then we compare which skins we have saved with which ones are new, then we fetch data about the new skins.

Example:

A user logs in 3 times in a day.

Login 1:

  1. A request is made to the Steam API to fetch the profile.

  2. A request is made to the Steam API to fetch the inventory.

  3. A request is made to Steam GC to fetch inventory details.

Login 2:

  1. A call is made to the Steam API to see if you have any new skins. If you don't have any new ones, nothing is done here.

Login 3:

  1. A call is made to the Steam API to see if you have any new skins. If you don't have any new ones, nothing is done here.

Did this answer your question?